XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

src, branch main

FreeBSD source tree

loopback: set MTU to IF_MAXMTU

It was temporarily reduced in af78195e0024 in 1994 to hide some bugs with signed short overflow. We believe all these bugs were sorted out by today. :) Note that earlier ba582a82b0e36 reduced the MTU be rounded to a longword with a reference "NFS likes it to be rounded". We have had several refactors of the NFS code since that. Reviewed by: pouria, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D59450

smsc: Use read-modify-write to configure LEDs

After reset the driver enables three LED outputs by writing 1s to the appropriate GPIO/LED configuration bits in the LED & GPIO configuration register LED_GPIO_CFG. The LED Select (LED_SEL) bit in LED_GPIO_CFG chooses between two LED modes: 0: Speed, Link+Activity, Full Duplex 1: Speed, Link, Activity If an EEPROM is present LED_SEL is initialized from bit 1 in the EEPROM's configuration flags value. If no EEPROM is present this bit defaults to zero. Previously we wrote to all bits in the…

linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK

Linuxulator implements epoll instances using kqueues. Currently, epoll_create_common() creates the backing kqueue with copy-on-fork disabled. When fork() copies the descriptor table, the kqueue is omitted from the child's table. This differs from Linux, where an epoll descriptor survives fork(), including when it was created with EPOLL_CLOEXEC. That flag controls descriptor lifetime across exec(), not fork(). The missing descriptor breaks dbus-daemon daemonization. The daemon creates its epoll…

bhyve: add command to list config options

For a software built on top of bhyve(8) and/or managing bhyve(8), it is very convenient to know what specific features the given binary supports. Currently, bhyve(8) provides some of this information, and it could be retrieved by parsing `bhyve -h`, `bhyve -s help`, `bhyve -l help`. Sometimes it is not enough, for example, the recently added "oemstrings" feature cannot be fully probed using these commands. Over time, some workarounds were suggested. Specifically: - Mapping features to…

libc: Fix stack buffer overflow in cgetnext()

`cgetnext()` copies a capability record's name field into a fixed 1024 byte on-stack buffer (`nbuf[BSIZE]`) one character at a time, but never checks that the write pointer stays within the buffer. Therefore, a record name that is longer than `BSIZE` (either on a single line, or accumulated across several `\`-continued lines as the pointer is not reset amidst continuation) writes past the end of `nbuf` and smashes the stack. The name field is read directly from the capability file, so any…

linuxkpi: implement irqs_disabled

This adds a function which is used from various places in drm-kmod to detect if the code can sleep or not. Currently, these locations (such as intel_guc_send_busy_loop) are ifdeffed to freebsd specific solutions (usually drm_can_sleep). This change implements irqs_disabled. We check td_pinned as spinlocks will call sched_pin, and td_critnest to check if we are in a critical section. Approved by: wulf, khng (mentor) Differential Revision: https://reviews.freebsd.org/D57782