libthr: GC pshared locks not more than each 25msecs by default
Provide a tunable env variable to request immediate GC on destroy
to allow to return to the previous behavior.
Based on the report and patch by Atle Solbakken <atle.solbakken at gmail.com>.
PR: 268532
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
linux(4): Fix signal mask restoration in epoll_pwait(2)/epoll_pwait2(2)
Since 80c7315d17ce ("Restore signal mask in epoll_pwait.") the caller's
signal mask is saved in a local variable, but TDP_OLDMASK is still set
and the TDA_SIGSUSPEND AST is still scheduled. On return to user mode
that AST, or postsig() if a signal is delivered, then installs
td_oldsigmask, which this code never writes and which holds whatever
mask the thread had at its last sigsuspend(2), pselect(2) or ppoll(2).
As a result every epoll_pwait(2)/epoll_pwait2(2) call with a non-NULL
sigmask can leave the thread with a stale signal mask. In addition, the
explicit restore at the end overwrote the return value, so EINTR (and
any other error) was reported to user space as 0.
Save the old mask in td_oldsigmask and let the AST restore it, as
kern_pselect() and kern_poll_kfds() do: schedule TDA_SIGSUSPEND if the
wait was interrupted, so the signal is delivered with the temporary mask
in place, and TDA_PSELECT otherwise. This matches Linux, which restores
the saved mask unless the syscall returns -EINTR.
[11 lines not shown]
geom: Document existing --libxo support in the manual pages
The standard list and status subcommands of every GEOM class emit
through libxo, and so does geom -p, but only geom.8 (list, status) and
gpart.8 (show) mentioned it. Mark the list and status forms with
--libxo in all class manual pages, add the option description, and
cross-reference xo_options(7). Also mark geom -p in geom.8.
Only forms whose output already goes through libxo are marked;
class-specific verbs such as gmirror dump still print directly and are
left alone.
Reviewed by: adrian, bcr, carlavilla, des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D59574
tpm: Do not use timed tsleep() while polling during cold boot
Commit 4e0f283fb97a made tpm_tis12_init() wait for TPM_STS_CMD_READY
after aborting any command. The wait is implemented by the driver's
existing tpm_waitfor_poll() loop, which sleeps with a one-tick tsleep()
between status reads. Until now, that loop only ran from the resume and
command paths after boot. From tpm_attach() it can panic with "timed
sleep before timers are working" when the TPM is attached from ACPI
during cold boot and the chip does not report ready on the first status
read.
Before 4e0f283fb97a, tpm_tis12_init() wrote TPM_STS_CMD_READY and
returned without waiting, so the polling loops only ran after boot.
tpm_request_locality() had the same latent hazard but its fast path
returns before sleeping whenever locality is already active.
Nothing calls wakeup() on the channels used by these polling loops, so
the sleeps are pure delays. Use pause_sig(), which falls back to
DELAY() while the kernel is cold and returns EWOULDBLOCK, a value these
[10 lines not shown]
evdev: map ChromeOS "Vivaldi" top-row action keys
Chromebook keyboards driven by the ChromeOS EC emit the top-row action
keys as scancode set 1 codes 0xE0 0x11 - 0xE0 0x1E (see the codeset 1
comments on the SCANCODE_* enum in chrome-ec
include/keyboard_8042_sharedlib.h). The e0 half of the
evdev_scancode2key() translation table leaves eleven of those at NONE,
so on FreeBSD those keys emit no evdev event at all and userspace
remappers such as keyd have nothing to bind to:
e0 11 fullscreen KEY_ZOOM
e0 12 overview KEY_SCALE
e0 13 screenshot KEY_SYSRQ
e0 14 brightness down KEY_BRIGHTNESSDOWN
e0 15 brightness up KEY_BRIGHTNESSUP
e0 16 privacy screen toggle KEY_PRIVACY_SCREEN_TOGGLE
e0 17 kbd backlight down KEY_KBDILLUMDOWN
e0 18 kbd backlight up KEY_KBDILLUMUP
e0 1a play/pause KEY_PLAYPAUSE
[15 lines not shown]
ig4(4): fix attach of ACPI-enumerated LPSS controllers
Intel LPSS I2C controllers enumerated through ACPI rather than PCI never
attach on Haswell and Broadwell, so every device behind those buses is
lost. On a Dell XPS 13 9343 that hides the I2C HID touchpad and leaves
only the PS/2 fallback, which the firmware does not restore after S3.
Three causes, all on the ACPI path:
Firmware may leave an LPSS function in D3, where its registers read as
all-ones and set_controller() fails with "controller error during
attach-1". Run _PS0 before mapping them. The PCI path does not need
this, which is why the gap went unnoticed.
INT33C2, INT33C3, INT3432 and INT3433 are Lynx Point-LP and Wildcat
Point-LP, which ig4_pci.c already classifies as IG4_HASWELL; the ACPI
path called everything but APMC0D0F an Atom SoC.
The functional clock stays gated until bit 0 of IG4_REG_CLK_PARMS is
[14 lines not shown]
tests/sys/vfs: add ABI-root absolute symlink tests
Pin the overlay namei(9) uses for Linux ABI processes: a target under
the ABI root wins (PR 289739), a native-only target should retry from
the native root (PR 297426), an ENOENT past a resolved ABI target is
not retried, and the plain no-symlink native fallback is unchanged.
Skip without a Linux userland so CI stays green. The two native-only
cases use atf_expect_fail until the retry lands.
PR: 297426
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D59990