FreeBSD/src c0e26f7share/man/man4 ukbd.4 hkbd.4, sys/dev/hid hkbd.c

hkbd/ukbd: sysctls to swap macbook kbd modifiers

Many applications, desktop environments, window managers & text editors
favor the usage of Alt or Ctrl over Super (Cmd). On a Macbook it is
quite annoying that the Super (Cmd) key gets pride of place by the spacebar.

The standard MacBook Cmd key location only really makes sense for macOS
or maybe in some tiling wm if Mod4/Super is your main modifier.
For most mainstream desktops and window managers, having Alt or Ctrl
in that location makes much much more sense.

This patch adds two sysctls for swapping either Opt(Alt) or Ctrl with Cmd(Super).

Linux has similar sysctls to this; allowing a user to make an Apple
keyboard more "orthodox"/useful at a level that takes effect independent
of typing context - ie) tty, Xorg and/or wayland.

Having a sysctl to do these swaps means that a user doesn't have to faff
about with both creating a custom vt keymap AND figure out which magic

    [8 lines not shown]
DeltaFile
+38-0sys/dev/usb/input/ukbd.c
+38-0sys/dev/hid/hkbd.c
+13-1share/man/man4/ukbd.4
+13-1share/man/man4/hkbd.4
+102-24 files

FreeBSD/src 6260b7dusr.sbin/jls jls.c jls.8

jls: add a -c mode to check for a jail's existence

This is intended to be primarily used in scripts that want to check if
a jail exists before taking some action -- for instance, the jail(8)
test cleanup functions that want to remove the jail if it still exists.
Having a mode that limits its output for their usage is useful both
for cleaner scripts and also to avoid masking real problems.

Reviewed by:    jamie

(cherry picked from commit 1d8590371049bb14a6410fa83cd03d9eca32f764)
DeltaFile
+44-4usr.sbin/jls/jls.c
+18-2usr.sbin/jls/jls.8
+62-62 files

FreeBSD/src 0985637usr.sbin/jls jls.c

jls: minor simplification to arg handling

It's easier to reason about the state of argc/argv if we just augment
them by optind after our getopt() loop.

No functional change, but this sets the stage for another change to add
a `-c` mode to (c)heck for the existence of a jail quietly without
the caller having to worry about spurious output.

Reviewed by:    jamie

(cherry picked from commit dbaaadd4373a725950ad11e578dab61537b7c4f2)
DeltaFile
+6-4usr.sbin/jls/jls.c
+6-41 files

FreeBSD/src a3af06dusr.sbin/jls jls.c

jls(8): Complete libxo transition

Reviewed by:    des

(cherry picked from commit 20bb77c4b91837837dbccc40c9cc90eb43026131)
DeltaFile
+3-3usr.sbin/jls/jls.c
+3-31 files

FreeBSD/src c84d08ausr.sbin/jail command.c

jail: fix crash with startup commands on a jail without name

Jail name is optional, thus don't try setenv(NULL).

Fixes:  d8f021add40c321c4578da55dae52fb93c7ccb5f

(cherry picked from commit 78c4f821f43d530ba1f2a6308a64a8483208ebe3)
DeltaFile
+2-2usr.sbin/jail/command.c
+2-21 files

FreeBSD/src 1a4e4e0usr.sbin/jail config.c, usr.sbin/jail/tests jail_basic_test.sh

jail: fix backfilling the "name" for jid-named jails

Using the cfparam variant of add_param() will actually copy the name and
flags from the passed-in param, which I hadn't considered.  We actually
want the name/flags from the "name" param so that we can do variable
expansion against it right after that -- otherwise it cannot be found,
since variable expansion actually searches by name.

While we're here, `jls -e` was the intermediate name for `jls -c` that
never saw the light of the day.  Fix our existence test.

Reviewed by:    jamie
Fixes:  02944d8c49 ("jail: consistently populate the KP_JID [...]")

(cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7)
DeltaFile
+14-1usr.sbin/jail/tests/jail_basic_test.sh
+1-1usr.sbin/jail/config.c
+15-22 files

FreeBSD/src df670d2usr.sbin/jail command.c config.c, usr.sbin/jail/tests jail_basic_test.sh

jail: consistently populate the KP_JID and KP_NAME parameters

The gaps here, specifically, were:
 - When we have to discover a running jail's jid from name, we should
    populate the missing jid param
 - When we populate jid/name from the config, if the name is a jid we
    wouldn't populate the name; now we do both.
 - When we create a jail, we should populate jid and name with whatever
    details we have now that we didn't both.

