nfscl: Remove cruft for NFSv4.0 callbacks
Commit 71ac1ec5c9d9 disabled callbacks for NFSv4.0.
This commit cleans up cruft related to NFSv4.0 callbacks.
Since callbacks are disabled for NFSv4.0, this patch
should not have any semantics effect.
A future commit will clean up the nfscbd(8) daemon.
MFC after: 2 weeks
ObsoleteFiles.inc: Correct two old paths
At the time we retired the cp(4) driver, we still had per-arch man
subdirectories.
Fixes: 895992bb66d2 ("retire cp(4) driver")
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D62503
acpi_support/acpi_ibm.c: move the 'key' definition to the block that uses it
This eliminates a warning from compilation of kernels without
EVDEV_SUPPORT.
Fixes: 7e7f8b2c6641 ("acpi_ibm: Report mic mute key evdev events")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 31b7d80016a37e4de10f166bc7ff353c7d1ef534)
ure: add USB device IDs for additional RTL8152/RTL8153 adapters
Add device IDs for several USB Ethernet adapters that use
RTL8152 and RTL8153 chips but are not yet recognized by ure(4).
This includes adapters from Cisco/Linksys, D-Link, Lenovo,
Microsoft Surface, Realtek, Samsung, and TP-Link.
All added devices use chip revisions already handled by
ure_read_chipver().
Signed-off-by: Christos Longros <chris.longros at gmail.com>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55748
(cherry picked from commit 76c082180719f42481289eb837e44b055efc003a)
acpi_ibm: handle ThinkPad programmable star key
Handle extended HKEY events separately from legacy event mask indices.
Report the programmable star key as KEY_BOOKMARKS instead of treating it
as brightness down, and preserve extended event arguments for devd.
Tested on: ThinkPad X1 Carbon Gen 9
Pull Request: https://github.com/freebsd/freebsd-src/pull/2595
MFC after: 3 days
Reviewed by: ngie, adrian
Differential Revision: https://reviews.freebsd.org/D62159
(cherry picked from commit 225fadb1697803353f4664fa8618fdf1dbc8edff)
acpi_ibm.4: Remove extraneous .Tn
As flagged by mandoc linter.
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 8de929962a38855c8c38d117d20b71d7c9eaee77)
acpi_ibm: Report mic mute key evdev events
While here, make the naming of micmute_led more consistent.
PR: 296140
Event: Halifax Hackathon 202606
Reported by: David Lundqvist
Reviewed by: olce
Tested by: David Lundqvist, Oleksandr Kryvulia
Co-authored-by: David Lundqvist
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7e7f8b2c66410bcc6408482be73bd9c059e2bbe2)
acpi_ibm.4: Fix mic_led sysctl name
Fixes: 707347f88649 ("Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304")
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b9d6497bd1f16e906f4dc6e600368b86d3fe0317)
acpi_ibm: register all appropriate sysctls as uint
All sysctls except thermal sensor readings and the handlerevents
whitelist-separated string are bitmasks or small integers. This avoids some
bitmasks being erroneously displayed as negative values.
Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1824
(cherry picked from commit e881b8ee0bc7bf552c9c0a63c7d84542243f9f0d)
stdio: Fix negated wchar scansets
We were recording the start of the scanset before checking if it began
with a caret. We need to check for a caret first, then record whatever
comes next as the start of the scanset.
Note that scanf() did not have this bug, only wscanf(), but this adds
regression tests for both anyway.
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D62328
(cherry picked from commit 71c723518d22b2ae9c9c7819aa2625af3532bba5)
stdio: Fix typo in scanset test
Fixes: 71c723518d22 ("stdio: Fix negated wchar scansets")
(cherry picked from commit c5917853354369d9537c5a5aee4f0d2854325ed4)
stdio: Handle unterminated scansets
In both vfscanf() and vfwscanf(), if the end of the format string was
reached before the closing bracket of a scanset, we treated the NUL as
the closing bracket and continued to read beyond the end of the format
string. Add an error check to catch this case.
MFC after: 1 week
Reported by: Nick L. Leppelmeier <nicklpmr at gmail.com>
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62199
(cherry picked from commit c5e0899d9908da5935cfaaade073d6911880fcb5)
stdio: Add test cases for scansets
Add test cases that exercise scanf() / wscanf() scansets, including
hyphenated ranges and the missing closing bracket bug we recently fixed.
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62201
(cherry picked from commit c24ab9f32d9bb63b426f346cb5f28c00e63922c2)
stdio: Implement ranges for wchar scansets
The C and POSIX standards allow but do not require hyphenated ranges to
be supported in scanf() / wscanf() scansets. We implemented them for
scanf() but not for wscanf(). Do so using similar logic as for scanf().
This is hard to do efficiently for wide characters, which can in theory
span the full 32-bit range (and even the actual range of about 1 million
Unicode codepoints is difficult to handle), so we don't try to be
efficient, but just focus on producing the same results for wscanf() as
for scanf().
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62200
(cherry picked from commit 50eb68efcb473c8c20c016d618a8cd674d3706dc)
stdio: Use correct comparison function
[2 lines not shown]
stdio: Fix negated wchar scansets
We were recording the start of the scanset before checking if it began
with a caret. We need to check for a caret first, then record whatever
comes next as the start of the scanset.
Note that scanf() did not have this bug, only wscanf(), but this adds
regression tests for both anyway.
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D62328
(cherry picked from commit 71c723518d22b2ae9c9c7819aa2625af3532bba5)
stdio: Fix typo in scanset test
Fixes: 71c723518d22 ("stdio: Fix negated wchar scansets")
(cherry picked from commit c5917853354369d9537c5a5aee4f0d2854325ed4)
stdio: Implement ranges for wchar scansets
The C and POSIX standards allow but do not require hyphenated ranges to
be supported in scanf() / wscanf() scansets. We implemented them for
scanf() but not for wscanf(). Do so using similar logic as for scanf().
This is hard to do efficiently for wide characters, which can in theory
span the full 32-bit range (and even the actual range of about 1 million
Unicode codepoints is difficult to handle), so we don't try to be
efficient, but just focus on producing the same results for wscanf() as
for scanf().
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62200
(cherry picked from commit 50eb68efcb473c8c20c016d618a8cd674d3706dc)
stdio: Use correct comparison function
[2 lines not shown]
stdio: Handle unterminated scansets
In both vfscanf() and vfwscanf(), if the end of the format string was
reached before the closing bracket of a scanset, we treated the NUL as
the closing bracket and continued to read beyond the end of the format
string. Add an error check to catch this case.
MFC after: 1 week
Reported by: Nick L. Leppelmeier <nicklpmr at gmail.com>
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62199
(cherry picked from commit c5e0899d9908da5935cfaaade073d6911880fcb5)
stdio: Add test cases for scansets
Add test cases that exercise scanf() / wscanf() scansets, including
hyphenated ranges and the missing closing bracket bug we recently fixed.
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62201
(cherry picked from commit c24ab9f32d9bb63b426f346cb5f28c00e63922c2)
apex: add a driver for the Google Apex Edge TPU
The Apex is the accelerator on Coral PCI Express and M.2 modules,
appearing as 1ac1:089a
Google's Linux driver left staging in 5.16 and the out of tree
repository was archived; no BSD has had one.
Tested on: amd64, Coral M.2 Accelerator, running MobileNet v1
with the TensorFlow Lite 2.16 and LiteRT runtimes
Reviewed by: ziaee, adrian
Differential Revision: https://reviews.freebsd.org/D58563
gasket: add a framework for Google accelerator ASICs
Gasket is Google's name for the layer their accelerator drivers share:
Google ASIC Software, Kernel Extensions, and Tools. The chips differ,
but they present the same shape to the host. A control register BAR
with a few windows user space may map, an on-chip page table the host
fills in so the device can reach host memory, and a block of MSI-X
vectors.
Reviewed by: ziaee, adrian
Differential Revision: https://reviews.freebsd.org/D58561
bhyve: disable SIGPIPE for vtcons
Currently, if a virtio-console socket client closes the connection or
shuts down the read side, the next guest write to the socket
raises SIGPIPE and kills the VM.
Set SO_NOSIGPIPE on this socket to prevent that.
Reviewed by: markj
Fixes: 13ee8dde0409 ("Add virtio-console support to bhyve.")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D62216
(cherry picked from commit 293dac30b9955d64cff74f3d31138950cc6bfafe)
linux: Fix handling of an empty argv
proc_getargv() can return an sbuf with length zero. In the Linux
note_prpsinfo() handler, this would cause "len" to underflow to -2,
resulting in a giant out-of-bounds memchr() loop.
There is no reason to subtract anything from the sbuf length to begin
with, the nul terminator is not included there. Simplify the code to
fix this bug, and modify the native note handler to match.
Reported by: Laam Alif at Ibteda Digital Library
Fixes: 00d17cf342cd ("elf_note_prpsinfo: handle more failures from proc_getargv()")
Reviewed by: des, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D62449
bhyve: disable SIGPIPE for TCP uart backend
Currently, if a TCP uart client disconnects while the guest is writing
to the serial port, a subsequent write to the socket raises SIGPIPE and
kills the VM.
Set SO_NOSIGPIPE on the listening socket to prevent that. Accepted
connections inherit it.
Reviewed by: markj
Fixes: 1f903953fbf8 ("bhyve: Add raw tcp to uart backend")
MFC after: 3 days
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D62215
(cherry picked from commit cbfe766aac6f316007438c9f5557dd0c99bcbad3)
bhyve: disable SIGPIPE for vtcons
Currently, if a virtio-console socket client closes the connection or
shuts down the read side, the next guest write to the socket
raises SIGPIPE and kills the VM.
Set SO_NOSIGPIPE on this socket to prevent that.
Reviewed by: markj
Fixes: 13ee8dde0409 ("Add virtio-console support to bhyve.")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D62216
(cherry picked from commit 293dac30b9955d64cff74f3d31138950cc6bfafe)