This is a display of mostly-automatically-classified git commits from 2026-02-16 to 2026-02-22.
Table of contents and commits per category:
| (2) | Highlighted commits (these are copies, not in stats) | |
| 19 | 9.4% | Userland programs |
| 17 | 8.4% | Documentation |
| 39 | 19.3% | Hardware support |
| 14 | 6.9% | Networking |
| 26 | 12.9% | System administration |
| 13 | 6.4% | Libraries |
| 1 | 0.5% | Filesystems |
| 28 | 13.9% | Kernel |
| 13 | 6.4% | Build system |
| 7 | 3.5% | Internal organizational stuff |
| 13 | 6.4% | Testing |
| 5 | 2.5% | Style, typos, and comments |
| 5 | 2.5% | Contrib code |
| 2 | 1.0% | Reverted commits |
| 0 | 0.0% | Unclassified commits |
| 202 | 100% | total |
| Technical notes about this page |
For extra visibility, these are copies of commits found in
other sections. Most (if not all) come from the commit message
containing "Relnotes:", or commits modifying
UPDATING.
USB HCI requests may not include HCI transfer block structures (i.e., xfer->data[] == NULL), but in several places, the USB mouse emulation code assumes one will exist. This can lead to a NULL pointer dereference and a SEGV in the bhyve process as observed via experiments with an Ubuntu guest and PyUSB code. Note that many of the cases processing other request types already checked for data == NULL. While in the neighborhood, fix a typo in the loop iterating over the usb_data_xfer_block array which used the wrong variable to check for valid data (idx vs. i). Reported by: danmcd@edgecast.io Obtained from: SmartOS MFC after: 1 week Relnotes: yes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54661
Set controls to maximum performance to avoid regressions now that CPPC is activated by default and to match what the P-state support does. Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55253
Commits about commands found in man section 1 (other than networking).
According to POSIX, the optional third argument is the minimum number of digits to print regardless of sign. We interpreted it as the minimum width of the output including the sign. Additionally, the variable used to hold this value was confusingly named “maxdigits”. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293214 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55311
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55206
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55207
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55208
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55209
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55210
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55211
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55212
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55213
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55215
Reviewed by: immp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55216
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55217
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55349
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Man pages, release notes, etc.
open.2: stop making impression that fd must be directory Reviewed by: des, rmacklem Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D55302
open.2: grammar improvements Submitted by: matteo Fixes: https://cgit.freebsd.org/src/commit/?id=5bcccc702b29a0e173a5916b001771dd7b280c7c MFC after: 3 days
It's not obvious that if `exitstatus` is omitted, the exit status of the function is taken from the last executed command. MFC after: 3 days Reviewed by: jilles, ziaee Differential Revision: https://reviews.freebsd.org/D55026
MFC after: 3 days Reviewed by: ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=2711852bd9ac (sh.1: Provide detailed job control documentation) Differential Revision: https://reviews.freebsd.org/D55194
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
MFC after: 3 days Reported by: jrtc27 Reviewed by: des Differential Revision: https://reviews.freebsd.org/D54629
Reviewed by: kib, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55281
Fixes: https://cgit.freebsd.org/src/commit/?id=1687d77197c0 (man filesystems: move driver pages) MFC after: 3 days Reviewed by: ziaee Sponsored by: Defenso Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr> Closes: https://github.com/freebsd/freebsd-src/pull/2015
Key bindings for command line editing are documented in editline(7). MFC after: 3 days Reviewed by: jilles, ziaee Differential Revision: https://reviews.freebsd.org/D54767
vmm.4: Add information on VM access control Add a section to vmm.4 explaining how vmm device file ownership works. MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54742
vmm.4: Fix width Reported by: ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=d26c8ae527bb ("vmm.4: Add information on VM access control")
These programs require elevated privileges to work and have not seen regular maintenance in decades. Unless someone steps up and overhauls them, we will have to remove them before 16.0. Better-maintained alternatives are available in ports (print/cups, sysutils/LPRng). MFC after: 3 days
Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55360
This manual used the library macro to mark up a header file, causing pollution in the apropos database for libraries, as well as omission from the apropos database for headers. This also renders differently, enclosing the header in angle brackets. MFC after: 3 days
Add terse descriptions for the individual files that make up a port to the FILES section of the ports reference manual. MFC after: 3 days Reviewed by: adamw Differential Revision: https://reviews.freebsd.org/D55404
Hardware drivers and architecture-specific code.
Add PCI device ID 0x7a23 for Intel 700 Series (Raptor Lake) chipset SMBus controller. This enables hardware monitoring functionality on 13th and 14th generation Intel Core platforms. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54957
It's time to flip these on and see if anything happens in -HEAD. It can be turned back off before 16.0-RELEASE if there are problems. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D55071
After discussion with jhibbits@, we pulled out what is supported here and how it's supported. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55093
Reviewed by: ziaee, des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54519
ACPI_IVAR_HANDLE is a global index shared across multiple busses, there is no need for a unique constant here. Reviewed by: vexeduxr, imp Differential Revision: https://reviews.freebsd.org/D54155
This changes the in-kernel ABI, but that is permitted across major versions and is cleaner than leaving these around forever. Differential Revision: https://reviews.freebsd.org/D54160
This appeases GNU as which doesn't map the mov alias to movz. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D55160
No code currently uses the vc_audio_msg_type_names array of strings. Reported by: -Wunused-variable Differential Revision: https://reviews.freebsd.org/D55162
Sponsored by: Arm Ltd
Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55219
Since the low bits of a window's limit are hardwired to 1, this configuration looks like a minimally sized window at address 0. However, PCI resources are not generally at address 0 (see the __PCI_BAR_ZERO_VALID macro that was only defined on sparc64), and some PCI-PCI bridges report these register values after a reset. The result today is a lot of spam in dmesg as the minimally-sized windows fail to allocate. By ignoring these windows and treating them as closed the end result is the same, but there is less spam during boot. Reported by: jrtc27 Differential Revision: https://reviews.freebsd.org/D43922
If we format a drive, and then crash, we'll come back up. nvme_sim_ns device won't attach because we don't have a namespace. Some drives (all? I couldn't find it in the standard) send an AER with a namespace change, which causes a NULL dereference because s_sim wasn't initialized because we didn't attach. So, if we get into the ns_changed routine, bail early if we didn't attach. We'll attach later, and deal with the ns correctly if it's really there, or not attach one if it's not. Sponsored by: Netflix
The CAM sim unit numbner should match the nvme device number. We need this to match unit numbers in some wiring scenarios. For example: hint.nvme.0.at="UEFI:PciRoot(0x3)/Pci(0x1,0x1)/Pci(0x0,0x0)" hint.nvme.1.at="UEFI:PciRoot(0x3)/Pci(0x1,0x2)/Pci(0x0,0x0)" hint.nvme.2.at="UEFI:PciRoot(0x3)/Pci(0x1,0x3)/Pci(0x0,0x0)" hint.nvme.3.at="UEFI:PciRoot(0x3)/Pci(0x1,0x4)/Pci(0x0,0x0)" hint.scbus.33.at="nvme0" hint.nda.0.at="scbus33" hint.scbus.34.at="nvme1" hint.nda.1.at="scbus34" hint.scbus.35.at="nvme2" hint.nda.2.at="scbus35" hint.scbus.36.at="nvme3" hint.nda.3.at="scbus36" If the devices that are nvme0 and nvme3 are the only ones populated, you still want them associated with nda0 and nda3. The nvme_sim device changes meant we were passing the wrong device's unit number to cam_sim_alloc. This fixes the problem. Sponsored by: Netflix
To this end, create a small wrapper, acpi_EnterSleepStatePrep(), which itself prints the failure message. While here, when trying to power down (acpi_shutdown_final()), and AcpiEnterSleepStatePrep() failed, print an additional message more explicit about the power down request having failed. Reviewed by: obiwac MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55225
While here, make it print that we are trying to power off upfront, not really treating differently power off preparation via acpi_EnterSleepStatePrep() and actual power off via AcpiEnterSleepState(), which the user does not care about. While here, capitalize the messages. Reviewed by: obiwac MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55226
placeholder entry end changed to 0 in f591287756368
("iommu_gas: make placeholder entry at the start of the GAS zero size")
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55326
This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass. [0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/ Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55376
The Macmini4,1 model does not have "fansafespeed" support. This issue typically manifests with messages like so: ``` asmc0: asmc_key_read for key F0Sf failed 10 times, giving up ``` Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop "fansafespeed" checks in the driver for the model as it doesn't support that hardware feature. MFC after: 1 week Reported by: @probonopd Closes: https://github.com/helloSystem/ISO/issues/357
Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of the unrolled versions of the macros. This makes it easier to adjust the underlying macros/fields for `struct asmc_model`. No functional change intended. MFC after: 1 week
This code cleanup makes it easier for human readers to understand what each of the fields actually represents, as well as makes it easier to modify what the macros actually do under the covers, without introducing potential human errors. No functional change intended. MFC after: 1 week
hwpstate_amd(4): Consistency of cached CPPC_REQUEST value If writing to the CPPC_REQUEST MSR fails, make sure we do not set the softc's 'cppc.request' field to the intended new value. Both set_cppc_request_cb() and enable_cppc_cb() were changed to this effect. In case enable_cppc_cb() could not read CPPC_REQUEST, mark that through a new softc flag, HWPFL_CPPC_REQUEST_NOT_READ, so that we do not keep and use a wrong value when the content of CPPC_REQUEST is read/written through sysctl(9) knobs, but instead retry reading the MSR (this is the purpose of the new get_cppc_request() sub-function). When setting CPPC_REQUEST has failed, distinguish the case where it could not be read at all from the case where it could not be written, by respectively returning EIO and EOPNOTSUPP in these cases. The previous return value of EFAULT was confusing as sysctl(3) documents it as happening if the passed arguments are invalid. While here, add some herald comment before sysctl_cppc_dump_handler() clarifying that the intent of this function is to always query the hardware directly, bypassing any cached value in the softc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55251
hwpstate_amd(4): CPPC: Allow attaching even if CAPABILITY_1 cannot be read If that MSR cannot be read, we fallback to defaults specified by the ACPI specification, as we are already doing when the minimum and maximum values in there look bogus. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55252
hwpstate_amd(4): CPPC: Switch the default to maximum performance Set controls to maximum performance to avoid regressions now that CPPC is activated by default and to match what the P-state support does. Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55253
To be consistent with that of the others. No functional change. Sponsored by: The FreeBSD Foundation
In principle, do_cpuid() should only be used for CPUID leaves without sub-leaves. Even accessing sub-leaf zero (ECX=0), one must use cpuid_count(ax, 0) rather than cpuid(ax). However, one might assume do_cpuid(ax) is equivalent to cpuid_count(ax, 0), but the old do_cpuid() did not initialize ECX before executing the CPUID instruction. If ECX contained a non-zero value, the instruction could return unexpected results, potentially leading to subtle and hard-to-debug issues, especially in ported code. To be future-proof and to help port code, adjust do_cpuid(ax) to be cpuid_count(ax, 0) to explicitly set ECX=0. It's believed that this change does not fix any real bugs in FreeBSD. See also the DragonFly commit: https://github.com/DragonFlyBSD/DragonFlyBSD/commit/0087a1d163488a57787a9a6431dd94070b1988d4 Signed-off-by: Aaron LI <aly@aaronly.me> Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/2027
Previously the size defaulted to the maximum supported size reported by the remote host. The value of 128 matches the default on Linux and avoids excessive resource usage for I/O queues. Sponsored by: Chelsio Communications
This way we can avoid edge-cases like
8af6aee96ed609456900c6dd92dafabac5e89c0a ("virtual_oss(8): Remove
floating point formats from preference list").
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D55403
This change makes `asmc_detach(..)` reentrant by setting freed resources to known invalid values when done, and makes `asmc_attach(..)` call `asmc_detach(..)` instead of attempting to the semi-equivalent way of cleaning up the driver resources allocated in `asmc_detach(..)`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55413
Convert the oea64 mmu code to rwlocks. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D54936
Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54483
The RTC contains a configurable clock output. MFC after: 3 weeks
Accept the assigned clock on the CPU node. Don't report a missing "clock-frequency" property if the CPU node has a "clocks" property. MFC after: 3 weeks
I2C devices are permitted to sleep during transfers. MFC after: 3 weeks
It may be submapped in child drivers. MFC after: 3 weeks
Add support for 64-bit ranges. Process 'bus-range' property. Add some debug prints. MFC after: 3 weeks
This is a newer version of the "gpio" property. MFC after: 3 weeks
* Do the callout init early; since some of the teardown path expects the callout to be valid * Handle an invalid ethernet address by generating a local one. PR: kern/https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293307 Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D55419
* Only free busdma memory that was allocated * Don't free tx/rx rings until their buffers have also been freed PR: kern/https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293307 Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D55420
The initial import from OpenBSD contained chip revision printf() calls commented out, as OpenBSD's bare printf() style does not translate to FreeBSD's device_printf() idiom. The result is that users cannot distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via dmesg alone, even though all variants show as '<RTL8125>' from the PCI probe string. Add proper device_printf() calls including the raw hwrev value, consistent with how re(4) reports chip revisions. Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: zlei, imp, adrian Differential Revision: https://reviews.freebsd.org/D55402
Network-related commands, library, and kernel.
Sponsored by: Rubicon Communications, LLC ("Netgate")
The entire netlink(4) message processing thread is all inlined into nl_taskqueue_handler() making it difficult to dtrace(1) on a message level.
Array indices must always be posive. We avoid this by making each index unsigned. This mitigates out-of-bounds reads and writes. Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com> Reviewed by: glebius MFC after: 3 days Differential revision: https://reviews.freebsd.org/D55260
compile_et.sh is run during buildworld and prints a bunch of debug output. It's intrusive and probably not needed, at least by default, so let's make the build output a bit cleaner. This is an upstream script, but it hasn't been modified in 15 years so the local modification is unlikely to cause any pain. Also remove a print that shows up in buildworld -s output. Reviewed by: cy MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55317
if_gre: Add netlink support with tests Migrate to new if_clone KPI and implement netlink support for gre(4). Also refactor some of the gre specific ioctls. Reviewed by: glebius, zlei Differential Revision: https://reviews.freebsd.org/D54443
gre tests: Add required_kmods to gre netlink test Fixes: https://cgit.freebsd.org/src/commit/?id=e1e18cc12e68 Differential Revision: https://reviews.freebsd.org/D54443
gre tests: Fix gcc warnings on gre netlink tests Avoid using `snl_add_msg_attr_ip` for now and directly use `snl_add_msg_attr_ip4` to silence gcc warnings. Fixes: https://cgit.freebsd.org/src/commit/?id=e1e18cc12e68 Differential Revision: https://reviews.freebsd.org/D54443
States can be invalidated and still be present in the state table for a
while (until the pf_purge thread cleans them up). These states might not
have keys set, so we must make sure a state is not purged before we try
to access those keys.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6 header. For a locally generated packet with checksum offloading, the mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum has to be computed and inserted. Since this not the case anymore, csum_flags need to be cleared. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293227 Reviewed by: kp, zlei, tuexen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55367
<dev/nvmf.h> exports a constant to set the default maximum I/O queue size which is used by ctl(4) if an explicit size is not set. This value was chosen to match Linux's default, but it also avoids excessive resource usage for I/O queues. ctld was using the absolute maxium size as the default instead. Sponsored by: Chelsio Communications
Reviewed by: glebius, pouria MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55410
No functional change intended. Reviewed by: pouria, rrs, Timo Völker MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55415
Reported by: pho Reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=d4062b9f16e46f039f2b5b40dd35592b5dabf00c Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D55447
Stuff in man section 8 (other than networking).
The ioctl might fail because it's run in a jail which doesn't have permission to invoke ppt ioctls. Reviewed by: jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55070
Make parse_selector() print a warning to stderr and continue parsing the config if it encounters an invalid facility or priority. Note that because the parsing is done from a casper service, there isn't a good mechanism to log errors; the warnings are visible only when syslogd is started in debug mode. Reported by: Doug Hardie <bc979@lafn.org> MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=f4b4a10abb26 ("syslogd: Move selector parsing into its own function") Reviewed by: jfree, jlduran, eugen, delphij Differential Revision: https://reviews.freebsd.org/D55033
Update rfb_recv_* functions to return -1 on failure and 0 on success. Update rfb_handle to check these return values and drop the connection if an error occurs. Signed-off-by: Hayzam Sherif <hayzam@gmail.com> Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
Not expecting it to turn into yak-shaving: kevans
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55269
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55274
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55270
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55273
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55275
The mdts value is in terms of the nvme page size, not the host page size. On many architectures these are both 4k, however on arm64 it is possible to build a system with the host page size of 16k. Use NVME_MPS_SHIFT to get the correct nvme page shift. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55334
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55271
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55272
Reported by: olce
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Convert rfb_send_* helpers to return status codes and check their results. Add missing checks for stream_read() and stream_write() returns during the handshake in rfb_handle() to avoid acting on failed I/O. Signed-off-by: Hayzam Sherif <hayzam@gmail.com> Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55343
USB HCI requests may not include HCI transfer block structures (i.e., xfer->data[] == NULL), but in several places, the USB mouse emulation code assumes one will exist. This can lead to a NULL pointer dereference and a SEGV in the bhyve process as observed via experiments with an Ubuntu guest and PyUSB code. Note that many of the cases processing other request types already checked for data == NULL. While in the neighborhood, fix a typo in the loop iterating over the usb_data_xfer_block array which used the wrong variable to check for valid data (idx vs. i). Reported by: danmcd@edgecast.io Obtained from: SmartOS MFC after: 1 week Relnotes: yes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54661
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
since sd_lobase is 24 bits, we would need to shift 24 bits, not 16. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55178
we check and reset loader_gdt_pa, but use FreePages(tss_pa). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55179
loader_idt.rd_base is not set when we are attempting to bcopy(), resulting to data stored to page 0 and therefore corrupting it. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55180
The status field also accepts onifconsole and onifexists, so it looks crusty saying that it only accepts on and off. Reviewed by: imp Closes: https://github.com/freebsd/freebsd-src/pull/2042
MFC After: 2 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55291
The transfer proxy callbacks (bulk/interrupt, control, isochronous) only called libusb10_submit_transfer_sub() in the START path to pipeline the second kernel transfer slot. On completion or error, no attempt was made to dequeue the next pending transfer from tr_head onto the now-free slot. When more than two async transfers were submitted on the same endpoint, the third (and subsequent) transfers would remain stuck on tr_head indefinitely, since no completion ever triggered their submission. This caused a protocol-level deadlock in applications like adb that submit header + payload + zero-length terminator as three separate bulk transfers in sequence. Fix by calling libusb10_submit_transfer_sub() after every libusb10_complete_transfer() in all three proxy callbacks. MFC After: 2 weeks Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55289
Noted and reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55327
Include sys/types.h by exterr.h, since size_t is used. Drop include of sys/exterr_cat.h, it is useless for the only prototype provided. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55337
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293124 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=792ef1ae7b94 ("Refactor fetch_connect() and fetch_bind() to improve readability and avoid repeating the same DNS lookups.") Reverts: 8f8a7f6fffd7 ("libfetch: apply timeout to SSL_read()") Reviewed by: eugen, imp Differential Revision: https://reviews.freebsd.org/D55293
I'd missed that stddef.h is standalone and isn't a copy of sys/stddef.h in my initial merge. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: Innovate UK Fixes: https://cgit.freebsd.org/src/commit/?id=dca634d1544b ("new type: ptraddr_t") Differential Revision: https://reviews.freebsd.org/D55305
stddef.h: centralize definition of offsetof() Move to sys/_offsetof.h and use __builtin_offsetof() instead of __offsetof to avoid reintroducing sys/cdefs.h polution in stddef.h. This has the side effect of allowing sys/stddef.h to be included after stddef.h which can happen in compatability headers. Effort: CHERI upstreaming Sponsored by: DARPA, AFRL Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D55307
types.h: use central definition of offsetof() Previously this broke if included after (sys/)stddef.h. Reported by: des Fixes: https://cgit.freebsd.org/src/commit/?id=2adc3f0db187 ("stddef.h: centralize definition of offsetof()")
These compile-time assert macros are similar to `Static_assert` on FreeBSD. These macros are in use in newer versions of `contrib/netbsd-tests`. Obtained from: https://github.com/NetBSD/src (c26cc77b3a0b26b95a2) MFC after: 1 week
libfetch: Clean up fetch_info usage * Provide a wrapper for the common if (verbose) fetch_info(...) idiom. * Replace remaining instances of fprintf(stderr, ...) with fetch_info(). * Fix a few style nits. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55405
libfetch: Fail hard if interrupted while connecting This fixes an issue where the first address that DNS returns is blocked by a packet filter, so we hang for a while, then the user hits Ctrl-C, interrupting connect(2), whereupon we move on to the next address, get a connection, request the file, and return to fetch(1), which sees that SIGINT was caught and bails. Note that we make no attempt to enforce fetchTimeout in the connection phase, and never have. It's feasible, but non-trivial, so we'll leave it as an exercise for future us. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293312 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55406
libfetch: Gracefully skip unsupported protocols If socket() fails because the address family or protocol is unsupported, just continue with the next address. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55407
No need to have 4 separate manpages for these functions. Use opportunity to change parameter names in the source from j -> i to reflect the name used in POSIX. (The ISO C standard uses j but i is a better name anyway.) Reviewed by: des, rpokala Approved by: rpokala Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55361
This lock was included in the original GSoC submission. Its purpose seems to have been to prevent concurrent FUSE_RENAME operations for the current mountpoint, as well as to synchronize FUSE_RENAME with fuse_vnode_setparent. But it's obsolete, now that ef6ea91593e added mnt_renamelock . MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55231
Kernel stuff (other than networking, filesystems, and drivers).
Packing 'struct ffclock_estimate32', in absence of substitution of 'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap of 4-byte between fields 'update_time' and 'update_ffcount'. This gap does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is only 4-byte aligned. Change the type of the 'update_ffcount' and 'leapsec_next' fields to the recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out accordingly. Using `CP()` previously worked due to the '__packed__' attribute. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55282
As long as 'sys/compat/freebsd32/freebsd32.h' is used unconditionally on
all platforms (in 'kern_umtx.c' at least), the rule of thumb is to
ensure that 'struct foo32' on a 32-bit arch is type-compatible with
'struct foo' on the same arch. In practice, this is very simple to
achieve: All 'foo32' types should be compatible with 'foo' on 32-bit
architectures, which is what we are supposed to do already for compat'
structures by design. The recently introduced 'freebsd32_uint64_t' type
typically supports that.
This change fixes commit 87632ddf67b0 ("openzfs sys/types32.h: use
abi_compat.h for time32_t") which was defining 'time32_t' to 'in32_t'
for all 32-bit architectures, which is wrong but on i386. By luck, this
did not change the size of whole 'struct ffclock_estimate32' (whose size
is compile-time asserted) because 'struct bintime32''s one would stay
the same, as even if its field 'sec' was incorrectly sized after that
commit, the 'frac' one is 64-bit and 64-bit aligned on all non-x86
architectures so its offset in 'struct bintime32' would stay the same.
Reviewed by: kib
Fixes: https://cgit.freebsd.org/src/commit/?id=87632ddf67b0 ("openzfs sys/types32.h: use abi_compat.h for time32_t")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55283
After commit e11768e94787 ("vmm: Add PRIV_DRIVER checks for passthru
ioctls"), it is not possible to use PCI passthru from jails, as
PRIV_DRIVER is not granted to jails. Apparently some users expect this
to work, understanding that jailing bhyve provides little security
benefit in this configuration.
I believe we should disable ppt access in jails even when allow.vmm is
configured. To provide an escape hatch for users, add a new
allow.vmm_ppt jail configuration knob, and check it when handling ppt
ioctls in jails. Also add a new PRIV_VMM_PPTDEV to replace the use of
PRIV_DRIVER.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292750
Reviewed by: corvink
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55066
when RFSPAWN is not specified, as stated in the man page. rfork(2) cannot modify non-curproc, which is why RFPROC is required, the syscall cannot act on arbitrary process descriptor. If RFPROCDESC is not specified, the syscall does not make sense, use rfork(2). Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52475
Some IVAR indices are special in that they have global meaning across multiple buses where as other IVARs are always private to the local bus. Try to document this a bit and add constants for the various ranges to avoid future conflicts. This is a no-op, but IVAR indices are now generally defined as enums as that makes it easier to define them in terms of ranges. Reviewed by: imp, royger, andrew Differential Revision: https://reviews.freebsd.org/D54159
A few bus drivers used 1 instead of 0 as the starting index of their private IVARs. Fix those drivers to start at BUS_IVARS_PRIVATE for consistency. Differential Revision: https://reviews.freebsd.org/D54934
Suggested by: andrew Differential Revision: https://reviews.freebsd.org/D54191
Use a more consistent scheme for allocating shared IVAR index ranges. Differential Revision: https://reviews.freebsd.org/D54161
For PIC code, the existing assembly constraints do compile on aarch64. Some kernel modules build ok using the 'p' constraint with the 'a' operand modifier, but not all. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55166
PR#293198 reports a hang within ZFS when exports are being updated concurrently with a VOP_SETEXTATTR(). The hang appears to be caused by mishandling of the z_teardown_lock, but fixing handling of this lock appears to be a major effort. Since the hang occurs when VFS_MOUNT() acquires a write/exclusive z_teardown_lock, which rarely occurs, except when exports are being updated, this patch avoids the VFS_MOUNT() call for this case. Avoiding a VFS_MOUNT() call fixes the hang for the case reported by PR#293198 and is also an optimization. As such, this patch avoids the VFS_MOUNT() call when only exports are being updated similar to what was already being done within vnet prisons. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293198 Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55318
Previously, we iterated over all CPUs using CPU_FOREACH and checked individual bits to count valid CPUs. Refactor this to use a bitwise AND and popcount to count the number of enabled bits directly. Approved by: markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54474
When interrupt vectors are first allocated, they get assigned to CPU #0; at SI_SUB_SMP / SI_ORDER_SECOND (aka once we have multiple CPUs), the intr_irq_shuffle SYSINIT clears their CPU sets with the effect of forcing them to be assigned to new CPUs later. In case where interrupt vectors were allocated *but not yet bound* this code did not run, with the effect that those interrupts would remain pinned to CPU #0 forever. This affected the ena(4) driver, which allocates interrupts for I/O when the device is attached but doesn't set them up until the interface is brought up much later in the boot process (and, crucially, long after intr_irq_shuffle runs). Adjust intr_irq_shuffle to clear the CPU set for an interrupt source even if it currently has no handlers, so that it will be properly assigned to a CPU when it is used later. Reviewed by: andrew, mhorne MFC after: 1 month Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D55284
This is used to hold a copy of the original fflags, which is unsigned. MFC after: 3 days Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D55348
No functional change (intended). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
- gc unused struct kevent - sort kern_frmdirat, kern_funlinkat, kern_kexec_load, and kern_kqueue - put user_ functions in their own section Effort: CHERI upstreaming Reviewed by: kib Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D55309
In preparation for supporting creation of VMs by unprivileged users, add some restrictions: - Disallow creation of non-transient VMs by unprivileged users. That is, if an unprivileged user creates a VM, the VM must be destroyed automatically once the last fd referencing it is gone. - Disallow destroying VMs created by a different user, unless the caller has the PRIV_VMM_DESTROY privilege. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54740
- Add the vmm group. - Let /dev/vmmctl belong to the vmm group by default, and give group write permissions. - When creating a VM's device files, make them owned by the creating process' effective UID. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54741
For now, just describe the error where an unprivileged user attempts to run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54743
'sc->levels_buf' is initialized with malloc(M_WAITOK), so can never be NULL. Another sysctl handler function (cpufreq_curr_sysctl()) already relies on that. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
PROC_REAP_KILL must guarantee that all reaper descendants are signalled. In particular, it must ensure that forked but not yet fully linked descendants cannot escape killing. Currently, proc_reap() fullfils the guarantee by single-threading stopping the target process, which moves the target to the userspace boundary, so the target cannot fork while the signal is sent. Single-threading has undesirable effect of sometimes terminating sleeps with EINTR. Since the time that the bug with PROC_REAP_KILL was fixed, we grow the pg_killsx mechanism that is similarly used by the process group signalling to ensure that no member of the process group escapes. Reuse pg_killsx for PROC_REAP_KILL as well. Besides the functional change of no longer causing spurious EINTR, not single-threading the target means that we no longer need to delegate the work to the taskqueue. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290844 Reported by: bdrewery Reviewed by: des, markj Tested by: des, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55288
Due to this, restart the iteration over the p_reapsiblings if the lock was dropped. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55288
ESRCH from cr_cansignal() means that the target process should be not visible to the initiator. So do not report pids with ESRCH result. Noted by: markj Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55341
After commit 7d1d9cc440f80 we only serialize large sysctl requests for non-root users, but we should avoid calling priv_check() unless the request actually is large, as that's not the common case. In particular, priv_check() might not be cheap to evaluate if MAC hooks are installed. Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55377
Running out of pipe map KVA is a rare case, so reorder checks accordingly, presuming that calling priv_check() is more expensive than the calculation. In particular, priv_check() might not be cheap to evaluate if MAC hooks are installed. Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55378
MFC after: 3 weeks
The BUF_UNLOCK macro asserts that B_REMFREE is not set, as it is up to the lock owner to complete the dequeue from the free list before releasing the lock. However, if the thread has acquired the lock multiple times, then releasing the recursive lock should be ok. Modify the assertion to reflect this. This was triggered by an out-of-tree filesystem. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55418
Reviewed by: adrian (previous version) MFC after: 3 weeks
A separate EVP_CIPHER_CTX_get_app_data.3 was added in the OpenSSL 3.5.5 import, but the link to EVP_EncryptInit.3 was still being installed which stomped on the file and created inconsistent entries in the METALOG. Reviewed by: emaste Found by: package_check script in Cirrus-CI Fixes: https://cgit.freebsd.org/src/commit/?id=1731fc70f734 ("OpenSSL: update vendor sources to match 3.5.5 content") Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D55332
OptionalObsoleteFiles: Add figpar to dialog section MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=15d781b53233 ("lib: Gate libfigpar under MK_DIALOG") Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D55330
OptionalObsoleteFiles: Add missing figpar MLINKS MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")
Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D55336
MFC after: 3 days
MFC After: 1 week
Effort: CHERI upstreaming Sponsored by: Innovate UK Reviewed by: kib Co-authored-by: Alfredo Mazzinghi <am2419@cl.cam.ac.uk> Co-authored-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> Differential Revision: https://reviews.freebsd.org/D55308
The intent of the currect code is to ignore anything under /usr/lib/debug/boot/*. But we also should make sure that /usr/lib/debug/boot directory is also ignored and is not marked obsolete. If we don't do that, `make DBATCH_DELETE_OLD_FILES delete-old` will try to rmdir(1) this directory, which will cause an error, since /usr/lib/debug/boot may have nested directories like kernel/ and modules/. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55077
If a package plist only contains directories, but no files, do not create the package. This fixes an issue where setting "package=foo" in mtree causes the "foo" package to always be created, even if nothing else installs in that package, because the mtree entry is always added to the plist. This most often happens: * With architecture-specific directories, because mtree can't install a directory conditionally based on architecture, and * With packages that are completely empty when a particular src.conf knob is disabled, because mtree will still create the directories. Although it's theoretically possible that we might want to create a package that only contains directories, there are no such packages today. MFC after: 2 weeks (stable/15 only) Reviewed by: manu, des Differential Revision: https://reviews.freebsd.org/D55412 Sponsored by: https://www.patreon.com/bsdivy
* Tag related directories with package=lp * Make the examples/printing directory conditional on MK_LPR * Make the hosts.lpd(5) manual page conditional on MK_LPR MFC after: 3 days
No need to have 4 separate manpages for these functions. Reviewed by: ziaee, rpokala, des Approved by: rpokala, des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55360
Having these packages available on release media may help users who need to sneakernet other packages (e.g. firmware) from systems running Linux or Windows. Suggested by: vladlen, ziaee MFC after: 3 days
MFC after: 3 weeks
Since we dropped support for profile libraries, all optional entries for them are now non-optional. Most of them were already duplicated there, a few were not. MFC after: 3 days Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D55329
Sponsored by: Arm Ltd
Fixes: https://cgit.freebsd.org/src/commit/?id=b78806b156f7 ("Remove additional libtpool and libuutil-related files")
In the email address heuristic, assume guest-* are external contributors. It's a new convention, apparently. Sponsored by: Netflix
If this eventually poses a problem for unsupported branches we can fix them directly. Sponsored by: Innovate UK Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53838
When moving from Github to Phabricator, request that the original github pull request be closed with the URL of the Phab. This cuts down on clutter and helps us track things better. Sponsored by: Netflix
Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the `.DS_Store` produced by macOS as well because all they provide is additional file metadata that shouldn't be committed to `git`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55096
pdrfork(2) tests: RFPROCDESC|RFPROC are required Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
pdrfork(2) tests: do not rely on (int *)-1 being invalid address Explicitly mmap guard and use it as the invalid address instead. Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
pdrfork(2) tests: catch runaway child for EFAULT test Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
pdrfork(2) tests: split basic_usage into pdrfork(2) call itself, and basic_usage_tail() that checks the pdrfork(2) results. Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
pdrfork(2) tests: should wait for the child to exit Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
pdrfork(2) tests: enable on x86 Use pfrfork_thread(3) instead of pdrfork(RFSPAWN) to make tests working on x86. Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
Explicitly mmap guard and use it as the invalid address instead. MFC after: 1 week
Explicitly mmap guard and use it as the invalid address instead. MFC after: 1 week
Now that this project is part of freebsd-src, it no longer needs to be portable. Remove Linux-only tests, cross-os compatibility code, and compatibility with older FreeBSD versions. Leave in place some originally Linux-only tests that could now be ported to FreeBSD, like the pipe2 tests. Sponsored by: ConnectWise Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D54985
Here we have two interface addresses sharing a v6 prefix with finite lifetime. The intent was to make sure that adding the second address didn't cause the prefix's valid lifetime to drop from 20s to 10s, but of course, while the test is running it may drop from 20s to 19s, causing the test to fail spuriously. Relax the check a bit to avoid this. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293152 Fixes: https://cgit.freebsd.org/src/commit/?id=74999aac5eff ("in6: Modify address prefix lifetimes when updating address lifetimes") MFC after: 1 week Sponsored by: Klara, Inc.
The test sends RAs in order to test SLAAC handling in another host. The router needs to also set net.inet6.ip6.forwarding=1, otherwise NAs sent from it have the ROUTER flag clear, and upon receiving such an NA the host will automatically delete routes learned from the router. Fixes: https://cgit.freebsd.org/src/commit/?id=feda329622bc ("netinet6 tests: Add a regression test for default router handling") MFC after: 1 week Sponsored by: Klara, Inc.
There were several problems: o Using 'netstat -B' is not a reliable way to make sure that all tcpdumps have attached to bpf(4). The problem is that tcpdump (via libpcap) does several ioctl(2)s after the attach including two BIOCSETF. Each of them flushes the input buffer. So we can see tcpdump attached in 'netstat -B' and start sending packets and the packet will be captured by bpf(4) before BIOCSETF and freed and tcpdump won't read anything. Instead of using netstat(1), use ps(1) and make sure each tcpdump is blocked on the "bpf" wait channel, which guarantees it is done with ioctl(2)s and is now blocked in read(2). o Using 'nc -w 0' sets timeout not only on the connect(2) (as documented) but also on poll(2), which is not documented. There is a race in shell that will make stdin not yet filled by 'echo foo' when nc(1) does poll(2). With zero timeout, this poll(2) will immediately return and nc will exit. o The waiting loop had two errors: using wrong variable name as well as invoking a subshell, that actually can't wait on the pid. o The reading tcpdump was lacking '-q' option, that prevents any protocol interpretations. Sometimes, when random port chosen by nc(1) would match some well-known (to tcpdump) port, the output would differ from the expected. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293241
This fixes INET feature detection with kernel configs that do not include the kern.conftxt sysctl, such as riscv64 currently[0]. [0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/usr.sbin.syslogd/syslogd_forwarded_format_test/O_flag_bsd_forwarded_legacy/ Reviewed by: markj Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55383
These could go in other categories, but it's more clear if they're here instead.
MFC after: 3 days Reviewed by: ziaee Signed-off-by: Christos Longros <chris.longros@gmail.com> Closes: https://github.com/freebsd/freebsd-src/pull/2035
- Allow `ASMC_DEBUG` to be treated as a variadic macro. - Add ellipses around `sizeof(..)` calls. - Reindent some of the lines to better follow style(9) with line wrapping. A number of other clang-format changes were not taken as they are not compatible with style(9). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55394
Rename grap_faults to grab_faults Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55177
This doesn't lengthen or shorten any configuration, only comments, so merging the configuration will be safe. Reviewed by: imp Closes: https://github.com/freebsd/freebsd-src/pull/2042
- Add native support for unicode everywhere. - Remove Big5 specific code (and the menu entry) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291279 MFC After: 1 month Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D55303
Change the function definition to map the declaration and consistently
return an enum value. This fixes the following error reported by GCC:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:322:1: error: conflicting types for 'vchiq_copy_from_user' due to enum/integer mismatch; have 'int(void *, const void *, int)' [-Werror=enum-int-mismatch]
322 | vchiq_copy_from_user(void *dst, const void *src, int size)
| ^~~~~~~~~~~~~~~~~~~~
In file included from sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h:38,
from sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:61:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:647:1: note: previous declaration of 'vchiq_copy_from_user' with type 'VCHIQ_STATUS_T(void *, const void *, int)'
647 | vchiq_copy_from_user(void *dst, const void *src, int size);
| ^~~~~~~~~~~~~~~~~~~~
Differential Revision: https://reviews.freebsd.org/D55163
Once upon a time, 32-bit PowerPC did indeed have a 32-bit time_t, but FreeBSD 12.0 switched to a 64-bit time_t for PowerPC as an ABI break, which predates the addition of FreeBSD support to OpenZFS. Moreover, 64-bit PowerPC has existed since FreeBSD 9.0, where __powerpc__ is also defined (alongside __powerpc64__ to disambiguate), which has always had a 64-bit time_t. This code has therefore always been wrong for all PowerPC variants. Fix this by limiting the 32-bit case to just i386, which is the only architecture in FreeBSD to have a 32-bit time_t and not have broken ABI, due to its special legacy compatibility status. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Closes #18217 Closes #18218 Reported by: fuz MFC after: 1 day
We added the option to build BSD diff3 in commit 2201f7c49f11 ("Build
BSD diff3 if GNU diff3 is disabled.") and made it the default in
4d5c434ed16e ("diff3: use bsd diff3 by default") after resolving
deficiencies relative to GNU diff3. Thus, we can now remove the GNU
diff3 build infrastructure and source.
Reviewed by: bapt, ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46878
fortune: fix netstat tip netstati <mumble> 8 reports in bytes per second (averaged over 8 seconds) rather than bits per second because it reports the total in bits over the 8 seconds... Sponsored by: Netflix
Revert "fortune: fix netstat tip" This reverts commit 8e593a1f143203cace2e14bd6629a8ebdf9b47dc. I was totally wrong, so just revert and get on with it. Sponsored by: Netflix
Not classified automatically, and waiting for manual attention.
-- no commits in this category this week --
Dates:
cgit.freebsd.org/src. Git accurately records the
order of commits, but not their dates.Automatic grouping:
This reverts commit \\b([0-9a-fA-F]{40})\\b
and the hash was found in this week's commits.
Automatic categories:
Source code:
Generated with commits-periodical 0.20 at 2026-03-30 17:58:25+00:00.
This work is supported by Tarsnap Backup Inc.
Alternate version: 2026-02-16 (debug) (contains info about the classification)