Merge commit cf721e29c6a3 from llvm git (by Amy Kwan):
[PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (#94059)
This patch prevents thread-local constants to be merged within
PPCMergeStringPool.cpp.
The PPCMergeStringPool pass primarily merges non-thread-local constants
together, and thread-local constants should not be mixed together with
other (non-thread-local) constants. In the event that thread-local and
other non-thread-local constants are pooled together, the
llvm.threadlocal.address intrinsic can fail as it expects its argument
to be a thread-local global value, but the merged string structure
created by the PPCMergeStringPool pass is not thread-local as a whole.
This fixes an error "llvm.threadlocal.address first argument must be a
GlobalValue" when building the math/nauty port on PowerPC architectures.
PR: 289122
[4 lines not shown]
Merge commit cf721e29c6a3 from llvm git (by Amy Kwan):
[PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (#94059)
This patch prevents thread-local constants to be merged within
PPCMergeStringPool.cpp.
The PPCMergeStringPool pass primarily merges non-thread-local constants
together, and thread-local constants should not be mixed together with
other (non-thread-local) constants. In the event that thread-local and
other non-thread-local constants are pooled together, the
llvm.threadlocal.address intrinsic can fail as it expects its argument
to be a thread-local global value, but the merged string structure
created by the PPCMergeStringPool pass is not thread-local as a whole.
This fixes an error "llvm.threadlocal.address first argument must be a
GlobalValue" when building the math/nauty port on PowerPC architectures.
PR: 289122
[4 lines not shown]
net80211 / LinuxKPI: 802.11: revert / redo enum ieee80211_sta_rx_bw
The initial thought of migrating the LinuxKPI 802.11 enum into net80211
for shared use did not work out well. Currently in the need for yet
another adjustment, I decided to undo/de-couple net80211 and
LinuxKPI 802.11 again.
The enum name now gets used in LinuxKPI based wifi drivers and it
turns out it is spelt differntly than what I used initially.
This creates a conflict.
net80211 still in the need to be able to express BW_320 in an uint8_t
will likely be fine with the current solution as well. Rename the
enum and prefixes in net80211 to "net80211" instead of "ieee80211".
Apart from the names/prefix we leave the values the same.
In LinuxKPI add the enum with the expected name and use it there
throughout to make modern versions of LinuxKPI based wifi drivers
compile.
[6 lines not shown]
cxgbe(4): Fix inverted test in sysctl_loadavg
Only internal debug firmwares report the μP load averages so this bug
did not affect regular users.
Fixes: e19d84979a18cxgbe(4): Block most access to the hardware as soon as the adapter stops.
MFC after: 1 week
Sponsored by: Chelsio Communications
netgraph: teach ngctl to attach and run itself in a jail
Add -j <jail> flag to ngctl to allow ngctl to attach and run inside
a jail. This allow parent to manipulate netgraph nodes in the jail
even if ngctl is not available.
Submitted by: David Marker <dave_freedave.net>
Reviewed by: kevans, zlei, jamie
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D50241
rc: bluetooth: startup improvements
During startup hccontrol reset needs to be run multiple times
for iwbt to work more reliably. Add a loop trying up to
three times.
Tested by: various (original version; I changed test to -eq)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44861
Supercharge the most beautiful console font ever with +4300 glyphs.
I have increased the glyphs from 502 to 4885. Major additions:
* Greek
* Cyrillic
* International Phonetic Association Extensions
* Extended Latin characters
* Zapf Dingbats
* Tons of arrows
* Tons of mathematical symbols
* Letterlike symbols and enclosed alphanumerics
* Pixel-perfect box drawing
* Currency symbols
* More punctuation
* Just enough Katakana to say コンニチハ
* Powerline glyphs in the Private Use Area at U+e0a0
I have tried hard to keep the look of the font for Greek and Cyrillic
[10 lines not shown]
patch: fix pch_context() for unified diffs with no leading context
When the first line of a file is a removal, we may not have any leading
context. Only adjusting p_context if context > 0 means that we
incorrectly believe that we have 100 lines of context when the reality
is that we have none.
This fixes a bug with fuzz-checking, which ends up fuzzing away the line
we're trying to replace if it's the first line in the file. We use
pch_context() to determine a reasonable max-fuzz.
PR: 250511
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D51837
patch: test for unified diffs with spaces in filenames
The older GNU patch that we had in base did not properly handle spaces
in filenames in unified diffs, but bsdpatch seems to have handled this
fine at least since the version we imported into base initially. Add a
test with spaces in the filename specifically to be sure.
PR: 181272
LinuxKPI: skbuff: checksum offloading flags
Given the checksum offloading flags are mutually exclusive and are
not a bit mask, we can compress them into 2 bit for the four possible
values. Change the define but leave the type at uint8_t for now with
a comment. We can possible combine them with another sub-octet field
in the future.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
TPM: Add hint check to skip TPM IRQ configuration
Added use_polling hint check in tpm tis driver attach routine
to skip TPM IRQ configuration and to use TPM poll method
to get TPM operation status
Reviewed by: imp
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D52048
libifconfig: Add netlink based helper to bring the interface up/down
Adds `ifconfig_set_up()` to set and unset the `IFF_UP`
on a network interface using `RTM_NEWLINK`.
Sponsored by: Google LLC (GSoC)
Reviewed by: obiwac, mckusick (mentor), kp
Approved by: obiwac, mckusick (mentor), kp
Differential Revision: https://reviews.freebsd.org/D52128
vt: Remove FONT specification from INDEX files
There is no reason to change the font in order to select a keymap or a
font.
This was done in the syscons(4) era to ensure that a font with the
appropriate character set was used for kbdmap or vidfont's localized
menu, but vt is always UTF-8 and this is no longer necessary.
PR: 235565
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51640
(cherry picked from commit bf426b859bda58a1d6598bb9516ffc6692b2502f)
ssh: Reduce sshd_config diffs against OpenSSH 10.0p2
Upstream had a poor description for KbdInteractiveAuthentication prior
to the 10.0p2 release. We use KbdInteractiveAuthentication for PAM
authentication, and we replaced the poor description with a note about
use by PAM.
In 10.0p2 the upstream description has been fixed. Incorporate that
text now as it is an improvement and avoids a conflict in the upcoming
10.0p2 import.
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 8be24d80adb4ba998240c1b5e20e678852dc0a05)
flua: clean up lposix argument checking
The key insight here is that the luaL_check*() and luaL_opt*() functions
will happily take indexes that are larger than the stack top and print a
useful error message.
This means that there is no need to check if too few arguments have been
received prior to checking the types of individual arguments.
This patch also replaces a couple reimplementations of luaL_opt*()
functions with the luaL helpers.
References: https://www.lua.org/manual/5.4/manual.html#4.1.2
Reviewed by: emaste, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50273
(cherry picked from commit 5437b0ff6d557daf6c35e1307a5737139bc12f9a)
rpc.h: Remove reference to unimplemented DES ioctls
We won't be adding support for hardware DES. Remove the #ifdef notdef
block.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c143ffbaf787f6c1d7fcbae8f5d9299182ff0b85)
flua: lposix: add fnmatch function
The fnmatch function matches a string against a shell-style filename
pattern. It is a complex function and cannot easily be implenented
using regular expressions. Adding fnmatch to flua increases the amd64
binary by less than 1 KB.
Approved by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46849
(cherry picked from commit f35ccf46c7c6cb7d26994ec5dc5926ea53be0116)
flua: lposix: add more useful functions for general purpose scripts
unistd:
- _exit
- close
- fork
- getpid
- pipe
- read
- write
libgen:
- basename, dirname
stdlib:
- realpath
These are sufficient for a number of real world scenarios. In our first
application of them, we use the libgen+stdlib additions to grab the
[7 lines not shown]
Fix the cross-build after recent commits
- Provide a sys/md4.h in the cross-build environment to fix bootstrap
of libmd.
- flua now exposes WTRAPPED which isn't incredibly common- make it
conditional, we probably won't be using it in any bootstrap context
any time soon.
Fixes: 442e0975ee4b3 ("Consolidate md4 implementations written in C")
Fixes: c2caf3b3313fe ("flua: posix: add more useful functions [...]")
(cherry picked from commit aad507854efd13c4387394e88d5667cc6f060933)
w: Fix idle time in json output, add login/idle times to json output
Currently the idle time will show as `true` part of the time in the json
output and quoting depends on what is being printed. Make sure it's
always printed correctly and for consistency treated as a string in the
json output.
Login time delta and since times are currently exposed in the xml
output, expose these times in the json output as well.
In the json and xml outputs expose the number of seconds idle as a new
field or attribute respectively.
MFC after: 1 week
Sponsored by: Modirum MDPay
Event: Oslo Hackathon 202508
Differential Revision: https://reviews.freebsd.org/D52237
LinuxKPI: 802.11: sort the fallback to software scan for rtw88
In the special case hardware scan fails to start, we cancel the
scan with net80211 and cleanup our part. In that case we now
sleep and wait for a wakeup. The wakeup was moved to a different
callback function to serve both cases (hw scan cancelled, and
hw scan failed).
In the very special case the hardware scan fails with a return code
of 1, we need to start a software scan. I cannot fully imagine this
ever worked well (some rtw88 chipsets are using this). The trouble
is that the cancael_scan runs in a taskq in net80211 and by the time
we tried to start the new scan, the old one was not fully cleaned up
and finished (or could have been restarted in case we enable bgscan).
So defer starting the software scan to the taskq as well and it will
run once the previous finished. The RTW8821ce I tested with seemed
a lot more happy.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: introduce a debug flag for scan/beacon logging
Split the scan logging up into scan and scan/beacon in order to
not log every beacon if we are trying to debug the scan machinery
but not the actual results.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days