FreeBSD/src cba5d7asys/dev/atkbdc atkbd.c

atkbd: Fix first keystroke force reset

Some i8042 falsely return KBD_ACK for ECHO command which cuase the
keyboard echo test failed.
Without passing echo test, the keyboard is considered as unconfigured.

Though it is an incorrect behavior, we still regard it as a
correct to prevent the force reset (a step for configure a keyboard)
of whole keyboard when the first key interrupt reached.

Co-Authored-By: Aymeric Wibo <obiwac at freebsd.org>
Reviewed By:    wulf, obiwac, emaste
Sponsored By:   FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50498
DeltaFile
+13-1sys/dev/atkbdc/atkbd.c
+13-11 files

FreeBSD/src 87c46fasecure/caroot Makefile

caroot: Update certdata URL for GitHub switch

Mozilla has migrated its projects' source code to GitHub, update certdata URL
along with it.

Reference: https://github.com/curl/curl/pull/17321

Reviewed by:    jrm (mentor), otis (mentor), kevans
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D50575
DeltaFile
+1-1secure/caroot/Makefile
+1-11 files

FreeBSD/src a0d22d7contrib/llvm-project/libcxx/include/__locale_dir locale_base_api.h

libc++: fix compiling <locale> with -fmodules

In /usr/include/c++/v1/__locale_dir/locale_base_api.h, xlocale.h is
included without first including stdio.h and stdlib.h, which causes
functions like strtoll_l() or sscanf_l() to not be declared.

When compiling with -fmodules, locale_base_api.h is processed separately
due to a declaration in /usr/include/c++/v1/module.modulemap, and this
will cause errors due to the above undeclared symbols.

Meanwhile, upstream has substantially reorganized this part of libc++'s
headers, so apply a minimalistic workaround: specifically when compiling
with -fmodules, add includes of stdio.h and stdlib.h.

PR:             286342
Approved by:    re (cperciva)
MFC after:      1 week

(cherry picked from commit c809b0184d0a6543bc5327d4252fa56a07ce4689)
(cherry picked from commit cab029073dc6cb5814df44556e585b8fdb1c9846)
DeltaFile
+7-1contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h
+7-11 files

FreeBSD/src ef06202sys/dev/igc if_igc.c

igc: Fix some issues in igc_neweitr()

The justification is the same as in commit
fb876eef219e ("e1000: Fix some issues in em_newitr()").

Reviewed by:    kbowling
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50548
DeltaFile
+22-18sys/dev/igc/if_igc.c
+22-181 files

FreeBSD/src a5dac34tests/sys/kern jail_lookup_root.c Makefile

tests: Add a regression test for commit 7587f6d4840f8

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50533
DeltaFile
+133-0tests/sys/kern/jail_lookup_root.c
+2-0tests/sys/kern/Makefile
+135-02 files

FreeBSD/src e05e330sys/kern vfs_vnops.c

vfs: Don't clobber namei flags in vn_open_cred()

Otherwise NAMEILOOKUP is cleared.  More generally it seems quite
surprising that the flags set by vn_open_cred() callers are not
automatically preserved.  Modify open2nameif() such that it takes
already-set namei flags into account.

Reviewed by:    olce, kib
Fixes:          7587f6d4840f ("namei: Make stackable filesystems check harder for jail roots")
Differential Revision:  https://reviews.freebsd.org/D50531
DeltaFile
+14-8sys/kern/vfs_vnops.c
+14-81 files

FreeBSD/src d6a9f49sys/dev/igc if_igc.c

igc: Initialize helper variables in igc_neweitr()

The justification is the same as in commit
a5b5220b1807 ("e1000: Initialize helper variables in em_newitr()").

Reviewed by:    kbowling
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50547
DeltaFile
+1-0sys/dev/igc/if_igc.c
+1-01 files

FreeBSD/src 71186b6sys/amd64/ia32 ia32_exception.S

amd64: revert unintended changes in ia32_exception.S

The result was the missed %r8 restore into the protected mode context,
which is innocent.

Fixes:  ddab534cd6f6557740c24ff2019642880ad8bef6
Reported by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-1sys/amd64/ia32/ia32_exception.S
+2-11 files

FreeBSD/src 7171e59sys/amd64/amd64 ptrace_machdep.c, sys/x86/include ptrace.h

amd64: add ptrace PT_{GET,SET}TLSBASE requests

Tested by:      pho
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+21-0sys/amd64/amd64/ptrace_machdep.c
+2-0sys/x86/include/ptrace.h
+23-02 files

FreeBSD/src aef025flibexec/rtld-elf/amd64 reloc.c, sys/x86/include tls.h

amd64: switch to amd64_set_tlsbase to set tls base

Reported and tested:    Alex S <iwtcex at gmail.com>
Tested by:      pho
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+4-2libexec/rtld-elf/amd64/reloc.c
+1-1sys/x86/include/tls.h
+5-32 files

FreeBSD/src ddab534sys/amd64/amd64 exception.S cpu_switch.S, sys/amd64/ia32 ia32_exception.S

amd64: do not handle fs/gs bases conditionally on the selector

