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
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
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)
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
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
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
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
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
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
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
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
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
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]
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
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
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
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
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
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
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)
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
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
packages: move smbfs examples to the smbutils package
Reviewed by: manu, des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50285
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