As a consequence, we can cleanup a few things:
 - vnet.interface and zfs.dataset can just always use the jid
 - Trying to populate JNAME should always work now, where it would be
    a little crashy before if you create a jail that didn't have a name
    or jid on the command line
 - We can simplify the just-prior JID population now that we'll keep a
    stringified jid in our intparams.

This primarily fixes the below, but the issues with vnet.interface and

    [6 lines not shown]
DeltaFile
+129-0usr.sbin/jail/tests/jail_basic_test.sh
+25-11usr.sbin/jail/command.c
+12-1usr.sbin/jail/config.c
+7-0usr.sbin/jail/jail.c
+173-124 files

FreeBSD/src 28b8f26usr.sbin/jail/tests jail_basic_test.sh commands.jail.conf

jail: tests: cleanup the commands test a bit

We shouldn't be doing setup in a head() function, as this can cause
various problems.  For instance, in this case, it caused test listing
to fail in some cases if we didn't get to execute the cleanup properly
by complaining to stderr if the directory could not be created.

Switch to using atf_check for sanity checking stdout; most of these
expressions are self-explanatory and will make it clear what the problem
is.

commands.jail.conf contains a hard-coded path that we can avoid, which
is probably good to avoid weird conflicts if other tests try to copy it
and do the same.  Just make a copy of our jail.conf and add the test's
$PWD to it to get a generally unique jail root.

Finally, simplify the cleanup handler a bit.

Reviewed by:    jamie

    [2 lines not shown]
DeltaFile
+20-15usr.sbin/jail/tests/jail_basic_test.sh
+0-2usr.sbin/jail/tests/commands.jail.conf
+20-172 files

FreeBSD/src eefbf74usr.sbin/jail jail.8 command.c, usr.sbin/jail/tests jail_basic_test.sh commands.jail.conf

jail: add JID, JNAME and JPATH to environment for exec.* commands

Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.

In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.

These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.

Reviewed by: imp

(cherry picked from commit d8f021add40c321c4578da55dae52fb93c7ccb5f)
DeltaFile
+21-0usr.sbin/jail/jail.8
+13-1usr.sbin/jail/command.c
+9-2usr.sbin/jail/tests/jail_basic_test.sh
+3-0usr.sbin/jail/tests/commands.jail.conf
+46-34 files

FreeBSD/src 8d68038usr.sbin/jail/tests jail_basic_test.sh

jail: tests: cosmetic-ish improvements

The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.

These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.

Co-authored-by: ngie
DeltaFile
+2-1usr.sbin/jail/tests/jail_basic_test.sh
+2-11 files

FreeBSD/src 1f41f56. Makefile.inc1

makeman: switch over to the .lua implementation

Nobody will test it as long as it's not tied into the top-level target,
and we don't really have a good reason not to cut over to it since it
does produce identical results.  Switch over but do not remove the old
sh implementation yet, just in case.

Note that this replacement is driven by a significant speedup from how
the new version is designed: tha lua version actually tries to
parallelize its data collection efforts to speed up generation.

Reviewed by:    imp (previous version), emaste
Differential Revision:  https://reviews.freebsd.org/D56558
DeltaFile
+9-7Makefile.inc1
+9-71 files

FreeBSD/src 06a51a5sys/compat/linuxkpi/common/include/linux gfp.h, sys/compat/linuxkpi/common/src linux_page.c

linuxkpi: Implement __GFP_THISNODE in alloc_pages()

It indicates to `alloc_pages()` to allocate the pages from the current
NUMA domain. If it couldn't, it should not retry elsewhere and return
failure.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56590
DeltaFile
+12-3sys/compat/linuxkpi/common/src/linux_page.c
+1-1sys/compat/linuxkpi/common/include/linux/gfp.h
+13-42 files

FreeBSD/src bc537e9lib/libc/string fls.c flsl.c

libc/fls*.c: use *_WIDTH macros over CHAR_BIT * sizeof(type)

Makes the code easier to understand.

MFC after:      1 week
DeltaFile
+1-1lib/libc/string/fls.c
+1-1lib/libc/string/flsl.c
+1-1lib/libc/string/flsll.c
+3-33 files

FreeBSD/src 5cfbcaasys/dev/dpaa2 dpaa2_ni.c dpaa2_rc.c

dpaa2: ni: add more stats and link information