For machines with RDFSBASE support, we only saved and restored fs and gs
base registers when corresponding segment register contained the
predefined value.  This breaks some valid uses of the LDT together with
WR{F,G}SBASE.

Unconditionally save bases, and restore them on return to usermode.  The
PCB_FULL_IRET optimization is still in place.

Reviewed by:    markj, olce
Reported and tested:    Alex S <iwtcex at gmail.com>
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50414
DeltaFile
+0-29sys/amd64/amd64/exception.S
+0-6sys/amd64/amd64/cpu_switch.S
+2-4sys/amd64/amd64/machdep.c
+1-2sys/amd64/ia32/ia32_exception.S
+3-414 files

FreeBSD/src 68ba38dsys/amd64/amd64 sys_machdep.c vm_machdep.c, sys/amd64/include pcb.h

amd64: add pcb_tlsbase

This is a value for TLS base that would be explicitly set by user.
It is forced into the fsbase register on entry to signal handler, making
TLS in the handler usable even if userspace uses segmentation.

Reported and tested:    Alex S <iwtcex at gmail.com>
Tested by:      pho
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+15-0sys/amd64/amd64/sys_machdep.c
+4-4sys/amd64/amd64/vm_machdep.c
+4-3sys/amd64/linux32/linux32_sysvec.c
+4-2sys/amd64/amd64/exec_machdep.c
+3-1sys/amd64/include/pcb.h
+1-1sys/amd64/linux/linux_sysvec.c
+31-112 files not shown
+34-118 files

FreeBSD/src 2e7cf77lib/libsys/amd64 amd64_set_tlsbase.c Symbol.sys.map, sys/x86/include sysarch.h

amd64: add amd64_set_tlsbase(3)

Tested by:      pho
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+51-0lib/libsys/amd64/amd64_set_tlsbase.c
+4-0lib/libsys/amd64/Symbol.sys.map
+1-0lib/libsys/amd64/Makefile.sys
+1-0sys/x86/include/sysarch.h
+57-04 files

FreeBSD/src 0ec7329sys/sys param.h

Bump __FreeBSD_version and provide P_OSREL_TLSBASE for amd64 set_tlsbase

Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+2-1sys/sys/param.h
+2-11 files

FreeBSD/src eea3e4dsys/amd64/amd64 exec_machdep.c, sys/x86/include ucontext.h frame.h

amd64: add mc_tlsbase member to mcontext

Tested by:      pho
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50482
DeltaFile
+6-2sys/x86/include/ucontext.h
+6-0sys/amd64/amd64/exec_machdep.c
+1-0sys/x86/include/frame.h
+13-23 files

FreeBSD/src 08471a7sbin/ifconfig ifieee80211.c

ifconfig: 802.11: fix a warning message

s/can/cannot/

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D50552
DeltaFile
+1-1sbin/ifconfig/ifieee80211.c
+1-11 files

FreeBSD/src 54d0e17sys/compat/linuxkpi/common/include/linux stddef.h

LinuxKPI: add struct_group_tagged()

Restructure struct_group() into a wrapper around __struct_group().
Various callers have arguments annotated as /* no foo */ so try to
add all we can find.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D50157
DeltaFile
+21-5sys/compat/linuxkpi/common/include/linux/stddef.h
+21-51 files

FreeBSD/src 32af70fsys/net80211 ieee80211_scan.c ieee80211_ioctl.c

net80211: make sure to not start a BGSCAN if not enabled

On drivers not supporting background scanning (not having announced
IEEE80211_C_BGSCAN) we repeatedly have seen scanning issues and
BGSCAN was "on" according to, e.g., ddb show com /a.

