FreeBSD/src 17c0ecbcontrib/llvm-project/llvm/lib/Target/PowerPC PPCMergeStringPool.cpp

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]
DeltaFile
+3-2contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
+3-21 files

FreeBSD/src 99ea229contrib/llvm-project/llvm/lib/Target/PowerPC PPCMergeStringPool.cpp

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]
DeltaFile
+3-2contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
+3-21 files

FreeBSD/src 06527b2sys/compat/linuxkpi/common/include/linux ieee80211.h, sys/dev/ath/ath_rate/sample sample.c

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]
DeltaFile
+17-17sys/net80211/ieee80211_node.h
+15-15sys/net80211/ieee80211_phy.c
+10-10sys/net80211/ieee80211_vht.c
+8-8sys/net80211/ieee80211_ht.c
+4-4sys/dev/ath/ath_rate/sample/sample.c
+8-0sys/compat/linuxkpi/common/include/linux/ieee80211.h
+62-5410 files not shown
+83-7516 files

FreeBSD/src 0490757sbin/veriexec veriexec.8

veriexec.8: Fix a typo in the manual page

- s/detatched/detached/

MFC after:      3 days
DeltaFile
+1-1sbin/veriexec/veriexec.8
+1-11 files

FreeBSD/src 99f3c68sys/dev/cxgbe t4_main.c

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:  e19d84979a18 cxgbe(4): Block most access to the hardware as soon as the adapter stops.
MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+1-1sys/dev/cxgbe/t4_main.c
+1-11 files

FreeBSD/src 72d01e6usr.sbin/ngctl main.c ngctl.8

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
DeltaFile
+35-6usr.sbin/ngctl/main.c
+23-2usr.sbin/ngctl/ngctl.8
+5-0usr.sbin/ngctl/Makefile
+63-83 files

FreeBSD/src c4fed7dsys/fs/tarfs tarfs_vnops.c

tarfs: add missing set of eofflag in early return, discovered on aarch64

Reviewed by:    stevek
Obtained from:  Juniper Networks, Inc.
DeltaFile
+4-0sys/fs/tarfs/tarfs_vnops.c
+4-01 files

FreeBSD/src 40652f8libexec/rc/rc.d bluetooth

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
DeltaFile
+11-2libexec/rc/rc.d/bluetooth
+11-21 files

FreeBSD/src 9e8c1abshare/vt/fonts gallant.hex

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]
DeltaFile
+4,102-19share/vt/fonts/gallant.hex
+4,102-191 files

FreeBSD/src f97b6a8usr.bin/patch pch.c, usr.bin/patch/tests unified_patch_test.sh

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
DeltaFile
+21-0usr.bin/patch/tests/unified_patch_test.sh
+1-1usr.bin/patch/pch.c
+22-12 files

FreeBSD/src cc36624usr.bin/patch/tests unified_patch_test.sh

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
DeltaFile
+18-0usr.bin/patch/tests/unified_patch_test.sh
+18-01 files

FreeBSD/src 343f8f7sys/compat/linuxkpi/common/include/linux skbuff.h

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
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/skbuff.h
+2-21 files

FreeBSD/src e2f492asys/dev/tpm tpm_tis_core.c

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
DeltaFile
+7-0sys/dev/tpm/tpm_tis_core.c
+7-01 files

FreeBSD/src 0b607a0sys/arm64/arm64 elf32_machdep.c

fix mispelling in panic msg

Obtained from:  Juniper Networks, Inc.
DeltaFile
+1-1sys/arm64/arm64/elf32_machdep.c
+1-11 files

FreeBSD/src 94ed4c1lib/libifconfig libifconfig_nl.c libifconfig.h

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
DeltaFile
+72-0lib/libifconfig/libifconfig_nl.c
+11-0lib/libifconfig/libifconfig.h
+1-0lib/libifconfig/Makefile
+84-03 files

FreeBSD/src 2e6697cusr.bin/pom pom.c

pom: Cache tzdata before entering capability mode

Pom uses localtime() so needs tzdata available.