In addition to the locally generated statistics counters, dpaa2 ni
provides a larger set of counters than we currently export via
sysctl.  Add (most of) the missing counters and descriptions.
Around Page 3/4 there are some things left to do if we want.
Also the manual was not clear on the descriptions of 3/0 and 3/1.

The second half of the change adds another sysctl note which exports
the link-state, speed, and capabilities set as a text-blob.  This is
especially interesting in case the "ni" stops passing packets.
From what I have found in that case the (internal) link state of the
ni goes DOWN but we do not see an interrupt for a link-state change.

Being able to diagnose the state helps to (manually) fix it for now
by changing the media status to 10BaseT or none and then back to auto.
That usually brings the internal link state back UP.

PR:             279352

    [4 lines not shown]
DeltaFile
+113-16sys/dev/dpaa2/dpaa2_ni.c
+5-4sys/dev/dpaa2/dpaa2_rc.c
+2-3sys/dev/dpaa2/dpaa2_ni.h
+120-233 files

FreeBSD/src 0705da1release/tools ec2-builder.conf ec2-small.conf

Revert "EC2: Add clibs-lib32 pkg to small/builder images"

This should no longer be necessary after 2018ae4e3b6a.

This reverts commit cfe0b7d37e552d78762c029f5b15e0f36d9d0d38.

(cherry picked from commit fa31e76a4c147eb5148595c9f3615040fcac74e5)
DeltaFile
+0-1release/tools/ec2-builder.conf
+0-1release/tools/ec2-small.conf
+0-22 files

FreeBSD/src f6e1f27lib/msun/src s_nextafterl.c s_nexttowardf.c

lib/msun: Replace manual checks with isnan() calls

The maximum and minimum functions, as well as nextafter and nexttoward,
were using manual NaN checks instead of the isnan() macro.

PR:             294692
Reviewed by:    fuz, kargl
MFC after:      1 month
DeltaFile
+4-6lib/msun/src/s_nextafterl.c
+4-5lib/msun/src/s_nexttowardf.c
+4-5lib/msun/src/s_nexttoward.c
+4-4lib/msun/src/s_nextafter.c
+4-4lib/msun/src/s_nextafterf.c
+2-2lib/msun/src/s_fminf.c
+22-2623 files not shown
+56-7229 files

FreeBSD/src af01ffbsys/compat/linuxkpi/common/include/linux gfp.h

linuxkpi: Define `GFP_KERNEL_ACCOUNT` flag

This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also
defined in this commit. It is defined as a no-op flag as it is not
implemented.

The DRM generic code started to use it in Linux 6.12.x.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56587
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/gfp.h
+2-01 files

FreeBSD/src fb7df70tools/build/mk OptionalObsoleteFiles.inc

Remove all of /usr/tests/share/examples/... when MK_EXAMPLES == no

- Remove the generated files (`file1`).
- Remove the top-level example `Kyuafile`.

MFC after:      1 week
DeltaFile
+4-0tools/build/mk/OptionalObsoleteFiles.inc
+4-01 files

FreeBSD/src d1c800b. UPDATING, sys/sys param.h

UPDATING: Bump __FreeBSD_version to 1500508

Bump __FreeBSD_version to 1500508 for LinuxKPI to be able to track
changes to eventfd, changes for DRM 6.11, changes of LinuxKPI 802.11
based on Linux v7.0.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0UPDATING
+1-1sys/sys/param.h
+6-12 files

FreeBSD/src eb82fb1sys README.md

sys/README: update README.md

Add missing directories and fix alphabetical ordering

Signed-off-by:  Minsoo Choo <minsoo at minsoo.io>
Sponsored by:   FreeBSD Foundation
Reviewed by:    imp, mhorne, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2146
DeltaFile
+19-2sys/README.md
+19-21 files

FreeBSD/src b9495bdtools/build/mk OptionalObsoleteFiles.inc

Preen/update list for share/examples/sound under `MK_EXAMPLES`

- Update sources to match current installed files list. This involved
  adding and removing some example files.
- Sort the list alphabetically so it'll be easier to spot future updates.

MFC after:      1 week
DeltaFile
+7-3tools/build/mk/OptionalObsoleteFiles.inc
+7-31 files

FreeBSD/src dd8d3aesys/modules/ath12k Makefile

ath12k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Handle the file changes and the extra wifi7/ subdirectory.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 5cfadb6633128dccc32b1e4f84386ad705adc721)
DeltaFile
+12-3sys/modules/ath12k/Makefile
+12-31 files