Turns out there are multiple problems:
(a) the ioctl scanreq code can pass IEEE80211_[IOC_]SCAN_BGSCAN in
    (ifconfig wlanX scan will do so by default).  That flag ends up
    on flags in the scanning code which have no other checks, and
    we are doing a BGSCAN.
    So make sure BGSCAN is announced by the driver and enabled
    (and it's STA mode for the full check) or filter the BGSCAN out.

(b) ieee80211_bg_scan() never checked if background scanning was
    available/enabled.  Do so now.

(c) ieee80211_swscan_start_scan_locked() as a consequence of (a) would
    start the BGSCAN unconditionally.  Also check for BGSCAN to be

    [11 lines not shown]
DeltaFile
+13-0sys/net80211/ieee80211_scan.c
+12-0sys/net80211/ieee80211_ioctl.c
+7-1sys/net80211/ieee80211_scan_sw.c
+32-13 files

FreeBSD/src f143056share/man/man4 ddb.4, sys/netinet tcp_usrreq.c

ddb: add show all tcpcbs

Add a command to show all TCP control blocks. Also provide an option
to limit the output to TCP control blocks, which are locked.
The plan is to run show all tcpcbs/l when syzkaller triggers a panic.
If a TCP control block is affected, it is most likely locked and
therefore the command shows the information of the affected TCP
control block.

Reviewed by:            markj, thj
Tested by:              thj
MFC after:              1 week
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D50516
DeltaFile
+23-0sys/netinet/tcp_usrreq.c
+9-1share/man/man4/ddb.4
+32-12 files

FreeBSD/src 5c10e8elib/libc/sys open.2

open.2: add a note about conversion of a file descriptor into O_PATH

(cherry picked from commit fae33d1d12a51ca2bbdc7f5f189f7a4362fb48f7)
DeltaFile
+7-0lib/libc/sys/open.2
+7-01 files

FreeBSD/src 8d4f495sys/netinet tcp_usrreq.c

ddb: improve show tcpcb

Print the name of the TCP function block and the name of the
congestion control algorithm. Furthermore, print some information
related to Black Box Logging.

Reviewed by:            thj
MFC after:              1 week
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D50535
DeltaFile
+52-0sys/netinet/tcp_usrreq.c
+52-01 files

FreeBSD/src 969f6c6sys/dev/iwx if_iwx.c

if_iwx: use net80211 suspend and resume methods

Use net80211 suspend and resume methods when entering and leaving
suspend. Move the resume action outside of the IWX_LOCK.

Re-assert disabling the PCI timeout, this is copied from OpenBSD (and a
common pattern), but it doesn't seem to hurt.

PR:             286059
Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50462
DeltaFile
+17-7sys/dev/iwx/if_iwx.c
+17-71 files

FreeBSD/src 28345b1sys/dev/iwx if_iwx.c

if_iwx: Make firmware load error messages clearer

Try to make it clearer where the errors are coming from in the iwx
firmware load path. In particular make it clearer that transferring
firmware to the card failed, not the loading of firmware.

Hide the init firmware failed message behind a debug level, there are
other errors which will show already in this path and for most people
this doesn't add much.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49826
DeltaFile
+4-3sys/dev/iwx/if_iwx.c
+4-31 files

FreeBSD/src f131f3ctools/ifnet convert_ifapi.sh

convert_ifapi: handle the special case of getting interface name

Reviewed by:    jhibbits
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50445
DeltaFile
+1-1tools/ifnet/convert_ifapi.sh
+1-11 files

FreeBSD/src 18a6213sys/vm vm_object.c

vm_object: use lookup_range in page_clean_flush

In vm_object_page_clean_flush, replace the loop that uses
vm_radix_iter_next to visit consecutive pages with a call to
vm_radix_iter_lookup_range, then a loop to check the pages looked-up.
This achieves a small performance improvement.

Reviewed by:    alc
Differential Revision:  https://reviews.freebsd.org/D50425
DeltaFile
+5-4sys/vm/vm_object.c
+5-41 files

FreeBSD/src 93839cdusr.bin/systat main.c, usr.bin/top machine.c

systat/top: Update ZFS sysctl names

Some of ARC statistic sysctls changed years ago, but those tools
are still using legacy shims, that are going to be removed.

Approved by:    re (cperciva)

(cherry picked from commit 8aad1e6148d3389df100bb0391e2d3a909f26ecf)
(cherry picked from commit f23326ff2c7cad9579061291b6de7feb5ea7302a)
DeltaFile
+3-3usr.bin/systat/main.c
+3-3usr.bin/top/machine.c
+6-62 files

FreeBSD/src d094dd9tests/sys/kern/tty test_sti.c Makefile

tests: kern: add some tests for TIOCSTI

These offer at least rudimentary coverage of TIOCSTI, ensuring that it
basically works and does what it's described to do and throws errors for
unprivileged use that is supposed to be blocked.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D50507
DeltaFile
+337-0tests/sys/kern/tty/test_sti.c
+3-0tests/sys/kern/tty/Makefile
+340-02 files

FreeBSD/src 59fc4cdsys/kern tty.c

kern: tty: refactor TIOCSTI privilege checks slightly

This removes some repetition from it and makes the flow a little more
obvious.  Future work may find some way to add more constraints to the
unprivileged path, add a security sysctl to disable it, or perhaps
some combination of the two.

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D50506
DeltaFile
+21-5sys/kern/tty.c
+21-51 files

FreeBSD/src adef361share/examples/smbfs Makefile Makefile.inc, share/examples/smbfs/print Makefile

packages: move smbfs examples to the smbutils package

Reviewed by:    manu, des
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D50285
DeltaFile
+1-1share/examples/smbfs/Makefile
+1-0share/examples/smbfs/Makefile.inc
+0-1share/examples/smbfs/print/Makefile
+2-23 files

FreeBSD/src f947f58. UPDATING, release/packages Makefile.package

packages: rename elftoolchain to toolchain, add more things

Rename the existing "elftoolchain" package to "toolchain", and move
everything which is gated by MK_TOOLCHAIN (e.g. lex, yacc, ...) to the
toolchain package.

This means we have one package called "toolchain" which contains all the
development-related utilities which are not compilers or already part of
some other package (e.g., llvm).

Reviewed by:    des, emaste
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D50286
DeltaFile
+9-3UPDATING
+2-2release/packages/Makefile.package
+1-1usr.bin/elfcopy/Makefile
+1-1usr.bin/nm/Makefile
+1-1usr.bin/readelf/Makefile
+1-1usr.bin/size/Makefile
+15-918 files not shown
+34-1124 files