PR:             278574
Reported by:    Tatsuki Makino
Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51521

(cherry picked from commit 0fde36fe04b2b656a2215f7dad07a52884e8dcfd)
(cherry picked from commit 05459c1b860c086ada0cacb398fa5d61a240e0ca)
DeltaFile
+1-0usr.bin/pom/pom.c
+1-01 files

FreeBSD/src 9d80d2fshare/vt/fonts INDEX.fonts, share/vt/keymaps INDEX.keymaps

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)
DeltaFile
+0-8share/vt/fonts/INDEX.fonts
+0-8share/vt/keymaps/INDEX.keymaps
+0-162 files

FreeBSD/src 6ecbe44. Makefile.inc1

Makefile.inc1: Fix typo

Signed-off-by: Elyes Haouas <ehaouas at noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/882
(cherry picked from commit f092a54fdc6d394d510451ed0429f78abe0f3a55)
DeltaFile
+1-1Makefile.inc1
+1-11 files

FreeBSD/src 1105ee9crypto/openssh sshd_config

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)
DeltaFile
+5-2crypto/openssh/sshd_config
+5-21 files

FreeBSD/src b0e655blibexec/flua/modules lposix.c

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)
DeltaFile
+43-68libexec/flua/modules/lposix.c
+43-681 files

FreeBSD/src 05459c1usr.bin/pom pom.c

pom: Cache tzdata before entering capability mode

Pom uses localtime() so needs tzdata available.

PR:             278574
Reported by:    Tatsuki Makino
Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51521

(cherry picked from commit 0fde36fe04b2b656a2215f7dad07a52884e8dcfd)
DeltaFile
+1-0usr.bin/pom/pom.c
+1-01 files

FreeBSD/src 330dca2include/rpc des.h

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)
DeltaFile
+0-20include/rpc/des.h
+0-201 files

FreeBSD/src f5f07b9usr.bin/asa asa.1

asa.1: Drop SEE ALSO reference to long-gone f77(1)

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 58d9d2f8daef8f646372efd6e87a7d4f5e05656b)
DeltaFile
+0-2usr.bin/asa/asa.1
+0-21 files

FreeBSD/src d52dc0blibexec/flua linit_flua.c, libexec/flua/modules lposix.c lposix.h

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)
DeltaFile
+41-0libexec/flua/modules/lposix.c
+1-0libexec/flua/linit_flua.c
+1-0libexec/flua/modules/lposix.h
+43-03 files

FreeBSD/src d2be115libexec/flua linit_flua.c, libexec/flua/modules lposix.c lposix.h

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]
DeltaFile
+382-33libexec/flua/modules/lposix.c
+3-0libexec/flua/linit_flua.c
+3-0libexec/flua/modules/lposix.h
+388-333 files

FreeBSD/src 069a046libexec/flua/modules lposix.c, tools/build/cross-build/include/common/sys md4.h

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)
DeltaFile
+91-0tools/build/cross-build/include/common/sys/md4.h
+2-0libexec/flua/modules/lposix.c
+93-02 files

FreeBSD/src eac6f90libexec/flua Makefile

flua: Connect man page

The flua man page was MFC'd but the Makefile update was dropped
accidentally.

(cherry picked from commit 550289771d5cb73befb6a1645fb9cdf0b9fb65a7)

Fixes: d967c87d073d1307dfd51ab9335ead472a05e6bd
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-1libexec/flua/Makefile
+0-11 files

FreeBSD/src 6e6febbusr.bin/w pr_time.c

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
DeltaFile
+19-7usr.bin/w/pr_time.c
+19-71 files

FreeBSD/src ad4ddc8sys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

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
DeltaFile
+80-19sys/compat/linuxkpi/common/src/linux_80211.c
+1-0sys/compat/linuxkpi/common/src/linux_80211.h
+81-192 files

FreeBSD/src a4c17ecsys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

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
DeltaFile
+4-4sys/compat/linuxkpi/common/src/linux_80211.c
+6-0sys/compat/linuxkpi/common/src/linux_80211.h
+10-42 files