FreeBSD/src 8696cc8sys/contrib/dev/rtw89 core.c

rtw89: fix mismerge

Due to FreeBSD-specific code it seems a code update was not applied
to the FreeBSD part during the v6.17 driver update.
Add the missing lines.

Sponsored by:   The FreeBSD Foundation
Fixes:          b35044b38f74c

(cherry picked from commit adb16cd389c3456cbd538b658c3c0af5145dde91)
DeltaFile
+2-0sys/contrib/dev/rtw89/core.c
+2-01 files

FreeBSD/src bbfa2e7sys/contrib/dev/athk/ath12k dp_mon.c dp_rx.c, sys/contrib/dev/athk/ath12k/wifi7 dp_mon.c hal_desc.h

ath12k: update Atheros/QCA's ath12k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 60bac4d6438b6bcb3d7b439684211d05396d90ce)
DeltaFile
+103-3,414sys/contrib/dev/athk/ath12k/dp_mon.c
+257-3,253sys/contrib/dev/athk/ath12k/dp_rx.c
+3,385-0sys/contrib/dev/athk/ath12k/wifi7/dp_mon.c
+0-3,045sys/contrib/dev/athk/ath12k/hal_desc.h
+2,742-0sys/contrib/dev/athk/ath12k/wifi7/hal_desc.h
+256-2,061sys/contrib/dev/athk/ath12k/hal.c
+6,743-11,77386 files not shown
+28,207-23,80192 files

FreeBSD/src cb309eesys/modules/ath11k Makefile

ath11k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Add optional support for the new cfr (channel frequency response)
file/option.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 20cf11812ac722852322f2f2994698d7a5fa8dc6)
DeltaFile
+7-1sys/modules/ath11k/Makefile
+7-11 files

FreeBSD/src 0bd21f7sys/contrib/dev/broadcom/brcm80211/brcmfmac cfg80211.c pcie.c, sys/contrib/dev/broadcom/brcm80211/brcmsmac main.c

brcm80211: update Broadcom wireless brcmsmac and brcmfmac drivers

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 117d9331fedeb5c5657a796423c4f7b311f40770)
DeltaFile
+14-15sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c
+13-14sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c
+5-10sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+7-8sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c
+6-7sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c
+6-6sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c
+51-6027 files not shown
+106-11233 files

FreeBSD/src 8696b3asys/modules/brcm80211/brcmfmac Makefile, sys/modules/brcm80211/brcmutil Makefile

brcm80211: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 634a48f3673ff8af9848846a6bff1a8c068d205d)
DeltaFile
+1-1sys/modules/brcm80211/brcmutil/Makefile
+1-1sys/modules/brcm80211/brcmfmac/Makefile
+2-22 files

FreeBSD/src 24c9bc6sys/contrib/dev/athk/ath11k cfr.c cfr.h

ath11k: update Atheros/QCA's ath11k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 4ed5b949d5e25456124a4d280d27e9719f90e9be)
DeltaFile
+1,022-0sys/contrib/dev/athk/ath11k/cfr.c
+308-0sys/contrib/dev/athk/ath11k/cfr.h
+154-13sys/contrib/dev/athk/ath11k/wmi.c
+141-1sys/contrib/dev/athk/ath11k/debugfs_sta.c
+96-12sys/contrib/dev/athk/ath11k/core.c
+94-3sys/contrib/dev/athk/ath11k/wmi.h
+1,815-2921 files not shown
+1,999-11027 files

FreeBSD/src e38e480sys/modules/ath10k Makefile, sys/modules/athk_common Makefile

athk_common / ath10k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 4546eb0c27f22236be8179616e1f0a3e88ddfbbe)
DeltaFile
+1-1sys/modules/ath10k/Makefile
+1-1sys/modules/athk_common/Makefile
+2-22 files

FreeBSD/src 4208012sys/contrib/dev/athk/ath10k snoc.c wmi.c

ath10k: update Atheros/QCA's ath10k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 02b46313fd1461338703a1e02c667b8dbcc36237)
DeltaFile
+50-3sys/contrib/dev/athk/ath10k/snoc.c
+16-16sys/contrib/dev/athk/ath10k/wmi.c
+4-8sys/contrib/dev/athk/ath10k/ce.c
+5-5sys/contrib/dev/athk/ath10k/wmi-tlv.c
+4-6sys/contrib/dev/athk/ath10k/mac.c
+5-5sys/contrib/dev/athk/ath10k/qmi.c
+84-436 files not shown
+100-5112 files