This is a display of mostly-automatically-classified git commits from 2026-04-01 to 2026-06-30.
DEBUG: This version of the report is primarily for checking the classifiers, and therefore contains extra information (in this colour).
Table of contents and commits per category:
| (24) | Highlighted commits (these are copies, not in stats) | |
| 44 | 1.9% | Userland programs |
| 167 | 7.1% | Documentation |
| 461 | 19.7% | Hardware support |
| 215 | 9.2% | Networking |
| 263 | 11.3% | System administration |
| 93 | 4.0% | Libraries |
| 41 | 1.8% | Filesystems |
| 511 | 21.9% | Kernel |
| 124 | 5.3% | Build system |
| 14 | 0.6% | Internal organizational stuff |
| 101 | 4.3% | Testing |
| 80 | 3.4% | Style, typos, and comments |
| 120 | 5.1% | Contrib code |
| 102 | 4.4% | Reverted commits |
| 0 | 0.0% | Unclassified commits |
| 2336 | 100% | total |
| Technical notes about this page |
debug: info about the automatic classification
| num | % | num changed | stage |
|---|---|---|---|
| 102 | 4.4% | 0 | 00-reverts |
| 88 | 3.8% | 0 | 01-style |
| 254 | 10.9% | 0 | 02-filenames_wildcards |
| 84 | 3.6% | 0 | 02b-filenames_wildcards2 |
| 992 | 42.5% | 0 | 03-filenames_plain1 |
| 690 | 29.5% | 0 | 04-filenames_plain2 |
| 57 | 2.4% | 0 | 05-summary-prefix |
| 68 | 2.9% | 0 | Manually-classified commits |
| 1 | 0.0% | 0 | Unclassified commits |
debug: more stats
| num | % | stage |
|---|---|---|
| 0 | 0.0% | Misclassified commits |
| 2267 | 97.0% | Classified commits, no corrections |
debug: groups
| 76 | 3.3% | num in revert |
| 36 | 1.5% | num in fixes |
| 595 | 25.5% | num in consecutive |
| 707 | 30.3% | Commits in groups |
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.
debug: classified in
03-filenames_plain1 by
'RELNOTES'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
MFC after: 2 weeks Relnotes: yes
debug: classified in
05-summary-prefix by 'MFV:'
geneve creates a generic network virtualization tunnel interface for Tentant Systems over an L3 (IP/UDP) underlay network that provides a Layer 2 (ethernet) or Layer 3 service using the geneve protocol. This implementation is based on RFC8926. Reviewed by: glebius, adrian Discussed with: zlei, kp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D54172
debug: classified in
04-filenames_plain2 by 'sys/'
Oracle's previous support is no longer available to the project. Repeated attempts to find a sponsor within Oracle's cloud business have not been successful. The last published official images are from 15.0-RELEASE. https://marketplace.oracle.com/app/freebsd-release Relnotes: yes Sponsored by: SkunkWerks, GmbH Differential Revision: https://reviews.freebsd.org/D56360 MFC after: 3 days
debug: classified in
02-filenames_wildcards by '['.*Makefile',
'release/.*']'
NETWORKING is the documented placeholder, while /etc/rc.d/NETWORKING still provides the legacy alias NETWORK. The NETWORKING script was originally introduced to avoid conflicts with NetBSD's lowercase network script on case-insensitive file systems. The NETWORK alias was retained for compatibility with older scripts. Following the discussion in PR 293652, remove the legacy NETWORK alias from 16-CURRENT. Keeping both names adds more confusion than value now that NETWORKING is the documented placeholder and current base system and ports tree uses are already clean. Add an UPDATING entry to note that local RC scripts using REQUIRE: NETWORK should be migrated to REQUIRE: NETWORKING. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293652 Reviewed by: michaelo, jlduran Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56300
debug: classified in
03-filenames_plain1 by
'libexec/'
Implement RFC 4191 by handling received Router Adverisement (RA) packets with route information option. For default routes, use the route information's lifetime and preference to overwrite the RA's lifetime/preference. Also install and update more-specific route prefixes with the option's lifetime and expire them when their lifetime elapses. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263982 Reviewed by: markj Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Relnotes: yes Differential Revision: https://reviews.freebsd.org/D55449
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netinet/', 'sys/netinet6/']'
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a, a.k.a. 21.1.8 release. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
05-summary-prefix by 'Merge '
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'sys/'
Import groups(7) from NetBSD, with tweaks for our system. The group list is sorted by GID. All the group names from /usr/src/etc/group are described, except "uucp". The FILES section was added on top of the original manual page. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264966 Relnotes: yes MFC after: 3 days Obtained from: NetBSD Reviewed by: des, ziaee Differential Revision: https://reviews.freebsd.org/D54114
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: kevans Sponsored by; Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D56710
debug: classified in
03-filenames_plain1 by
'RELNOTES'
Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts. Refactor the FILES section of the ports reference manual into a bigger table with three sections separated by root directory. Remove preceeding article from all but "the big Kahuna", and root dirs where reasonable. MFC after: 3 days Relnotes: yes Reported by: adamw, arrowd, linimon Differential Revision: https://reviews.freebsd.org/D55441
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
"bsdinstall script" will now do a pkgbase installation by default. The system components to install can be specified in the COMPONENTS variable, and have the same names as those used in the interactive installer. bsdinstall will still do a legacy distset installation if DISTRIBUTIONS is defined in the installerconfig file. MFC: 1 week PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290375 Sponsored by: ConnectWise Reviewed by: ziaee, ivy, jduran Differential Revision: https://reviews.freebsd.org/D56717
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The EC2 "base" flavour installs the devel/py-awscli package at boot time by default; we don't do this in the "small" flavour, so the default behaviour was to update the FreeBSD-ports repository and then do nothing with it. Turn off firstboot_pkgs by default; if someone is using the "small" flavour of AMIs and wants to install packages at instance launch time, they simply need to add 'firstboot_pkgs_enable="YES"' to /etc/rc.conf (which they must already be editing via user-data, in order to provide the list of packages they want installed). Sponsored by: Amazon MFC after: 3 days MFC to: stable/15 Relnotes: EC2 "small" images now have firstboot_pkgs_enable="NO".
debug: classified in
02-filenames_wildcards by
'release/.*'
In our routing stack implementation, metric is an attribute of the nexthop, not the route itself. Store metric in nhop_priv which is control-plane data of nexthop, filter the nexthops by metric and populate the mpath slots in nexthop group with only the lowest metric nexthops for use in the forwarding path. `cmp_priv()` compares nhops based on priv hash. Add metric compare logic to it and only return nexthops with different metrics if the input nexthop's metric is zero (wildcard). Also, add support for metric via rtsock by introducing rmx_metric. Finally, remove the upper 8-bit reservation of weight for administrative distance. Reviewed by: adrian Discussed with: markj Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56322
debug: classified in
03-filenames_plain1 by
'sys/net/'
By design, mac_do(4) only authorizes credentials change requests if they
are issued by a process spawned from '/usr/bin/mdo'. The executable
paths feature introduces some flexibility by allowing to change that
path, thus allowing another executable to make requests, and to use
multiple such paths (up to 8 in the current implementation). Its
purpose is to enable thin jails scenarios where mdo(1) may not be at its
canonical path ('/usr/bin/mdo') and to allow experimenting with other
userland programs leveraging setcred(2).
Configuration of executable paths is per-jail and intentionally works
completely similarly with rules. It is accessible from within a jail
through the 'security.mac.do.exec_paths' sysctl knob and from outside
a jail through the 'mac.do.exec_paths' jail parameter.
This commit groups the verbatim changes of the following commits that
Kushagra Srivastava, our GSoC 2025 student, created in his GitHub
repository (https://github.com/thesynthax/freebsd-src), branch
'task/exec-paths-refactor':
mac_do(4): Complete refactor of allowed executable paths feature
mac_do(4): Fixed changing security.mac.do.* knobs in inheritance mode
mac_do(4): Debugging rules and exec_paths leak on destroy
mac_do(4): Deep copy rules
mac_do(4): Fixed leak
mac_do(4): fixed various bugs, structs inlined, leaks remain
mac_do(4): MAC/do working in jail, leaks decreased
mac_do(4): MAC/do fixed, works in host and jails, leaks removed
mac_do(4): style
Frozen log for these commits:
https://github.com/OlCe2/freebsd-src/compare/main...14fdc49fb29265fac5d0daf95a13d0dce325c951.
The corresponding pull request is at:
https://github.com/OlCe2/freebsd-src/pull/2.
The GSoC's final state of this code still has a number of problems that
are fixed in subsequent commits. It is however committed separately to
clearly delineate Kushagra's work.
Reviewed by: olce (amendments to come, see above)
MFC after: 1 month
Relnotes: yes
Sponsored by: Google LLC (GSoC 2025)
Sponsored by: The FreeBSD Foundation (review, commit)
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
Long file names are using UTF-16 symbols to represent international or special characters. The implementation in FreeBSD did not support the "Supplementary Private Use Area-B" (PUA-B), which requires a surrogate pair to be represented in UTF-16 (Unicode code points beyond U+FFFF). The PUA-B is used to represent emoji characters, which are supported in file names on other common operating systems. The motivation for this change was that removable media written on another system were only partially readable on FreeBSD, since they contained emojis in file names. A test script that verifies correct operations on files names with emojis has been added to the tools/test/stress2/misc directory under the name msdos24.sh. Reported by: Fabian Keil <fk@fabiankeil.de> Reviewed by: ib Approved by: mkcusick MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D57313
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The Linux getsockopt did not check the size of the provided buffer when copying out the value, leading to buffer overflows (e.g., for TCP_INFO). Fix is to use the smaller of the option value size and the provided buffer. MFC after: 1 month Relnotes: yes Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D55881
debug: classified in
04-filenames_plain2 by 'sys/'
Implement the getsockopt for TCP_INFO by mapping FreeBSD's version to what Linux expects. MFC after: 1 month Relnotes: yes Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55882
debug: classified in
04-filenames_plain2 by 'sys/'
Commit 6024e3f99a1e ("Add audio group") introduced GID_AUDIO, initially
for virtual_oss(8) loopback devices. Now make all of them with
GID_AUDIO.
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/35
debug: classified in
05-summary-prefix by 'sound:'
Change powerpc64le's long double from 64-bit double to IEEE 754 binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64. Gated on FreeBSD 16 and powerpc64le only. Differential Revision: https://reviews.freebsd.org/D57388 Reviewed by: adrian Relnotes: yes
debug: Commit manually moved from "unknown" to "hardware".
Note: We confusingly have the instructions to build the system in the build manual, the UPDATING file, and the Makefile. These will get out of sync and will be harmful when they do. Fixes: https://cgit.freebsd.org/src/commit/?id=ddf6fad0295a ("etcupdate: Make nobuild the default") Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57644
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: olce Relnotes: yes Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55629
debug: classified in
03-filenames_plain1 by
'sys/x86/'
For firewall_allowservices and firewall_trusted, if an element of the list looks like an absolute path, read the file, skipping comments and blank lines, and treat the first word on each line as an address or subnet to be added to the list. We should probably be using tables instead, but this is still an improvement over the status quo ante. MFC after: 1 week Relnotes: yes Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D57679
debug: classified in
03-filenames_plain1 by
'libexec/'
Commits about commands found in man section 1 (other than networking).
Netlink usage is growing in FreeBSD. This patch adds support to `truss(1)` to decode Netlink headers in sendmsg/recvmsg calls, making debugging network configuration tools significantly easier. Changes: libsysdecode: Add `sysdecode_netlink()` to parse struct `nlmsghdr`. truss: Detect `AF_NETLINK` sockets and decode the message payload. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Github PR: https://github.com/freebsd/freebsd-src/pull/1950
debug: Commit manually moved from "unknown" to "userland".
We use -xattr in our openrsync tests for convenience, and it seems like a good addition to FreeBSD. -xattr and -xattrname will both consult all available namespaces by default, but -xattrname allows filtering by namespace using a "user:" or "system:" prefix. Inspired by: https://github.com/apple-oss-distributions/shell_cmds Reviewed by: kib, rmacklem Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55286
debug: classified in
04-filenames_plain2 by
'usr.bin/'
The default history size in bin/sh is currently 100 however POSIX.1-2024 mandates that a default greater than or equal to 128 shall be used, therefore this increases the default history size in /bin/sh to 128. POSIX standards reference: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sh.html#tag_20_110_08 MFC after: 3 days Reviewed by: emaste, jilles, jlduran, ziaee Signed-off-by: Kristofer Peterson <kris@tranception.com> Closes: https://github.com/freebsd/freebsd-src/pull/2093
debug: classified in
03-filenames_plain1 by 'bin/'
* Use xo_warn() / xo_err() instead of warn() / err(). * Add a test case for the POSIX-mandated stdout error check. * While here, don't assume the size of off_t, address some style issues, and broaden the use of bool instead of int. * Reorder SEE ALSO section. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D56402
debug: classified in
04-filenames_plain2 by
'usr.bin/'
When using PART_KIND_FILE (-p type:=filename), mkimg uses a colon to separate an optional offset (e.g., filename:offset). strsep() was being used to split the string at the first colon. This caused failures when the filename itself contained a colon (e.g., "th:is"). This patch uses stat() to check if the entire string exists as a file. If so, use it directly without splitting. If the full string is not a valid file, fall back to splitting at the right-most colon using strrchr(). Uses errc() to fail and exit immediately when an existing directory is input instead of a file in PART_KIND_FILE mode. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257960 Signed-off-by: Aaditya Singh <aadityavksingh@gmail.com> Reviewed by: jlduran Pull Request: https://github.com/freebsd/freebsd-src/pull/2041
debug: classified in
04-filenames_plain2 by
'usr.bin/'
This usually gets bumped by re@ when the version number changes in sys/conf/newvers.sh, but apparently we forgot for the past two major versions.
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55461
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Format the message. Convert category to the source name if known. Still print the raw value for the category, and the values of the EXTERROR() optional arguments. Requested and reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56542
debug: classified in
04-filenames_plain2 by
'usr.bin/'
so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video). se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off). mr=\E[7m (reverse video) is correctly defined in the same entry. screen-256color inherits from screen via tc=screen and is fixed transitively. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294499 Pull Request: https://github.com/freebsd/freebsd-src/pull/2139 MFC after: 1 week Signed-off-by: Dan Mahoney <freebsd@gushi.org>
debug: Commit manually moved from "unknown" to "userland".
This makes it consistent with libc formatting. Requested by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.bin/'
ident: Clean up * Use libcasper instead of reinventing it. * Add long option support. * Drop pointless use of temporary locales. * Consistently check for stdio errors. * Clean up the code. * Clean up and expand the tests. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56505
debug: classified in
04-filenames_plain2 by
'usr.bin/'
ident: Fix typo in manual page Fixes: https://cgit.freebsd.org/src/commit/?id=394f6b1b0a65 ("ident: Clean up")
debug: classified in 01-style
by '[tT]ypo'
debug: moved to userland
because 'Need to be grouped with
394f6b1b0a658755a9420906fb7a459c3d9501a5'
* Error out if more than one argument is given. * Check for stdio errors. * Clean up the code. * Clean up and expand the tests. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56506
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Set the -f flag to sh(1) to disable pathname expansion. Also, quote the jail variable to ensure correct behavior when passed to jexec(8). Signed-off-by: Nami Arjmandi <namiarjmandi@gmail.com> Reviewed by: pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2158
debug: classified in
03-filenames_plain1 by 'bin/'
Things like `{ some_program; } >/dev/null` use vfork, so use vfork
similarly for things like `some_program >/dev/null`.
This cannot be done for command substitutions, because of two problems:
* Redirections might cause the error message for later redirections or
for an unknown command to be sent to the pipe (to be substituted), and
this might cause a deadlock if the message is too long.
* The assignment of the pipe needs to come before instead of after the
redirections.
Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D55190
debug: classified in
03-filenames_plain1 by 'bin/'
Pseudo filesystems (e.g., procfs) advertise a zero file size. Fix reverse() to handle such a case similarly as forward() so that '-r' works on pseudo filesystems. Signed-off-by: Aaron LI <aly@aaronly.me> Reviewed by: pouria, Ricardo Branco <rbranco@suse.de>, des Fixes: https://cgit.freebsd.org/src/commit/?id=1fb3caee7 ("tail: Do not trust st_size if it equals zero.") Pull-Request: https://github.com/freebsd/freebsd-src/pull/2080
debug: classified in
04-filenames_plain2 by
'usr.bin/'
If the /sbin/init binary is broken somehow, the way out is to set the loader environment variable init_path to something else. The most natural choice would be either /bin/sh or /rescue/sh. Unfortunately, this does not work because the init process starts withoud stdin/out descriptors. Make it nicer to users by teaching /bin/sh startup code to open standard descriptors on /dev/console if the shell is run as init. Reviewed by: imp, jilles, zlei Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56536
debug: classified in
03-filenames_plain1 by 'bin/'
stat: fix use of devname(3) Besides being a little hard to parse through visually, this had its own bug of inspecting st->st_mode to determine what to pass to devname(3), which is only correct for st_rdev. For st_dev, you're likely to be looking at files or directories and attempting to assess what device they're located on, so the mode is meaningless- we just have to assume that our filesystems are on character devices and attempt to resolve st_dev as such. Reviewed by: des, kib (previous version) Differential Revision: https://reviews.freebsd.org/D56565
debug: classified in
04-filenames_plain2 by
'usr.bin/'
stat: The devname test case requires root Fixes: https://cgit.freebsd.org/src/commit/?id=4d4acdbfc22c ("stat: fix use of devname(3)")
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
debug: moved to userland
because 'Need to be grouped with
4d4acdbfc22c84081037f31cff4fb03d18373036'
We haven't pulled from upstream in over 15 years, and the codebases have diverged so far it is unlikely that we ever will. * Drop NetBSD and OpenBSD version control information. * Drop support for building on non-BSD / non-POSIX platforms. * Fix a few minor style issues. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56771
debug: classified in
04-filenames_plain2 by
'usr.bin/'
When operating on a file descriptor, acquire_lock() would ignore the flags argument and always operate in non-blocking mode, resulting in unnecessary busy-looping. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294832 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56722
debug: classified in
04-filenames_plain2 by
'usr.bin/'
The uses of PAGE_SIZE and roundup2() require param.h. MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.bin/'
MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Reported by: bz Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by
'usr.bin/'
tftp: Simplify URI handling * No need to copy our argument into a new buffer; it is writeable and will not be reused after we return. * Instead of constructing the string "get path" and then splitting it into an argument vector, just construct the vector directly. This avoid potentially overrunning the buffer. * Call settftpmode() just once, with either the default mode or the user-provided value we already validated. * Use errx() instead of fprintf(stderr) + exit(). Reported by: Moyao, Minghao Fu MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57070
debug: classified in
04-filenames_plain2 by
'usr.bin/'
tftp: Close files when we're done with them Also, delete the file we created if receiving it failed. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57071
debug: classified in
04-filenames_plain2 by
'usr.bin/'
tftp: Fix handling of port name or number MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57105
debug: classified in
04-filenames_plain2 by
'usr.bin/'
tftp: Replace fgets with getline MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57072
debug: classified in
04-filenames_plain2 by
'usr.bin/'
When reading from standard input with editline history enabled, increase buffer size to accomodate long lines so that history is recorded correctly. Cleanup el_gets() handling avoiding potentially dangerous retention of pointers to editline buffers across calls. Ensure struct parsefile objects are properly zero initialised when created. Remove push argument from setinputstring() and simplify logic as it was always called with a value of one and as was written was potentially dangerous if ever called with a value of zero. This commit does not fix long lines when history is enabled but editing is not (e.g. if there is no terminal). MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2028 Signed-off-by: Kristofer Peterson <kris@tranception.com>
debug: classified in
03-filenames_plain1 by 'bin/'
Previously write_fnt_source always returned 0, silently discarding errors. Return rv so that errors set vtfontcvt's shell exit appropriately. Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Historical precedent seems pretty consistent: size limits have singular names, number limits have plural names. RLIMIT_VMM broke this, and I made matters worse by referring to this limit as “vmms” in limits(1). Consistently use “vms” everywhere user-visible, while leaving the question of whether or not to rename RLIMIT_VMM itself for another day. Fixes: https://cgit.freebsd.org/src/commit/?id=1092ec8b3375 ("kern: Introduce RLIMIT_VMM") Fixes: https://cgit.freebsd.org/src/commit/?id=53af2026f213 ("limits: Unbreak after RLIMIT_VMM addition") Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D57265
debug: Commit manually moved from "unknown" to "userland".
This is not a big deal since it only iterates once before exiting, but that's no reason to set a bad example. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195128 MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D57251
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Introduces the -z <max_cmp_size> flag, enabling users to set a custom file size limit for pre-installation change checks and avoiding future hard-coded limit modifications. Reviewed by: glebius Approved by: glebius (mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57230
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Preserve metadata and prevent redundant disk writes during builds with the install's -C (compare) flag. The previous historical comparison limit of 16MB is insufficient for modern toolchains, frequently choked or bypassed by a large base components like LLVM/Clang, kernels, Rust apps, and large runtime libraries. By leaving matching files alone, install keeps their modification timestamps intact. make(1) safely ignores those files on subsequent runs. Base examples: 15.0 amd64 GENERIC kernel - 28MB, clang - 105MB, lldb - 97MB, etc. Reviewed by: glebius Approved by: glebius (mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57271
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Since the factor is not 1, we need to provide a unit. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=5d92f20c7d31 ("bin/sh: support RLIMIT_PIPEBUF") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57352
debug: classified in
03-filenames_plain1 by 'bin/'
Cannot strip the target if creating a link. Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57398
debug: classified in
04-filenames_plain2 by
'usr.bin/'
After git commit c8d40bf8ecc60cc15e3904410db62065ea681fdc, if fd 0 was not open, it is left with CLOEXEC set and therefore fails. This is an unlikely situation, but fixing it reduces the size of the code (by using posix_spawn_file_actions_adddup2's special case if the two file descriptor numbers are the same). At the same time, check the error code from posix_spawn_file_actions_adddup2. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D56910
debug: classified in
04-filenames_plain2 by
'usr.bin/'
* pipebuf is a size but is listed as a count PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295623 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=f54f41403d14 ("usr.bin/limits: support RLIMIT_PIPEBUF") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57456
debug: classified in
04-filenames_plain2 by
'usr.bin/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295893 Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57493
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Removes the file size limit for -C comparisons. The limit was meant to prevent oversized mmap allocations, which is no longer relevant as mmap is no longer used here (removed by a0439a1b820fa0e742c00d095f5f5c06f5f19432, review D44809). Credit to bdrewery. See: https://reviews.freebsd.org/D57230 Reviewed by: bdrewery, glebius, ziaee Approved by: glebius (mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57503
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Replace the unconditional fflush(stdout) in grep_printline and procmatches with a periodic timer that flushes at most once every 100ms. This preserves interactive responsiveness (grep | tee, grep | tail -f) while avoiding 1M+ write(2) syscalls when processing large inputs. The flush interval is tracked via clock_gettime(CLOCK_MONOTONIC) and a static timespec. --line-buffered continues to flush immediately via setlinebuf(3), as before. Benchmark on 1M lines (37MB output to file): unconditional fflush: 1.90s (sys 1.22s) periodic 100ms timer: 0.49s (sys 0.007s) Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57528
debug: classified in
04-filenames_plain2 by
'usr.bin/'
The -w option checks word boundaries before and after each potential
match by decoding the adjacent character. This was done via the
heavyweight sscanf(3) with "%lc", which goes through the full scanf
parser and locale-aware mbrtowc(3) machinery even for simple ASCII.
Replace with a three-tier fast path:
1. ASCII bytes (< 0x80): simple isalnum(3) / '_' comparison
2. UTF-8 continuation bytes (0x80-0xBF): interior bytes of a multi-byte
character are always word characters -> no further decoding needed
3. Multi-byte start bytes (>= 0xC0): decode with mbrtowc(3) directly
instead of sscanf(3)/%lc, avoiding scanf parser overhead
Benchmark with ministat(1) (10 runs each):
Worst-case ASCII (100k lines of 100 'a' chars, -w 'a'):
Difference at 95.0% confidence: -15.3% +/- 3.1%
Worst-case Unicode (50k lines of 100 accented 'e', -w 'e'):
Difference at 95.0% confidence: -11.2% +/- 4.7%
Normal -w (500k lines, -w 'the'):
Difference at 95.0% confidence: -18.1% +/- 3.6%
French text (100k lines, -w accented 'ete'):
Difference at 95.0% confidence: -18.0% +/- 4.1%
Non -w case shows no regression.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57587
debug: classified in
04-filenames_plain2 by
'usr.bin/'
MFC after: 1 week Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Track AF_NETLINK socket file descriptors in procinfo using fd_domain entries and use them to detect Netlink traffic across later syscalls. Add Netlink payload decoding support for sendto(), recvfrom(), and sendmsg() paths by integrating sysdecode_netlink() into BinString and Msghdr argument handling, with fallback to existing binary/iovec printing when decoding fails. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored by: Google LLC (GSoC 2026) Pull Request: https://github.com/freebsd/freebsd-src/pull/2295
debug: classified in
04-filenames_plain2 by
'usr.bin/'
Man pages, release notes, etc.
procctl.2: Align list indentation Remove 81 lines of whitespace at default manual rendering width. MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
procctl.2: remove space at EOL Fixes: https://cgit.freebsd.org/src/commit/?id=db9bbe131c92f55e6cf03657dc030c9eea93a9fb
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Document two missing error conditions for mq_open(2): - EINVAL: returned when mq_maxmsg exceeds kern.mqueue.maxmsg or mq_msgsize exceeds kern.mqueue.maxmsgsize. - ENFILE: add kern.mqueue.maxmq sysctl name to the existing entry. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243209 Reviewed by: mhorne MFC after: 1 week Signed-off-by: Kit Dallege <xaum.io@gmail.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/2098
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D56222
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
libm's fmax and fmin family of functions treat +0.0 as greater than -0.0. This is not required by the C standard, so the user may not see this behaviour due to compiler optimization. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294214 Reviewed by: fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56230
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
Add error numbers to the exit codes so that readers can decode them without having to use a separate utility. Organize exits by error code. Mark up the error constants with the error constant macro, even though this is really not very helpful because people will search for the error code, the macro is explicitly for the constants and not the codes. While where, align and alphabetize the options list as well, fix misaligned padding in an example, and a one-sentance-per-line error. MFC after: 3 days Reported by: Antranig Vartanian <antranigv@freebsd.am> Differential Revision: https://reviews.freebsd.org/D48470
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
See also: D55834, D56236 MFC after: 1 month
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Commit 8b9775912cbc added support for an NFSv4 mounted root file system. This patch documents how to set this up. It also includes some minor updates and fixes some formatting. This is a content change. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56317 Fixes: https://cgit.freebsd.org/src/commit/?id=8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56362
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add geneve parameters to ifconfig manual. Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D55181
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days Reviewed by: Aaron Li <aly@aaronly.me>, ziaee Differential Revision: https://reviews.freebsd.org/D56090
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285744 Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56285
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D56384
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Explain how SIGTHR is used and that it should be not touched by user code. Note about SIGLIBRT. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D56384
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The FreeBSD shell is a POSIX compatible shell. It evolved over several decades from the Almquist shell, which was preceeded a decade before that by the Bourne shell. Most readers today have never seen a Bourne shell. If someone wants to learn to use our shell, they need to look for tutorials on the POSIX shell. Align descriptions through out the tree with this reality, consistent with it's manual and common parlance. We made a similar change to the doc tree in b4d6eb01540fe. MFC after: 3 days Reviewed by: carlavilla Differential Revision: https://reviews.freebsd.org/D56382
debug: Commit manually moved from "unknown" to "doc".
Break the examples into subsections, so that we can have multi-step examples. MFC after: 3 days (to 15 only) Discussed with: ivy Differential Revision: https://reviews.freebsd.org/D55526
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days Reviewed by: ivy, emaste Discussed with: bapt, des, emaste, ivy, phk, pi Differential Revision: https://reviews.freebsd.org/D55458
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=7b35b4d19630 ("sockstat: add libxo support")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Fix several incorrect sysctl.3 type and mutability descriptions so the manpage matches the actual kern and kern.proc interfaces. Signed-off-by: Tyler Waddell <tyler.waddell112@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2128
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The man page used "trimmed" to describe log rotation, which is misleading as it suggests the file is truncated to a specific size rather than being rotated (renamed and a new file created). Replace all instances of "trimmed" with "rotated" to match the actual behavior and the terminology used elsewhere in the page. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278671 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp,ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/2099
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56225
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Now that i386 kernels are deprecated, we don't really need to mention this limitation. It's also a bit dated since PKRU is supported with 5-level paging as well. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56415
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
There are cases where the kernel will be able to access memory covered by a PKRU key which nomially prohibits accesses. I believe regular copyin()/copyout() are subject to the contents of PKRU, but memory accesses via uiomove_fromphys() will not be. This can arise when performing fault I/O, for instance. I didn't test, but I suspect AIO is another case. Update the man page to acknowledge this. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56416
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
+ s/ntp/ntpd/ for correctness + apropos results in document description + silence a linter warning by escaping a period with a zero-width space MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The example provided puts the semicolon in the wrong place. It must come after the file:// specification, not in it. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
See also: https://github.com/freebsd/virtual_oss/issues/2 Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week Reviewed by: imp, markj, jhb Differential Revision: https://reviews.freebsd.org/D56499
debug: Commit manually moved from "unknown" to "doc".
debug: classified in
03-filenames_plain1 by
'tools/kerneldoc/'
Since pdrfork will be included in FreeBSD 15.1 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56513
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
`pfctl -A`, `-N`, `-O`, and `-R` restrict which rule types and options
are loaded. The man page language ("Load only...") does not make it
clear that these options can be combined to (re)load multiple rule types
and/or options without reloading the entire packet filter.
Add language to make it explicitly clear that these flags combine.
Reviewed by: kp
Signed-off-by: Ross Williams <ross@ross-williams.net>
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: markj, Ricardo Branco <rbranco@suse.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56507
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The gpart manual says that sizes are specified in blocks, unless an SI unit suffix is provided. This confuses new operators because GEOM uses binary bytes, a large difference at modern storage pool sizes. Rewrite suffixes in all GEOM manuals to consistently clarify this, matching what we and the rest of the industry have been doing in other documentation. While here, use non-breaking spaces between numbers and units, unless they are already written with a hyphen. MFC after: 3 days Reviewed by: fuz Reported by: bbaovanc <bbaovanc@bbaovanc.com> Differential Revision: https://reviews.freebsd.org/D56534
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Some targets override the default value of DISTRIBUTIONS. Document that in the manual page. Reported by: Nia Alarie <nia@NetBSD.org> Reviewed by: jlduran MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56528
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Last time I generated this, there were many copies of WITH_CASPER for reasons unknown. Sponsored by: Netflix
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Previous authors appear to have prioritized brevity over clarity. This unfortunately resulted in a manual page that left its reader with the false impression that Kyua is difficult to use. Attempt to correct this by providing more and simpler examples with longer explanations. While here, correct outdated information about where Kyua stores its logs and results. MFC after: 1 week Reviewed by: ziaee, ngie Differential Revision: https://reviews.freebsd.org/D56475
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation Reviewed by: bapt, philip Approved by: philip (mentor)
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
build.7: Improve make delete-old example Be more explicit that deleting old files and libraries needs to be really after you're rebooted a third time and you're really actually sure your applications aren't using old libs, following irc discussion. Also adjust an example slightly to fit on 80 character console. MFC after: 3 days Discussed with: emaste, fuz, jhb Differential Revision: https://reviews.freebsd.org/D54079
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
build.7: Explain packaging a custom kernel MFC after: 3 days (to 15 only) Requested by: vermaden Discussed with: emaste, ivy, Mark Millard <markmi_dsl-only.net> Differential Revision: https://reviews.freebsd.org/D56217
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
build.7: Explain specifying multiple KERNCONFs MFC after: 3 days Reviewed by: ivy, mhorne Differential Revision: https://reviews.freebsd.org/D56281
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days (to 15) Discussed with: bapt, emaste, ivy Differential Revision: https://reviews.freebsd.org/D56389
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56463
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
- Add `.Nm` section for securelevel(7) to match corresponding MLINKS entry. - Fix the spelling for mac(4) (the actual subsystem manpage is spelled out in lowercase. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
- Rename `.Nm .rhosts` to `.Nm rhosts` to match the MLINK for the manpage. - Use `.Pa` instead of `.Nm` when discussing the paths for `.rhosts` and `hosts.equiv.5` for explicitness and clarity. Bump .Dd for the change. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294757 Reported by: Ulrich Eduard MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Describe how the LoaderEnv and NextLoaderEnv variables can be used. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293054 Reviewed by: imp Sponsored by: Wiesbaden Hackathon 202604 Differential Revision: https://reviews.freebsd.org/D56633
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Noted by: mckusick
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: imp, jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56536
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: imp, jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56536
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
"filedescriptors" is the odd one out when looking at other manual pages. MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264966 MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days Reported by: kevans Reviewed by: kevans, ngie Differential Revision: https://reviews.freebsd.org/D56607
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: kevans Sponsored by; Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D56710
debug: classified in
03-filenames_plain1 by
'RELNOTES'
The doxygen tooling has supported ingesting markdown files for a number of years. Adding this option allows them to be ingested into the subsys builds. Reviewed by: netchild Differential Revision: https://reviews.freebsd.org/D56652
debug: classified in
03-filenames_plain1 by
'tools/kerneldoc/'
Which contains only the source code file. While here, remove trailing empty lines in the end of the page. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D56659
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
We note a reason why you might need it, but there's an equally important reason you may need to omit it: interpreted programs. Add a note accordingly, along with the workaround configuration if there's reason you can't help it. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294780 Reviewed by: Jan Bramkamp <crest_freebsd_rlwinm.de>, kib Differential Revision: https://reviews.freebsd.org/D56704
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719 MFC after: 1 month
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts. Refactor the FILES section of the ports reference manual into a bigger table with three sections separated by root directory. Remove preceeding article from all but "the big Kahuna", and root dirs where reasonable. MFC after: 3 days Relnotes: yes Reported by: adamw, arrowd, linimon Differential Revision: https://reviews.freebsd.org/D55441
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Three architecture dependent manuals are installed to MANSUBDIRs, creating at least two empty manual page directories on everyone's boxxen. Move those manuals to their canonical area, enhancing clarity, grepability, removing useless inodes, and increasing consistency with the rest of the architecture dependent manuals which are unconditionally installed, and noted at the top of the rendered manual. MFC after: 3 days
debug: Commit manually moved from "unknown" to "doc".
+ more consistent document description + enumerate available options in synopsis in vt.4 style + tag spdx + tweak list rendering + cleanup HARDWARE + reflow excessively long lines silencing linter warnings + fix link macros MFC after: 3 days Reported by: michaelo (hardware notes) Differential Revision: https://reviews.freebsd.org/D56753
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The current text fails to draw the reader's attention to the fact that VIS_SAFE essentially exempts certain characters from being encoded. While here, fix some markup nits. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56716
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 day Discussed with: bcr, ivy, kevans, ngie Differential Revision: https://reviews.freebsd.org/D56608
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, remove empty sections from cam.4. MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=1a7151f79664 cam: Add probes for xpt actions
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Update smartpqi(4) to document the dev.smartpqi.<unit>.debug_level sysctl for runtime debug level changes, and note that device add/remove and controller event messages always appear in dmesg regardless of the debug_level setting. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294161 Reviewed by: imp Approved by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56832
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
- speaker(4) was recently modernized to lock the driver per-playback instead of per-open. Update the man page to explain this change. - added a reference to MML and SMX in the historical context to make it easier for users to find additional documentation online. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: ziaee Closes: https://github.com/freebsd/freebsd-src/pull/2183
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
See also: D53951, https://wiki.freebsd.org/C23 MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
We now have .St -isoC-2023, so the STANDARDS section can go live. Fixes: https://cgit.freebsd.org/src/commit/?id=9b5d724cad10087e34165199e55f15f2df744ed5 MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
03-filenames_plain1 by
'RELNOTES'
"w" is a command modifier, not an argument. Use Cm. Fixes: https://cgit.freebsd.org/src/commit/?id=2cdff9918e79 byhve: add option to specify IP address for gdb MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
For all: - harmonize Copyright/license section according to style.9 and used SPDX only. - mention that the current generation of the driver is based on Linux version 7.0. - make linuxkpi.4 and linuxkpi_wlan.4 .Xr as the man pages do exist these days. iwlwifi: update the card/chipset names supported (while we still can) iwlwififw: leave a comment only that we can no longer update the man page and it will be removed in the future. rtw88: update supported chipsets and add note to BUGS sections rtw89: update supported chipsets and add note to BUGS sections Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57019
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Describe `-weight` argument in the route manual. Reviewed by: glebius, ziaee Differential Revision: https://reviews.freebsd.org/D56246
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57012
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
nlist.3: Replace a.out(5) Xref with elf(5) ELF support was added to nlist() in 1997, and a.out support was removed in 2020. The man page was not updated for either of these changes. Fixes: https://cgit.freebsd.org/src/commit/?id=77909f597881 ("Initial elf nlist support, ...") Fixes: https://cgit.freebsd.org/src/commit/?id=86cfa7e70b2b ("nlist: retire long-obsolete aout support") Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
nlist.3: Add stab(5) Xref Commit 876a17321c89 removed the a.out Xref as nlist(3) no longer supports a.out, but this left nlist(3) without a reference to a page documenting struct nlist. struct nlist is documented in both a.out(5) and stab(5), so add an Xref to the latter. Reported by: brooks Fixes: https://cgit.freebsd.org/src/commit/?id=876a17321c89 ("nlist.3: Replace a.out(5) Xref with elf(5)")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
nlist.3: Clarify which symbol table is used nlist() requires section headers, and currently fetches symbol names only from SHT_SYMTAB, Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57065
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
nlist.3: Add discouraged use notice It is a relic from a.out days and is poorly specified. Although ELF support was added to nlist, there are better ways to access ELF data. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57078
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
nlist.3: Move deprecation notice after intro Its more clear and good practice for the first sentence of a description to describe what something is, because there are a lot of different use cases for documentation. Fixes: https://cgit.freebsd.org/src/commit/?id=94b7a335683a ("nlist.3: Add discouraged use notice") Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57128
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, tag spdx and sync the drivers in crypto(4)/SEE ALSO. MFC after: 2 days (add back hifn) Differential Revision: https://reviews.freebsd.org/D57060
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57141
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add metric implementation of netlink to manual. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56324
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Describe `-metric` argument in the route manual. Discussed with: ziaee Differential Revision: https://reviews.freebsd.org/D57025
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 minute Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: ziaee, mhorne, kevans
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The RETURN VALUES section used "instr" to describe the fts_set() argument, while the SYNOPSIS and all other references use "options". Fix the inconsistency. MFC after: 1 week Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/2213
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Since this manual describes the mdoc syntax throughout the ecosystem, I had to blend what we had before with what upstream is doing now. Thanks: adrian MFC after: 3 days (we shipped this doc in 15.0/14.4) Reviewed by: ivy, mhorne, des, adrian Discussed with: arch@ Differential Revision: https://reviews.freebsd.org/D56153
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: ziaee (via IRC) MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57211
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Both tools support controllers from both companies, so document it. Reviewed by: ziaee (via IRC) MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57212
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57162
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D57182
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56485
debug: classified in
03-filenames_plain1 by
'RELNOTES'
Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, reorder the table. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295618 MFC after: 1 week Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D57258
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, fix the bug of mentioning 'enable' as a possible value for the 'mac.do' jail parameter whereas it is 'new' instead. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Note that we still need to stat directories and the roots. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57325
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Align ordering between NAME & SYNOPSIS sections. Obtained from: https://github.com/apple-oss-distributions/libc Sponsored by: Klara, Inc.
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57370
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reported by: des Reviewed by: ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57409
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The five link flags get lost in prose. Reviewed by: ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57418
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285614 Reviewed by: ziaee, michaelo, jrm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49489
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Most architectures have the same signedness for char and wchar_t, but powerpc has the unusual combination of unsigned char and signed wchar_t. Reviewed by: des, jhb, markj Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
arch.7: Remove 32-bit powerpc from tables Most 32-bit architecture support has been deprecated for FreeBSD 16. Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57472
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
arch.7: Restore (non-SPE) 32-bit powerpc to MD tables powerpc is still relevant for lib32. powerpcspe cannot use lib32 so remains removed. Reported by: Minsoo Choo <minsoo@minsoo.io> Reviewed by: Minsoo Choo <minsoo@minsoo.io> Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=2ea49bb595df ("arch.7: Remove 32-bit powerpc from tables") Differential Revision: https://reviews.freebsd.org/D57473
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week Sponsored by: Klara, Inc. Fixes: https://cgit.freebsd.org/src/commit/?id=e030e4e73fe7 ("lib/libc/gen/fts.3: use 'options' consistently in fts_set() description") Differential Revision: https://reviews.freebsd.org/D57326
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Pull Request: https://github.com/freebsd/freebsd-src/pull/2243 Reviewed by: fuz MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, remove "The following UDF specific options are available:". It is unused and does not appear to have ever been used. MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
We've been using -O2 for about fifteen years. Reported by: Jan Stary <hans@stare.cz> MFC after: 1 week
debug: Commit manually moved from "unknown" to "doc".
No existing tests require it, and I cannot understand what kinds of test scenarios are supposed to require it. Just remove it. While here, improve the documentation of test variables a bit. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56604
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The --si option (human-readable output with SI units based on powers of 1000) was implemented but missing from both the SYNOPSIS and the options list. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265199 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2104
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Since commit 97e13037915c, the -P flag works without -R as required by POSIX. Update the man page to state that only -H and -L are ignored without -R, while -P can be used independently. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289959 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2102
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The FILES section listed /tmp/R* but the source code uses /tmp/mail.R* (e.g. mail.RsXXXXXXXXXX, mail.ReXXXXXXXXXX, mail.RxXXXXXXXXXX) as the mkstemp template prefix. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289980 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2103
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The clone_root script was removed from the tree in commit 7736786b08e8 but the diskless(8) man page still referenced it in two places. Remove both references. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292231 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2101
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add documentation for the vt_font, vt_keymap, vt_repeat, vt_saver, vt_screenmap, and vt_ttys commands which are available at runtime but were not listed in the man page. Also clarify that the existing syscons_* commands are for the syscons(4) console driver and remove stale commented-out entries. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291051 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2100
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The man page only mentioned jumbo frame support for the 8169, 8169S, and 8110S chips. The 8168 and 8111 family also support jumbo frames, with varying MTU limits depending on the chip revision (6K for C variants, 9K for D and later). Update the documentation to reflect the actual driver capabilities. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=160399 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2097
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add documentation for the ATU (Address Translation Unit) commands that were implemented but not documented in the man page: - atu dump: display the MAC address table - atu flush all: clear all dynamic ATU entries - atu flush port <n>: clear ATU entries for a specific port Also add atu to the SYNOPSIS section. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275413 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2096
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The man page incorrectly stated that hdestroy() calls free(3) for each comparison key. The implementation (hdestroy_r.c) only frees the internal table structure, not the user-provided keys or data. This matches POSIX, which says hdestroy "shall dispose of the search table" without mentioning key deallocation. Update the description to clarify that the caller is responsible for freeing any memory associated with table entries. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291240 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2095
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Suggested by: olce Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
This change documents the recently introduced changes to -p that allow users to specify CPU ranges instead of having to specify each individual mapping. While we're here, move the -p examples to the EXAMPLES section. Reviewed by: bcr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57480
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The amd64 UEFI loader executes in long mode, not protected mode. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57568
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57569
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/35
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Also unwind some parentheticals. MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295944 MFC to: 15 MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
sh: Improve function documentation * Mention that the function body can be in parentheses. It is already implied since the function body can be any valid statement, but it may not be obvious to a reader who has only ever seen functions that used curly brackets and assumes that they are part of the function syntax. * Remove the incorrect claim that a local statement may only occur at the top of a function. * Show that a value may be assigned to a variable in a local statement. * While here, replace unpaired double quotes with \(dq to avoid confusing syntax highlighters. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296050 MFC after: 1 week Reviewed by: ziaee, jilles Differential Revision: https://reviews.freebsd.org/D57596
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
sh: Belatedly bump manual page date Fixes: https://cgit.freebsd.org/src/commit/?id=556e793d803e ("sh: Improve function documentation")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
While here, fix missing comma typo. Reviewed by: 0mp, ziaee Approved by: 0mp, ziaee MFC after: 3 days Obtained from: https://github.com/apple-oss-distributions/libc (partially) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D57384
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
MFC after: 3 days Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57675
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: ziaee, ngie Approved by: ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=2f7a796b590e ("thunderbolt.4: Initial manual for HW Relnotes") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57668
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
The current verbiage somewhat indicates that always adjusts the time, which hasn't been true as far back as I had the energy to `git blame`. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57676
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
POSIX and the C standard now refer to objects and sequences rather than confusingly revering to strings. Also update bcopy(3) and bzero(3). Reviewed by: emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57680
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Fixes: https://cgit.freebsd.org/src/commit/?id=707347f88649 ("Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304") Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
As flagged by mandoc linter. Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Since building is no longer the default, add -b to the bootstrapping examples as they are likely to be run with a tree that hasn't been built. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=ddf6fad0295a ("etcupdate: Make nobuild the default") Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57643
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Suggested by: christos Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Without this one could be led to believe they should have an actual `/dev/bluetooth/xxx` device in devfs from just reading the examples. Event: Halifax Hackathon 202606 Reviewed by: christos Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57818
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194781 MFC after: 3 days Reviewed by: ziaee Event: Halifax Hackathon 202606
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Do capitalize "size". Don't gratutiously capitalize "char" any more than we do "make" further down. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D57820
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Reviewed by: imp, kevans Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57859
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from C23 and C++17 so prefer it to the homegrown __result_use_check. When __nodiscard does expand to [[nodiscard]] it must appear entierly before the function declaration (or between the function name and argument list) so relocate as appropriate. This differs from __attribute__((__warn_unused_result__)) used by __result_use_check which is more flexible. Reviewed by: imp, markj, emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D57881
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Add descriptions for NETLINK_GET_STRICT_CHK, NETLINK_MSG_INFO. Reviewed by: ziaee, obiwac Differential Revision: https://reviews.freebsd.org/D57520
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Pick the plural form in the sentence about running arbitrary commands in the security consideration section. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294497 Event: Halifax Hackathon 202606 Location: Couch
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
- Change the document description to "Via and Zhaoxin CPU crypto driver" - Add a HARDWARE section mentioning these in the hardware release note This manual still needs desperate help, but just this little bit could have saved a lot of confusion. I'd write more if I had information. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295517 Fixes: https://cgit.freebsd.org/src/commit/?id=14b8531c4ccb8 (Restore padlock_rng the the amd64 build) MFC after: 3 days (to 15 only) Reviewed by: bcr, asomers Differential Revision: https://reviews.freebsd.org/D57920
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Import the ENVIRONMENT section from NetBSD, minus the variable that our ctfmerge does not have. Alphabetize them, polish grammar and alignment, and add the variables to the man database. While here, remove whitespace from the end of some lines to quiet linter. MFC after: 3 days PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291186 Co-authored-by: Alexander Ziaee <ziaee@FreeBSD.org> Obtained from: NetBSD (christos <christos@NetBSD.org>, 8a0c0d8) Differential Revision: https://reviews.freebsd.org/D54054
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
Hardware drivers and architecture-specific code.
The condition after SYSCTL_IN was inverted: success (error == 0) returned immediately and skipped the NVRAM write path, while failure fell through. Return only when SYSCTL_IN fails. Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2113
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The kernel_pmap lock is a bit special: it does not need the DUPOK flag, and it really belongs to a different lock class. If it belongs to the same class as regular pmap locks, then witness may report warnings when performing UMA allocations under a regular pmap lock, if the allocation triggers a pmap_growkernel() call. Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init() calls to silence some witness warnings for harmless behaviour I see with some uncommitted test programs. Reviewed by: alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56185
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm/', 'sys/arm64/', 'sys/i386/', 'sys/powerpc/',
'sys/riscv/']'
We cannot have more than one SPMC device. Reviewed by: olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56062
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Microsoft added a new function index (turn on display, 9) to their DSM
set. This revision calls this, which fixes S0ix on certain machines,
such as the Lenovo Yoga Slim 7i Aura, who's ECs use this method as a
trigger to restore power to certain devices.
See commit 229ecbaac6b3 ("ACPI: x86: s2idle: Invoke Microsoft _DSM
Function 9 (Turn On Display)") on Linux.
Also see the following:
https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications#turn-on-display-notification-function-9
Reviewed by: olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56062
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This commit adds a shutdown splash to the existing kernel startup splash(4) screen feature. It can be customized by providing a PNG image to the shutdown_splash directive loader.conf(5). Sponsored by: Defenso MFC after: 2 weeks Reviewed by: vexeduxr, ziaee, manu Differential Revision: https://reviews.freebsd.org/D55140
debug: Commit manually moved from "unknown" to "hardware".
This patch changes the default value of the loader tunable hw.virtio.pci.transitional to 1. This means, virtio uses the modern mode for transitional devices by default. The return values of vtpci_modern_probe() and vtpci_legacy_probei() were chosen to prefer modern mode, but hw.virtio.pci.transitional=0 prevents modern mode. Setting hw.virtio.pci.transitional to 1 by default seems a better fit. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D55894
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Mark some snd_fmt* functions as static Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56238
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire unused CHN_N_* defines These still haven't been implemented by the original author, and there doesn't seem to be much use for them anyway. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56239
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Simplify parts of chn_notify() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56240
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: De-macro array definitions in chn_calclatency() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56263
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Make chn_reset() control flow clearer I think this is cleaner than playing around with return values. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56264
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Expose EQ by default The dev.pcm.%d.eq* sysctls and mixer "bass" and "treble" controls are exposed only if hint.pcm.%d.eq is set. However, there is no good reason why we shouldn't at least expose the controls, and let the user enable/disable/bypass equalization through the sysctl. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire FEEDEQ_BYPASS In effect, this is the same as the disable state. There is a comment that says the bypass state skips EQ altogether, which is what the disable should be. The disable state according to the comment disables EQ but keeps the EQ preamp (dev.pcm.%d.eq_preamp), however after testing it seems that the preamp does not really take effect, because with EQ disabled, feeder_eq is non existent, so we never execute any EQ code in the first place. Make things simpler and clearer and have 2 states; enable and disable, and do what they should do intuitively. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Remove dead EQ FEEDEQ_DISABLE code If EQ is disabled, we never reach those code paths in the first place. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire FEEDEQ_DISABLE We can do this more efficiently by just using the SD_F_EQ* flags. In fact, the dev.pcm.%d.eq handler will (un)set SD_F_EQ_ENABLED and this is what we actually test with when choosing to creating the EQ feeder or not, so setting the state to FEEDEQ_DISABLE does not really an effect in the first place. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire EQ states The SD_F_EQ_ENABLED does the same thing, and is actually what we test against in order to create the EQ feeder. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire hint.pcm.%d.eq_preamp It wasn't documented in the first place, but it is easier to just use the sysctl. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Start each channel individually Unlock all members before starting any of them. Holding multiple channel locks while calling chn_start() on a virtual channel can trigger the parent, which acquires PCM_LOCK() while other virtual channels are still locked -- a lock order reversal. Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D57399
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Include more information in kevent returned from the kernel Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D57362
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Adjust mmap example to use kqueue Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D57410
debug: classified in
05-summary-prefix by 'sound:'
sizeof(*sc->sc_ipimasks) * mp_maxid + 1 is parsed as (sizeof(*sc->sc_ipimasks) * mp_maxid) + 1, so the buffers were one byte short of a full (mp_maxid + 1) element count. Multiply by (mp_maxid + 1) for sc_ipimasks and sc_cpuids. Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed-by: kevans, ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2112
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Reviewed by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55606
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Previously, when entering s2idle, we were parsing the _S255D object to get the shallowest D-state supported by device, as acpi_stype_to_sstate() returns -1 for s2idle. Instead, we should read _S3D. Relevant document: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/07_Power_and_Performance_Mgmt/device-power-management-objects.html#s3d-s3-device-state Reviewed by: olce Tested by: emaste, olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55118
debug: classified in
03-filenames_plain1 by
'sys/dev/'
As soon as we need information from the hardware frame annotation to make sure that checksums of the ingress frames were verified by the DPAA2 HW, I've decided to make a preparation and extracted all of the frame related routines into the separate dpaa2_frame.[h,c] along with some clean up and improvements, e.g. no more dpaa2_fa, but dpaa2_swa and dpaa2_hwa structures to describe software and hardware frame annotations respectively, dpaa2_fa_get_swa/dpaa2_fa_get_hwa to obtain those annotations from the frame descriptor. The next step is to implement dpaa2_fa_get_hwa. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006 Approved by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56315
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Commit c8c37141 ("virtio_blk: Use bus_dma for command/ack buffer
allocations") failed to update initialisation of the dedicated dump
request structure. This caused a panic on attempting to dump core to a
virtio_blk device.
Reviewed by: asomers
Sponsored by: Arm Ltd
Pull Request: https://reviews.freebsd.org/D56156
debug: classified in
03-filenames_plain1 by
'sys/dev/'
.../sys/dev/hwpmc/hwpmc_mod.c:4640:1: warning: unused function 'pmc_is_multipart' [-Wunused-function]
4640 | pmc_is_multipart(struct pmc_sample *ps)
| ^~~~~~~~~~~~~~~~
1 warning generated.
Reviewed by: mhorne
Fixes: https://cgit.freebsd.org/src/commit/?id=e51ef8ae490f - main - hwpmc: Initial support for AMD IBS
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D56296
debug: classified in
03-filenames_plain1 by
'sys/dev/'
In ibs_stop_pmc I accidently cleared the fetch max count value rather than the op max count value, when stopping the op counter. This mitigates a bug in early pre-zen processors, but breaks using both counters simultaneously. I also found that the max op count mask needs to be extended for recent zen processors. Reported by: Andre Fernando da Silva Reviewed by: mhorne Sponsored by: Netflix Fixes: https://cgit.freebsd.org/src/commit/?id=e51ef8ae490f ("hwpmc: Initial support for AMD IBS") Pull Request: https://github.com/freebsd/freebsd-src/pull/2120
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Both fetch and op IBS sampling have the same problem where we need to rewrite the control MSR to ensure sampling continues at the correct rate. I also like this because it resets the counter reducing the chances that we collect a sample inside the NMI handler. Reported by: Aalok Agarwal Reviewed by: mhorne Sponsored by: Netflix Fixes: https://cgit.freebsd.org/src/commit/?id=e51ef8ae490f ("hwpmc: Initial support for AMD IBS") Pull Request: https://github.com/freebsd/freebsd-src/pull/2130
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This is part 3 of the support for the new Intel Ethernet E610 family of devices The ix driver now enables firmware logging on Intel E610 devices for debugging with Customer Support. Logs are enabled by default and generated in binary format that requires decoding by support teams. The collected data is firmware and hardware related for debugging purposes only. When the driver loads, it creates a fw_log sysctl node under the debug section. Events are organized into categories (modules) for targeted logging, and users can adjust verbosity levels as needed. This adds sysctl support for the firmware logging feature and updates the ix(4) manual page with documentation. Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com> Co-developed-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: ziaee, kbowling Tested by: Mateusz Moga <mateusz.moga@intel.com> MFC after: 1 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53973
debug: classified in
03-filenames_plain1 by
'sys/dev/'
We have a small buffer for pages on the stack, but if the user wants to do an I/O larger than this we currently fail w/o a way for the user to know the max size. It's not hard to allocate an array for the uncommon case of very large I/Os, and the performance advantage of the array is small in that case anyway. In addition, this allows firmware upgrades using the full transfer size of the device as a happy accident too. Sponsored by: Netflix Reviewed by: chs, chuck Differential Revision: https://reviews.freebsd.org/D55638
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56330
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Advertise IFCAP_WOL_MAGIC when PCI power management is available and enable it by default. On suspend or shutdown, rge_setwol() enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables the RXDV gate, and enables PM so the NIC stays powered to watch for magic packets. Move hardware-specific WOL register configuration into rge_wol_config() in if_rge_hw.c to keep hardware-specific functions in sync with OpenBSD. Update rge.4 to document WoL support. Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125 on a Gigabyte B650 Gaming X AX motherboard. Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56259
debug: classified in
03-filenames_plain1 by
'sys/dev/'
* migrate the MSM8916 (snapdragon 410) support to qcom_gcc * add the full qcom_gcc / qcom_clk list to files.arm64, replacing the MSM8916 stub in sys/arm64/qualcomm . Differential Revision: https://reviews.freebsd.org/D49706
debug: classified in
03-filenames_plain1 by '['sys/arm/',
'sys/arm64/', 'sys/dev/']'
Focus on the MRQE field of the MRQC register, which is 4 bits wide, and we use these 3 types of values. - IXGBE_MRQC_RSSEN 0x1 (non VF mode) - IXGBE_MRQC_VMDQRSS32EN 0xA (less than 33 VFs) - IXGBE_MRQC_VMDQRSS64EN 0xB (less than 65 VFs) If we always take a bitwise OR with IXGBE_MRQC_RSSEN, IXGBE_MRQC_VMDQRSS32EN will never be chosen. Select these 3 types of values for the proper case. Signed-off-by: Yuichiro NAITO <naito.yuichiro@gmail.com> MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2132
debug: classified in
03-filenames_plain1 by
'sys/dev/'
According to "HID Usage Tables FOR Universal Serial Bus (USB)" Usage Page ID range 0x93-0xF1CF is "Reserved" and Usage Page ID range 0xFF00-0xFFFF is "Vendor-defined". MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
These devices appeared to stop sending reports via mouse USB interface after switching to RAW mode. Fix it with changing Usage of Top Level Collection to one found in HID report descriptor of proper interface. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Before this change evdev interface sent only copy of data sent through the sysmouse interface. It worked as /dev/wsp0 device node was automatcaly opened by devd(8) with starting of moused(8). Starting with 15.0 moused(8) does not open sysmouse interface by default thus making wsp(4) device dysfunctional. Fix it with adding extra checks of interfaces state. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The size broke when upages was converted from array to double pointer. Reported by: gcc -Wsizeof-pointer-div Reviewed by: imp Fixes: https://cgit.freebsd.org/src/commit/?id=82ff1c334b97 ("nvme: Allow larger user request sizes") Differential Revision: https://reviews.freebsd.org/D56368
debug: classified in
03-filenames_plain1 by
'sys/dev/'
When modifying mappings in pmap we may need to perform a break-before-make sequence. This creates an invalid mapping, then recreates it with the changes. When modifying DMAP mappings we may be changing the mapping that contains its own page table then after breaking the old entry we are unable to create the new entry. To fix this create a map that can be used & won't be affected by the break-before-make sequence. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56306
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Support changing the property of a DMAP page that holds it's own page table entry. Because we need to perform a break-before-make sequence to change the properties of pages a page that also holds it's own page table entry will fault in the make part of the sequence. Handle this by mapping the page with a temporary mapping as we already do when demoting a superpage. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55943
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: mte: cleanup cache register definitions Cleanup the definitions in armreg.h for the CSSIDR_EL1, CLIDR_EL1 and CSSELR_EL1 system register to prepare for additional bitfeilds for Memory Tagging Extension (MTE). Reviewed by: andrew Sponsored by: Arm Ltd Signed-off-by: Harry Moulton <harry.moulton@arm.com> Differential Revision: https://reviews.freebsd.org/D55944
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: mte: add system register definitions Add system register and bit field definitions for Memory Tagging Extension (MTE) in ARMv8.5. Reviewed by: andrew Sponsored by: Arm Ltd Signed-off-by: Harry Moulton <harry.moulton@arm.com> Co-authored-by: Andrew Turner <andrew@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D55945
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: mte: configure initial state for system registers The fields in SCTLR_EL1 and HCR_EL2 for enabling MTE are set, and if the ID_AA64PFR1_EL1 register shows MTE is present, the GCR_EL1 register is also configured, and the two TFSR registers which hold pending tag check faults are cleared. Reviewed by: andrew Sponsored by: Arm Ltd Signed-off-by: Harry Moulton <harry.moulton@arm.com> Differential Revision: https://reviews.freebsd.org/D55946
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add a comment about HWCAP values They must be identical to Linux. Document this requirement to allow userspace to depend on this. Sponsored by: Arm Ltd
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Support changing the DMAP memory type When MTE is enabled we will use the DMAP to manage tags. To be able to read/write them we need to change the memory attribute to VM_MEMATTR_TAGGED. Support changing the DMAP memory type to values known to have equivalent cache properties. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55949
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Manage the MTE state like pointer auth Add the same group of functions we use to manage pointer authentication in userspace threads. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55951
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Check for MTE tag failures on kernel entry When entering the kernel from userspace we need to check for MTE tag failures when using asynchronous MTE. This is done by checking if either tag fault check types that have asynchronous checks are enabled, and if so check the register the result is stored. It then sets a flag the kernel can later use to raise a signal. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55952
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add support for per-page flags We need to store some extra information about a page, e.g. the state of the MTE tags. Add a MD flags field to each page. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55953
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Support building sys/sysl instructions Add support to build system instructions from a macro. These are based on the existing support for msr/mrs instructions with adjustments for the different instruction format. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D57017
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add FEAT_ALWAYS_ENABLE to cpu_feat A use for it has been found in the GICv5 driver where we need to read the Interrupt Affinity ID early in the boot on the secondary CPUs. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54249
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add an initial GICv5 driver Add an initial driver for the GICv5 interrupt controller. This provides host-only support for the GICv5 interrupt controller. It is specified in the ARM-AES-0070 document & based on version 00eac0. In the GICv5 there are 3 interrupt spaces: PPI, SPI, and LPI. Unlike previous interrupt controllers they don't share a single interrupt ID range, so PPI IRQ 1 and SPI IRQ 1 are different interrupts. There is a common irqsrc stricture that encodes this information as it is common across the interrupt types. Unlike previous GIC versions there are no software generated interrupts that can target a configurable collection of CPUs. These have been replaced with LPIs, where each CPU will have one allocated for each IPI type. This driver handles the CPU interface and interrupt routing service (IRS). The CPU interface provides the interface to manage and handle interrupts, while the IRS handles routing LPIs and SPIs to the target CPU. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54250
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add an initial GICv5 ITS driver Add a driver to support the GICv5 interrupt translation service (ITS). The ITS is responsible to handling ITS events & translating them to an interrupt to be delivered to the interrupt routing service (IRS). An example event is a MSI or MSI-X is delivered. The ITS will generate an LPI depending on which device sent the interrupt and the value the device wrote. This is a similar concept to the GICv3 ITS, however the implementation details are different so it needs a new driver. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54251
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
arm64: Add an initial GICv5 IWB driver Add a driver to support the GICv5 interrupt wire bridge (IWB). The IWB translates the change in state of an input wire and sends a MSI to the interrupt translation service (ITS) to be translated to an LPI. Unlike other MSI sources each wire has a fixed Event ID value it will write in the MSI data. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54252
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Noticed by: jhb Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/dev/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294468 Reported by: dan.kotowski@a9development.com Tested by: dan.kotowski@a9development.com Discussed with: kib Fixes: https://cgit.freebsd.org/src/commit/?id=9289df1949cd ("x86: Add zen identifier helper function") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56377
debug: classified in
03-filenames_plain1 by
'sys/x86/'
This example opens separate OSS capture and playback channels in mmap mode, places them into a sync group, and starts them together so both ring buffers advance on the same device timeline. It then monitors the capture mmap pointer with SNDCTL_DSP_GETIPTR, converts that pointer into monotonic absolute progress using the reported block count, and copies newly recorded audio from the input ring to the matching region of the output ring. The main loop is driven by an absolute monotonic frame clock rather than a fixed relative usleep delay. Wakeups are scheduled from the sample rate using a small frame step similar to the SOSSO timing model, while the audio path itself stays intentionally simple: just copy input to output, with no explicit xrun recovery or processing beyond ring wraparound handling. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D53749
debug: classified in
05-summary-prefix by 'sound
examples:'
The lock is already held by the caller since it is used as the knlist lock. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293901 Reported by: Jiaming Zhang <r772577952@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=cc2715cf1f86 ("acpi_apm: Narrow scope of ACPI_LOCK")
debug: classified in
03-filenames_plain1 by
'sys/x86/'
This patch adds a debugging interface to read and write arbitrary Apple SMC keys by name through sysctl, enabling hardware exploration and control of undocumented features. The interface provides four sysctls under dev.asmc.0.raw.*: - key - Set the 4-character SMC key name (e.g., "AUPO") - value - Read/write key value as a hex string - len - Auto-detected key value length (can be overridden) - type - Read-only 4-character type string (e.g., "ui8", "flt") Implementation includes a new asmc_key_getinfo() function using SMC command 0x13 to query key metadata. The interface automatically detects key lengths and types, uses hex string encoding for arbitrary binary values, and is safe for concurrent access via CTLFLAG_NEEDGIANT. This interface was essential for discovering that the AUPO key enables Wake-on-LAN from S5 state, and for mapping all 297 SMC keys on Mac Mini 5,1. Reviewed by: ngie, adrian, markj Differential Revision: https://reviews.freebsd.org/D54441
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Check a PCI device's class, subclass, and progif to figure out if it is a USB4 NHI. nhi_identifiers is completely removed as only these generic USB4 NHIs are supported anyway, and all remnants of ICM-supporting code are removed too. All devices now use the HCM. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290827 Reviewed by: jhb, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52861
debug: classified in
03-filenames_plain1 by
'sys/dev/'
HID driver for Apple IR receivers (USB HID, vendor 0x05ac). Supports Apple Remote and generic IR remotes using NEC protocol. Supported hardware: - Apple IR Receiver (0x8240, 0x8241, 0x8242, 0x8243, 0x1440) Apple Remote protocol (proprietary 5-byte HID reports): - Key down/repeat/battery-low detection - 17-key mapping with two-packet command support - Synthesized key-up via 125ms callout timer Generic IR remotes (NEC protocol): - Format: [0x26][0x7f][0x80][code][~code] - Checksum: code + ~code = 0xFF - Default keymap with 8 common codes - See: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol Output via evdev with standard KEY_* codes. Raw HID access available at /dev/hidraw0 for custom remapping. Based on protocol reverse-engineering by James McKenzie et al. Reference: drivers/hid/hid-appleir.c (Linux) Tested on Mac Mini 2011 (0x05ac:0x8242). Differential Revision: https://reviews.freebsd.org/D55472
debug: Commit manually moved from "unknown" to "hardware".
This commit adds support for the MacBookPro13,1 (late 2016, 13-inch). The SMC keys were collected from https://logi.wiki/index.php/SMC_Sensor_Codes. Two temperature keys are omitted because they fail to be read: TI0P (IO Proximity) and Ta0P (Ambient Air). Note that the with this model the `dev.asmc.0.fan.0.minspeed` setting only applies when the fans have been activated by the system. In my testing, the fans did not spin up until CPU temperatures hit about 80C. At lower temperatures, the fans will happily ignore the minimum speed and remain at 0 rpm. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2137
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2137
debug: classified in
03-filenames_plain1 by
'sys/dev/'
If you use the FreeBSD pre-build Raspberry Pi image, it does not include the specific .dtb file for the Raspberry Pi 400. On this hardware, it will fall back to attempting to load the Raspberry Pi 4 .dtb file instead. The Pi 4 .dtb file reports the board compatible name as "raspberrypi,4-model-b" The Pi 400 .dtb file reports the board compatible name as "raspberrypi,400" However, it's even better to use the generic name. When using the official Pi 400 .dtb file from the Raspberry Pi Firmware collection, the FreeBSD xhci driver currently fails to recognize this, and thus fails to initialize the xhci device. This means no external USB, or internal USB (which feeds the build-in keyboard) The official Raspberry Pi FreeBSD image has been working on the Pi 400 "on accident" simply because it didn't include the Pi 400 .dtb file prior to this. But the Stratipi Builder uses the full Raspberry Pi firmware suite and hit this bug. As a note: this is probably also a bug on the Compute Module 4 (CM4), but I don't own one of these devices in order to test/validate it. MFC After: 5 days Reviewed by: imp, Ali Mashtizadeh Pull Request: https://github.com/freebsd/freebsd-src/pull/2115
debug: classified in
03-filenames_plain1 by
'sys/arm/'
The switch fell through from the supported B150–B115200 cases into default and returned EINVAL for every speed. Break out before default so valid rates return success, matching uvscom_cfg_param(). Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed by: imp,aokblast Pull Request: https://github.com/freebsd/freebsd-src/pull/2110
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The pmclog record header carries the raw TSC for each event. Export it in struct pmclog_ev, fix JSON output to emit it unsigned, and preserve the installed header ABI by overlaying pl_tsc with the legacy pl_ts storage. Update pmclog(3) to document the TSC semantics and the legacy alias. Sponsored by: AMD Signed-off-by: Andre Silva <andasilv@amd.com> Reviewed by: imp, mhorne, Ali Mashtizadeh Pull Request: https://github.com/freebsd/freebsd-src/pull/2085
debug: classified in
03-filenames_plain1 by
'lib/libpmc/'
Some ACPI debugging prints call acpi_d_state_to_str() on unset D-states (i.e. ACPI_STATE_UNKNOWN), so return a string explicitly saying "unknown D-state" instead of just panicking. Fixes: https://cgit.freebsd.org/src/commit/?id=84bbfc32a3f4 ("acpi_powerres: D3cold support") Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56305
debug: classified in
03-filenames_plain1 by
'sys/x86/'
ofw: bool-ify OF_hasprop() Adjust the function signature and the few callers that don't treat it this way already. This is style only; no functional change intended. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56203
debug: classified in
03-filenames_plain1 by
'sys/dev/'
OF_getprop.9: update OF_hasprop() signature The return type has been converted to a bool. Reported by: manu Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=b60cd486a652 ("ofw: bool-ify OF_hasprop()")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
raspberry_virtgpio: fix OF_hasprop() usage The function returns a bool. This driver was merged recently (by me) and I missed this instance. While here, adjust the ofw_bus_status_okay() call similarly. This function still returns an int, but this usage is more widely used in our drivers. No functional change intended. MFC after: 3 days Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=b60cd486a652 ("ofw: bool-ify OF_hasprop()")
debug: classified in
03-filenames_plain1 by
'sys/arm/'
Frequently there are some unused/unspecified fixed clocks present in a device tree. Each one emits a warning before it fails to attach, which results in (sometimes many) repeated messages which are not user-actionable. Put this warning behind the bootverbose flag. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56204
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add the Normal-Tagged memory attribute introduced with MTE. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55948
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
The clock calibration routine currently can result in rx timestamps jumping backwards, which can confuse the TCP stack. Ensure they are monotonically increasing by estimating what we'd calculate as the next timestamp and clamp the calibration so new timestamps are no earlier in time. Reviewed by: kib, nickbanks_netflix.com Tested by: nickbanks_netflix.com Differential Revision: https://reviews.freebsd.org/D56427 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/dev/'
etherswitch: Add minimal support for mv88e6170 switch
debug: classified in
03-filenames_plain1 by
'sys/dev/'
e6000sw.4: Mention MV88E6171 Fixes: https://cgit.freebsd.org/src/commit/?id=680e6e30c020 (etherswitch: Add minimal support for mv88e6170) Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D56455
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: moved to hardware
because 'Need to be grouped with
680e6e30c02019c2a18c2ecfef3723b9adaa9ce5'
Instead of trying to parse a bogus node, just skip it if marked disabled.
debug: classified in
03-filenames_plain1 by
'sys/dev/'
E6500 cores (MMUv2) support all powers-of-2 page sizes from 4k to 1TB, not just powers of 4. By using the other page sizes (8k, 32k, etc) we can save on TLB1 space, saving up to ~1/3 of used TLB1 entries.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Freescale T-series QorIQ devices use a different register to twiddle the timebase enable.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Since whether or not the irq is an IPI is passed into powerpc_setup_intr_int(), use this as the check for IPI instead of checking the name string.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Apple SMCs contain numerous undocumented voltage, current, power,
and ambient light sensors. This change adds automatic detection
and registration of these sensors as sysctls.
New sysctl trees:
dev.asmc.0.voltage.* - Voltage sensors (millivolts)
dev.asmc.0.current.* - Current sensors (milliamps)
dev.asmc.0.power.* - Power sensors (milliwatts)
dev.asmc.0.ambient.* - Ambient light sensors
Implementation:
- Scans all SMC keys at attach time via asmc_key_dump_by_index()
- Identifies sensors by key prefix patterns:
- Voltage: VC*, VD*, VG*, VP*, VI*
- Current: I{C,D,G,M,N,O,H,P,B,A,L}*
- Power: P{C,D,N,S,T,H,F,Z,z}*
- Light: ALV*, ALS*
- Dynamically creates sysctls for detected sensors
- Supports 8 fixed-point SMC data types:
- sp78, sp87, sp4b, sp5a, sp69, sp96, sp2d, ui16
- Auto-converts all values to milli-units (mV, mA, mW)
On Mac Mini 5,1, detects:
- 7 voltage sensors
- 18 current sensors
- 27 power sensors
- 2 ambient light sensors
Enables power consumption monitoring, voltage rail debugging,
and ambient light detection without hardcoding model-specific
sensor lists.
Tested on:
- Mac Mini 5,1 (2011) running FreeBSD 15.0-RELEASE
- 54 sensors auto-detected and exposed via sysctl
- All sensor types verified with multimeter readings
- Fixed-point conversions validated against known values
- Memory management tested (malloc/free on detach)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55807
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add a per-interface loader tunable dev.rge.%d.disable_aspm to disable PCIe ASPM (L0s/L1) and ECPM on the RTL8125/8126/8127. Disabling ASPM reduces latency at the cost of higher power consumption. Default is off (ASPM left as configured by BIOS). Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56103
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Each MDIO transfer takes 8ms, and all of that is spent in a set of DELAY() calls, which is consuming a LOT of CPU. * Change the timeout in ixgbe_hic_unlocked() - doing IPC to the on-chip firmware - to a 1uS delay and bump timeout appropriately. This seems to finish in a couple of microseconds on my local test devices. * Change the 2ms sleep in ixgbe_release_swfw_sync_X540() to 2ms for EEPROM/flash, and 10uS otherwise. 10uS seems to work fine on my local testing, but the config EEPROM doesn't read right without this extra delay. The first change shouldn't change the driver behaviour, but the latter change is more intrusive and needs some wider testing. (My guess here is that there SHOULD have been some completion check somewhere in the EEPROM/flash IO path, and these sleeps are masking them.) Locally tested: * C3558 (Denverton) w/ X553 backplane Reviewed by: kbowling Differential Revision: https://reviews.freebsd.org/D50295
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Oops, I missed 'device ix' in here, and it now requires mdio.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
When the Alder Lake Serial-over-LAN device is put into loopback mode and repeated writes are performed to the data register it results in the device ending up in a non-functional state afterwards. Recovering the device to a working state requires re-writing the LCR register with it's current value (no effective change). This should be harmless on all other devices. Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D56107 Reviewed by: imp
debug: classified in
03-filenames_plain1 by
'sys/dev/'
For PCI devices listed in pci_ns8250_ids return BUS_PROBE_SPECIFIC, while for generic UART devices not explicitly listed in pci_ns8250_ids return BUS_PROBE_GENERIC. This allows more specific drivers to take over those devices, and the generic UART PCI driver will only be used as a fallback. This fixes an issue where the UART PCI driver would attach to multiport PCI UART devices, that instead need to use the puc(4) driver to multiplex the device. Reported by: markj Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D56467 Reviewed by: markj imp
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Small probe improvements/fixes Remove the test on presence of an ACPI handle, this is implied by ACPI_ID_PROBE() succeeding. Set 'sc->dev' early, so that acpi_spmc_check_dsm_set() using device_printf() will print the driver name. Add a missing newline after printing that more DSM functions are implemented then expected. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56483
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Remove redundant setting of 'sc->dev' on attach Should have been part of the previous commit (but PEBCAK). Reviewed by: obiwac Fixes: https://cgit.freebsd.org/src/commit/?id=bd05b47fbd8b ("acpi_spmc(4): Small probe improvements/fixes") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56483
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add WITH{,OUT}_LOADER_USB to build the kshim usb library. Nothing
in-tree uses it, but this will make it easier to keep building. Updated
src.conf.5 with a few extra changes...
Sponsored by: Netflix
debug: Commit manually moved from "unknown" to "hardware".
In order to enable RX checksum offloading we need to check the meta-information for the (good) frames to see if the L3/4 checksums were calculated and if there was an error. The way the buffere are setup, the needed frame meta-information is already requested. All we have to do is make sure it is really part of the RX frame, that it is valid, and if the respective bits are set. Also do not forget to set the (dummy) csum_data as otherwise upper layers will just be cranky. An artefact of the past which likely should disappear. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006 Reviewed by: bz, tuexen Tested by: bz, tuexen Approved by: tuexen Obtained from: bz (initial version, D55320) MFC after: 3 days Sponsored by: Traverse Technologies (providing Ten64 HW for testing) Differential Revision: https://reviews.freebsd.org/D56383
debug: classified in
03-filenames_plain1 by
'sys/dev/'
If soreserve() or sosetopt() (to set TCP_NODELAY) fails after claiming the socket from the file descriptor, explicitly close the socket before returning failure. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55493
debug: classified in
03-filenames_plain1 by
'sys/dev/'
AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if <va> is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate <cnt> PDEs with a single call, but that only works if <va> is the start of at least <cnt> 2M pages. Otherwise, if <va> or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382 Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D56458
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
In addition to the locally generated statistics counters, dpaa2 ni provides a larger set of counters than we currently export via sysctl. Add (most of) the missing counters and descriptions. Around Page 3/4 there are some things left to do if we want. Also the manual was not clear on the descriptions of 3/0 and 3/1. The second half of the change adds another sysctl note which exports the link-state, speed, and capabilities set as a text-blob. This is especially interesting in case the "ni" stops passing packets. From what I have found in that case the (internal) link state of the ni goes DOWN but we do not see an interrupt for a link-state change. Being able to diagnose the state helps to (manually) fix it for now by changing the media status to 10BaseT or none and then back to auto. That usually brings the internal link state back UP. MFC after: 3 days PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279352 Reviewed by: dsl, tuexen Differential Revision: https://reviews.freebsd.org/D55321
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This change enables process-wide sampling to work with IBS by ensuring that read/write only gets or sets the current counter. Reviewed by: mhorne Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2131
debug: classified in
03-filenames_plain1 by
'sys/dev/'
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@gmail.com> Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55748
debug: classified in
03-filenames_plain1 by
'sys/dev/'
FreeBSD and NetBSD has copied these lines from the x86 architecture when porting to other machines and forgetting to delete them. Reviewed by: mhorne Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2154
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Regenerate linux syscall prototypes for membarrier(2). Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281691 Reviewed by: kib, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2147
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm64/', 'sys/i386/']'
Many applications, desktop environments, window managers & text editors favor the usage of Alt or Ctrl over Super (Cmd). On a Macbook it is quite annoying that the Super (Cmd) key gets pride of place by the spacebar. The standard MacBook Cmd key location only really makes sense for macOS or maybe in some tiling wm if Mod4/Super is your main modifier. For most mainstream desktops and window managers, having Alt or Ctrl in that location makes much much more sense. This patch adds two sysctls for swapping either Opt(Alt) or Ctrl with Cmd(Super). Linux has similar sysctls to this; allowing a user to make an Apple keyboard more "orthodox"/useful at a level that takes effect independent of typing context - ie) tty, Xorg and/or wayland. Having a sysctl to do these swaps means that a user doesn't have to faff about with both creating a custom vt keymap AND figure out which magic setxkbmap incantation one needs to make one's keyboard behave as desired across environments. Signed-off-by: ~Not Toby <0x2b@0xff.art> Reviewed by: wulf MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2141
debug: classified in
03-filenames_plain1 by
'sys/dev/'
It is allocated with M_WAITOK in ac97_create(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/17
debug: classified in
03-filenames_plain1 by
'sys/dev/'
pmap_init always uses 16-bit VMIDs when supported, but we never enable them in VTCR_EL2 (for ASIDs, locore enables them in TCR_EL1 and pmap_init keys off whether they've been enabled, but the order in which pmap_init and vmmops_modinit run is reversed). As a result, although the full 16-bit value can be stored to VTTBR_EL2 and read back, the upper 8 bits are treated as 0, and so VMIDs that our VMID allocation believes are distinct end up aliasing. In future this interface may change such that vmm decides on the VMID width and tells the pmap to use that, with appropriate support for unloading and reloading vmm, but that can come as a follow-up change, as this is a more minimal bug fix. Reviewed by: markj Obtained from: CheriBSD Fixes: https://cgit.freebsd.org/src/commit/?id=47e073941f4e ("Import the kernel parts of bhyve/arm64") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55860
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
This was encountered on a Gigabyte GA-P55A-UD4 motherboard identifying itself
as:
ahci0@pci0:2:0:0: class=0x01018f rev=0x11 hdr=0x00 vendor=0x1b4b device=0x91a3 subvendor=0x1458 subdevice=0xb000
vendor = 'Marvell Technology Group Ltd.'
class = mass storage
subclass = ATA
The physical chip has "88SE9128-NAA2" printed on it.
Similar code has been in Linux for a long time:
https://github.com/torvalds/linux/commit/50be5e3657cd2851a297dc0b3fd459f25829d29b
Co-authored-by: Michael Osipov <michaelo@FreeBSD.org>
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288526
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56464
debug: classified in
03-filenames_plain1 by
'sys/dev/'
No functional change, but this is friendlier for CHERI. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm64/', 'sys/dev/', 'sys/riscv/']'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Consistently use vm_paddr_t for the type returned from moea64_bootstrap_alloc and avoid temporarily smuggling it via a pointer. Instead, be explicit in the places that assume a 1:1 mapping. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm64/']'
This should fix dhcp on an unitialized interface. This solution was found while comparing against another driver, SIOCSIFFLAGS is used by dhclient to force the interface up before it has an IP address. However, all setup work is done in llan_init(), so the interface would not be enabled if configured via only the SIOCSIFFLAGS ioctl. By running llan_init() when the interface is forced up via SIOCSIFFLAGS, the interface is initialized properly. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292164
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Ensure that the optional MSRs and the user flags are guarded by the cpuid feature flags. This prevents the user from triggering undefined behavior or crashes on AMD processors where some of these features are not present. As part of this, I added the branch target and DATA4 MSRs to the IBS op state as those are only present on a subset of the Zen chips that I have tested. Reviewed by: mhorne Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2133
debug: classified in
03-filenames_plain1 by '['lib/libpmc/',
'sys/dev/']'
Remove the perfmon performance monitoring facility that was for Intel Pentium and Pentium Pro processors. Reviewed by: imp,mhorne,emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/2155
debug: Commit manually moved from "unknown" to "hardware".
The comments in tone() were referring to pre-2000 logic that does not exist any more. This patch updates them. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
When the frequency configuration logic was moved to clock.c in 2008, a mutex lock was added there (timer_spkr_setfreq) to serialize accesses to the I/O register. Since then, no more calls to disable/enable_intr were needed in spkr.c than they were needed in the other callers to the same timer_spkr functions in syscons / kern_cons, that is, not at all. This is because there are no other accesses remaining in the kernel to the i8254 timers after boot than through clock.c. For context, see commits e46598588587b4897f6604489364f83fffd4d033 and 93f5134aaf829826dbcbea457bfeb27389761854. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
If two processes are holding a spkr fd, we want orderly access to the allocated tone buffer and the speaker itself. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Prior to this patch, a thread would get EBUSY on open(2) if another thread had the speaker open. With this patch, two or more threads/processes can use the speaker device at the same time. When two or more threads write to the speaker concurrently, individual melodies--single strings, as written by write(2) or ioctl(2) with command SPKRTONE/SPKRTUNE--are played atomically. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Make this data const (it doesn't change) which will also move it to a text section. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The ena_[rt]x_cleanup functions are limited internally to a maximum number of packets; this ensures that TX doesn't starve RX (or vice versa) and also attempts to ensure that we get a chance to refill the RX buffer ring before the device runs out of buffers and starts dropping packets. Historically these functions have returned the number of packets which they processed which ena_cleanup compares to their respective budgets to decide whether to reinvoke them. This is unnecessary complication; since the precise number of packets processed is never used, adjust the APIs of those functions to return a bool indicating if they want to be reinvoked (aka if they hit their limits). Since ena_tx_cleanup now only uses work_done if diagnostics are enabled (ena_log_io macros to nothing otherwise) eliminate that variable and pass its value (ENA_TX_BUDGET - budget) to ena_log_io directly. No functional change intended; this will simplify a future commit. Reviewed by: akiyano Sponsored by: Amazon MFC after: 6 days Differential Revision: https://reviews.freebsd.org/D56478
debug: classified in
03-filenames_plain1 by
'sys/dev/'
We had ENA_RX_BUDGET = 256 in order to allow up to 256 received packets to be processed before we do other cleanups (handling tx packets and, critically, refilling the rx buffer ring). Since the ring holds 1024 buffers by default, this was fine for normal packets: We refill the ring when it falls below 7/8 full, and even with a large burst of incoming packets allowing it to fall by another 1/4 before we consider refilling the ring still leaves it at 7/8 - 1/4 = 5/8 full. With jumbos, the story is different: A 9k jumbo (as is used by default within the EC2 network) consumes 3 descriptors, so a single rx cleanup pass can consume 3/4 of the default-sized rx ring; if the rx buffer ring wasn't completely full before a packet burst arrives, this puts us perilously close to running out of rx buffers. This precise failure mode has been observed on some EC2 instance types within a Cluster Placement Group, resulting in the nominal 10 Gbps single-flow throughput between instances dropping to ~100 Mbps as a result of repeated rx overruns causing packet loss and ultimately retransmission timeouts. To correct this, switch from processing up to ENA_RX_BUDGET (256) packets to processing up to ENA_RX_DESC_BUDGET (256) descriptors (or slightly more, if we hit the limit in the middle of a packet). This ensures that, even with jumbos, we refill the ring before processing most of a ring worth of descriptors, and returns the throughput to expected levels. Note that theoretically up to ENA_PKT_MAX_BUFS (19) descriptors can be used for a single packet, in which case even 54 packets would exhaust the default rx buffer ring; it's not clear if this ever occurs in practice, but this fix will address that case as well. Reviewed by: akiyano Sponsored by: Amazon MFC after: 6 days Differential Revision: https://reviews.freebsd.org/D56479
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Even though the functions are currently executed in the correct order, there's no garuntee that this will always be the case. Reported by: kevans Discussed with: kevans Fixes: https://cgit.freebsd.org/src/commit/?id=4b862c713ac5556ab4bd1828b47c5eb9cb28e067 MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
These are NULL if they're not implemented. Make sure all the functions we need are there before doing anything. Also invert the first if statment to lessen the indentation a bit. Reported by: Quentin Thébault <quentin.thebault@defenso.fr> MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Removes the deprecated loader tunable fixup_needs_csum. Removes also the sysctl counter rx_csum_bad_offset that is no longer in use. Reviewed by: tuexen Event: Wiesbaden Hackathon 2026 Differential Revision: https://reviews.freebsd.org/D55588
debug: classified in
03-filenames_plain1 by '['sys/arm/',
'sys/dev/']'
This fixes the case where selected_size is never set to anything
in the loop. Whilst here, also set selected_fw to NULL so the case
of "no firmware" correctly sets everything to NULL/0.
```
--- ucode_subr.o ---
/workspace/src/sys/x86/x86/ucode_subr.c: In function 'ucode_amd_find':
/workspace/src/sys/x86/x86/ucode_subr.c:237:25: warning: 'selected_size' may be used uninitialized [-Wmaybe-uninitialized]
237 | *selected_sizep = selected_size;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/ workspace/src/sys/x86/x86/ucode_subr.c:105:16: note: 'selected_size' was declared here
105 | size_t selected_size;
| ^~~~~~~~~~~~~
```
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D55439
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Whatever params pointer is, it does not matter. copyin() handles any values. In fact, params cannot be ever NULL. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56630
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
64bit processes can issue INT $0x80 instruction, and get the syscall dispatched through ia32_syscall(). This works because syscall argument fetch and result return are selected from the process sysent. But, ia32_syscall() does not verify some conditions and does not perform some actions which are considered unnecessary because the caller is supposed to only access lower 4G. The INT syscall path breaks this assumption. We never supported such hack, so disable it. Send the offending thread SIGBUS as if #GP was issued by hardware due to IDT vector 0x80 having not numerically high enough DPL value. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56630
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
The function awg_poll() was missing a prototype, which causes the build to fail if DEVICE_POLLING is enabled, which it is in the ARMADAXP config. MFC after: 2 weeks Reviewed by: tuexen, mmel, adrian Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56651
debug: classified in
03-filenames_plain1 by
'sys/arm/'
While the majority of virtio platforms will be fully coherent, some may require cache maintenance or other specific device memory handling (eg for secure partitioning). Using bus_dma allows for these usecases. The virtio buffers are marked as coherent; this should ensure that sync calls are no-ops in the common cases. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55492
debug: classified in
03-filenames_plain1 by
'sys/dev/'
While the majority of virtio platforms will be fully coherent, some may require cache maintenance or other specific device memory handling (eg for secure partitioning). Using bus_dma allows for these usecases. The virtio buffers are marked as coherent; this should ensure that sync calls are no-ops in the common cases. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55564
debug: classified in
03-filenames_plain1 by
'sys/dev/'
It will be removed soon & replaces with pmap_s1_invalidate_all_kernel. This allows us to handle errata that cpu_tlb_flushID is missing workarounds for. Sponsored by: Arm Ltd
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Reviewed by: alc Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52185
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
The current arm64 PCPU implementation uses a global register asm
variable to use x18, which we reserve with -ffixed-x18, from C. Inside a
critical_enter() or sched_pin(), it is vital that any PCPU reads use the
right PCPU pointer, as often the whole point of the critical_enter() or
sched_pin() is to ensure consistent PCPU use (e.g. for SMR it relies on
zpcpu giving the same SMR state). critical_enter() and sched_pin() both
include atomic_interrupt_fence(), i.e. asm volatile("" ::: "memory"),
barriers to ensure that memory accesses don't get moved by the compiler
outside the critical section, which on most architectures will also
order the read of the PCPU pointer itself (whether due to the read being
another asm volatile statement, or due to using a segment-relative
memory access as on x86). However, this approach on arm64 is in no sense
a memory access, and therefore the register access is not ordered with
respect to the the critical_enter() or sched_pin(), or more specifically
the curthread->td_critnest++ / curthread->td_pinned++ within.
In practice upstream today this works out ok because the read of x18 is
inlined into the actual PCPU_GET/ADD/SET memory accesses (i.e. you will
get something like ldr xN, [x18, #imm-or-xM] for PCPU_GET, etc.), and
since *that* instruction is ordered properly due to being a memory
access, the x18 ends up being read in the right place. However, that is
not in any way guaranteed, it just relies on the hope that compiler
optimisations will be perfect at inlining the use. Moreover, PCPU_PTR is
definitely not a memory access in this world, it's just pointer
arithmetic on x18, and so that has nothing ordering it. This can be
observed with the following test function compiled into the kernel:
void
pcpu_test(void)
{
extern void __weak_symbol use_pcpu_ptr(void *);
critical_enter();
use_pcpu_ptr(PCPU_PTR(curthread));
critical_exit();
}
Obviously, this is a bit contrived as you could just read curthread
directly via its atomic definition that bypasses any worries about PCPU
atomicity, but it illustrates the point. With the in-tree LLVM*, this
ends up being compiled for me to:
paciasp
stp x29, x30, [sp, #-0x10]!
mov x29, sp
ldr x8, [x18]
ldr w9, [x8, #0x4fc]
mov x0, x18
add w9, w9, #0x1
str w9, [x8, #0x4fc]
bl use_pcpu_ptr
...
Note that, although the PCPU_PTR was within the critical section in the
C source, the read of x18 into x0, the argument register passed to
use_pcpu_ptr, has been hoisted to before the str, which is storing the
new, incremented, value of td_critnest to curthread, and so there is a
window within which we have to hope the thread is not preempted and
migrated to a different CPU, otherwise it will pass a pointer to the
wrong CPU's pc_curthread PCPU member.
Initially it would seem as though the solution to this would be to add
an additional barrier to critical_enter() / sched_pin() to ensure the
register reads could not be hoisted like this. However, I have not been
able to find a sequence that works reliably across both GCC and Clang,
independent of optimisation level. Using inline asm with x18 marked as a
clobber, using "=r"(pcpup), and using "+r"(pcpup) all run into various
issues; some combinations don't actually seem to be a barrier, and for
Clang at -O0 some combinations will actually generate writes to x18**,
at which point you then have to hope that the kernel is compiled with
optimisations, and that the redundant writes are optimised away such
that x18 is just passed through. But that just gets us back to hoping
optimisation works, which isn't a solution to the problem, it just
trades one point of fragility for another.
In talking to GCC developers, who seemed rather horrified by the
implications of trying to do this (which is effectively "register
volatile", a combination that's explicitly forbidden), we could not find
a solution to this, and so I have concluded that the only reliable to
have a sound PCPU implementation is to ditch this optimisation and
follow other non-x86 architectures in using inline asm in one form or
another; specifically, this adopts riscv's approach of just calling
get_pcpu(), which, curiously, was already implemented in inline asm here
on arm64, rather than reading pcpup.
Anyone who feels strongly enough about PCPU performance is welcome to
try to find a working approach, but such proposals should be heavily
scrutinised to be certain that they won't come back to bite us in
future. In particular, this caused a lot of problems downstream in
CheriBSD's experimental compartmentalised kernel, which is trialling
interposing on PCPU accesses in order to restrict access within
compartments. As a result, even PCPU_GET/SET/ADD can look like PCPU_PTR,
as they pass an opaque PCPU reference to wrapper functions, and so this
case gets hit all over the kernel, giving highly-confusing panics with
locks that aren't owned by the current thread or SMR use allegedly not
within an smr_enter().
The ia64 port encountered the same issue and reached the same conclusion
in e31ece45b7a4 ("Fix the PCPU access macros."), though went to the
trouble of trying to fold the offset into the inline assembly (assuming
it fit, with no fallback if not, since it's using the add pseudo-op that
will be expanded to either adds with a 14-bit immediate or, if somehow
that doesn't fit, addl with a 22-bit immediate). Curiously though it
left pcpup around as a footgun. sparc64 had similar code but was never
fixed. It also defined a curpcb in the same manner which was presumably
similarly broken, but looks to have been entirely unreferenced from C,
only referenced in actual assembly files. Alpha also had the same
design, but it was removed whilst critical_enter() was extern rather
than static inline so uses of the pointer could not have been hoisted,
and whilst sched_pin() didn't have any form of atomic_interrupt_fence()
to even try to make PCPU well-ordered.
* At time of writing, when that was LLVM 19, not verified at time of
commit with LLVM 21.
** For "+r"(pcpup), Clang's initial code generation is to do:
mov xTtmp1, x18
mov x18, xTmp1
/* asm (empty) */
mov xTmp2, x18
mov x18, xTmp2
since its interpretation of what that means is "read the value of
pcpup, and make sure that value is in x18 for the duration of the
assembly due to the asm("x18") on pcpup", and similarly for the output
side.
Reviewed by: andrew, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56601
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
qcom_tlmm: prepare for supporting multiple TLMM platforms * Create a set of callbacks implementing the hardware specific GPIO bus operations * Migrate the IPQ4018 TLMM setup code into qcom_tlmm_ip4018.c Differential Revision: https://reviews.freebsd.org/D56349
debug: classified in
03-filenames_plain1 by '['sys/arm/',
'sys/arm64/', 'sys/dev/']'
qcom_tlmm: extend the IPQ4018 pinmux function mask to 4 bits It's 4 bits, not 3. Oops. Differential Revision: https://reviews.freebsd.org/D56350
debug: classified in
03-filenames_plain1 by
'sys/dev/'
qcom_tlmm: add i2c pull up strength config option The X1E and others have a separate configuration bit to increase the pull-up drive strength for i2c busses. Add the plumbing; it doesn't do anything just yet. Differential Revision: https://reviews.freebsd.org/D56351
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Extract rx_overruns from the keep alive descriptor reported by the device and expose it via sysctl hw stats. RX overrun errors occur when a packet arrives but there are not enough free buffers in the RX ring to receive it. MFC after: 2 weeks Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D56640
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Features: * Report RX overrun errors via sysctl hw stats Bug Fixes: * Budget rx descriptors, not packets, to fix jumbo frame throughput Minor Changes: * pmap_change_attr void * API change for FreeBSD 16.0+ * Adjust ena_[rt]x_cleanup to return bool MFC after: 2 weeks Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D56641
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Add core SR-IOV infrastructure Introduce the foundational building blocks for SR-IOV Virtual Function support on Broadcom NetXtreme-C/E adapters. * Add bnxt_sriov.h: defines the extended bnxt_vf_info structure (per-VF firmware FID, MAC addresses, VLAN, flags, DMA command buffers, resource counts), the bnxt_resc_map helper, flag macros (BNXT_VF_TRUST, BNXT_VF_SPOOFCHK, etc.), and prototypes for all SR-IOV functions. * Add bnxt_sriov.c: implements the SR-IOV attachment sequence (bnxt_sriov_attach), the iflib IOV callbacks (bnxt_iov_init, bnxt_iov_uninit, bnxt_iov_vf_add), VF resource allocation and firmware configuration helpers (bnxt_alloc_vf_resources, bnxt_cfg_hw_sriov, bnxt_hwrm_func_vf_resc_cfg, bnxt_hwrm_func_buf_rgtr, bnxt_hwrm_func_vf_resource_free), and the per-VF parameter helper. * Extend bnxt.h: include bnxt_sriov.h; extend bnxt_pf_info with VF- tracking fields (vf array, firmware FID/MAC, resource-reservation strategy, DMA page management, sysctl context); replace the upstream bnxt_vf_info stub with the full definition from bnxt_sriov.h; extend bnxt_func_qcfg with allocation counters required by the VF resource configuration path; add vf_resc_cfg_input and sriov_lock to bnxt_softc. * Update Makefile to build bnxt_sriov.c and include bnxt_sriov.h. * Wire up PCI-IOV device methods (pci_iov_init / pci_iov_uninit / pci_iov_add_vf) and iflib IOV callbacks (ifdi_iov_init / ifdi_iov_uninit / ifdi_iov_vf_add) in if_bnxt.c; call bnxt_sriov_attach() from bnxt_attach_post() on P5+ Physical Functions. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56197
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Add VF load path and PF/VF context differentiation Teach the driver to distinguish a Physical Function from a Virtual Function at probe time and configure each appropriately. * Introduce bnxt_is_vf_device() to identify all known VF device IDs (NetXtreme-C/E Gen1-3, Thor1/2, Hyper-V variants). Add corresponding PVID entries to bnxt_vendor_info_array. * Refactor the iflib shared context: rename bnxt_sctx_init to bnxt_sctx_template, add a Thor2-specific bnxt_sctx_template_p7, and build per-call PF/VF instances via bnxt_init_sctx_variants(); the VF instance carries IFLIB_IS_VF. bnxt_register() selects the correct sctx. * bnxt_attach_pre(): replace the hard-coded NPAR/VF switch with bnxt_set_flags_by_devid(); on a VF call bnxt_approve_mac() to request PF approval for the firmware-assigned MAC address. * bnxt_hwrm_func_qcaps(): populate fw_fid and MAC for PF and VF contexts separately; for PF call iflib_set_mac() and record max_msix_vfs; for VF handle the case where the PF has not yet assigned a MAC. * bnxt_hwrm_func_qcfg(): populate the new alloc_* counters used by the VF resource configuration path; record registered_vfs for PF and VLAN/trust state for VF. * bnxt_init(): call bnxt_update_vf_mac() on VFs after each bring-up. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56198
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Add VF forwarded HWRM request handling Enable the Physical Function to proxy HWRM commands issued by Virtual Functions through the firmware forwarded-request mechanism. When a VF issues a command that requires PF arbitration, the firmware delivers a CMPL_BASE_TYPE_HWRM_FWD_REQ completion to the PF async ring. * bnxt_process_async_msg() recognises CMPL_BASE_TYPE_HWRM_FWD_REQ, identifies the originating VF by its firmware function ID, sets the corresponding bit in pf.vf_event_bmap, and raises BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT to schedule deferred processing. * bnxt_sp_task() dispatches to bnxt_hwrm_exec_fwd_req(), which iterates over all pending VF bits and calls bnxt_vf_req_validate_snd() for each. * bnxt_vf_req_validate_snd() inspects the encapsulated request type: HWRM_FUNC_VF_CFG (MAC change) is handled by bnxt_vf_configure_mac() which enforces trust/existing-MAC rules; HWRM_CFA_L2_FILTER_ALLOC is handled by bnxt_vf_validate_set_mac(); HWRM_FUNC_CFG is forwarded as-is; all other commands are rejected. All forwarded-request code is guarded by #ifdef PCI_IOV. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56199
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Add per-VF trust, spoof-check and promiscuous controls Expose per-VF policy knobs via the FreeBSD sysctl tree and enforce them at the data-path level. Trust (dev.bnxt.<unit>.vfN.trusted): bnxt_set_vf_trust() sets/clears BNXT_VF_TRUST and sends HWRM_FUNC_CFG with FLAGS_TRUSTED_VF_ENABLE/DISABLE. bnxt_create_trusted_vf_sysctls() / bnxt_destroy_trusted_vf_sysctls() manage the sysctl lifetime with VF creation/teardown. Spoof-check (dev.bnxt.<unit>.vfN.spoofchk): bnxt_set_vf_spoofchk() issues HWRM_FUNC_CFG with SRC_MAC_ADDR_CHECK_ENABLE/DISABLE. Promiscuous gating: bnxt_is_trusted_vf() queries firmware via HWRM_FUNC_QCFG. bnxt_promisc_ok() returns false for untrusted VFs, preventing them from entering promiscuous mode. bnxt_promisc_set() is updated to gate the PROMISCUOUS and ANYVLAN_NONVLAN mask bits on bnxt_promisc_ok(). bnxt_iov_vf_add() applies the initial trust/spoof-check policy from the nvlist schema. bnxt_iov_init() creates the sysctl trees after bnxt_cfg_hw_sriov() succeeds. bnxt_iov_uninit() tears them down. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56200
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Re-enable SR-IOV after firmware reset When the firmware undergoes a hot-reset and the driver re-opens the device, previously active Virtual Functions lose their resource configuration. bnxt_reenable_sriov() restores that configuration by replaying bnxt_cfg_hw_sriov() with the saved resource parameters. The function is called from bnxt_fw_reset_task() in the BNXT_FW_RESET_STATE_OPENING state, guarded by #ifdef PCI_IOV. Because bnxt_cfg_hw_sriov() is a no-op when active_vfs is zero the call is safe on any PF regardless of whether VFs were ever created. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56201
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: VF ring reservation, HWRM registration, and PF-only operation guards VFs require separate HWRM commands for ring reservation and async completion ring setup, so a common PF/VF dispatcher is introduced and the async CR path is extended to handle both. The PF must populate the VF request forwarding bitmap during driver registration so the firmware correctly forwards VF-originated HWRM commands. VF reservation strategy and min-guaranteed capability flags are now parsed for correct resource partitioning, and PF-only operations (DCB, NVM, package version sysctl) are guarded against VF invocation. The short command buffer allocation is also reordered before the function reset to ensure extended HWRM messages are available when needed, a prerequisite uncovered during VF bring-up. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56232
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: Address review comments for core SR-IOV support This patch addresses the code review comments provided for: https://reviews.freebsd.org/D56197 * P7 VF PCI ID: rename NETXTREME_E_P7_VF to E_P7_VF (P7/Thor2 line drops the Netxtreme name in product strings; other VF device IDs are unchanged). * Use the return value of bnxt_vf_parse_schema() in bnxt_iov_vf_add() to decide when to call bnxt_set_vf_admin_mac(); make parse_schema() return bool and remove the has_admin_mac field. * In bnxt_free_vf_resources(), fix indentation after dma_free_coherent() so the NULL assignment is clearly separate from the call. * In bnxt_hwrm_func_vf_resource_free(), use first_vf_id/last_vf_id in the HWRM_FUNC_VF_RESC_FREE loop. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56644
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bnxt_en: add bnxt_sriov.c to sys/conf/files for built-in kernel builds The SR-IOV series added bnxt_sriov.c and listed it in sys/modules/bnxt/bnxt_en/Makefile, but kernels that build bnxt into the image only compile sources named in sys/conf/files. Add bnxt_sriov.c next to the other bnxt_en entries so built-in bnxt (including LINT) links the SR-IOV implementation and avoids undefined symbols referenced from if_bnxt.c. Fixes: https://cgit.freebsd.org/src/commit/?id=f2f831b2c151 ("bnxt_en: Add core SR-IOV infrastructure") MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56688
debug: classified in
04-filenames_plain2 by 'sys/'
debug: moved to hardware
because 'Need to be grouped with
f2f831b2c151a9d989a94fc7c894118c802ef348'
EFI runtime faults may be mistaken for kernel panics, and do not necessarily represent actual problems. Try to differentiate them some more by printing "EFI runtime trap" rather than "Fatal trap". PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291193 Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56309
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Reject unsupported AMD IBS and PMU control bits before programming the MSRs. Initialize IBS fetch/op allow masks from CPUID feature bits and validate user-provided IBS control values against those masks. Keep the load-latency filter dependency on L3MissOnly, but avoid decoding fields that are already constrained by the mask. Apply the same reserved-bit policy to the AMD PMU raw-config path by checking core, L3, and data fabric configs against subclass-specific masks. Fix the IBS CPUID feature bit definitions used by the policy. Reviewed by: mhorne, Ali Mashtizadeh <ali@mashtizadeh.com> Sponsored by: AMD Signed-off-by: Andre Silva <andasilv@amd.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/2140
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Expose kern.hwpmc.{ibs_fetch,ibs_op,amd_core,amd_l3,amd_df}_extra_mask
as RWTUN uint64s that OR into the CPUID-derived allow mask at
validation time. Default 0, so the strict policy applies unless an
administrator opts bits back in — intended for testing the wrmsr_safe
path in PR #2157.
Reviewed by: mhorne, Ali Mashtizadeh <ali@mashtizadeh.com>
Sponsored by: AMD
Signed-off-by: Andre Silva <andasilv@amd.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2140
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This will be used to enable MTE from userspace. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55950
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
It should be for FEAT_MTE2 as the registers aren't implemented for FEAT_MTE. While here fix the style of the comment explaining the check. Reported by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=58de79153622 ("arm64: mte: configure initial state for system registers") Sponsored by: Arm Ltd
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Submitted by: hari.thirusangu@sophos.com MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/dev/'
powerpc/pic: Add a PIC_AP_INIT() to set up AP PIC info pc_cpuid may not match the PIC's idea of a given CPU. Since openpic has a WHOAMI register, we can use that to get the PIC's idea of the CPU. This needs to be done on each AP, so add a PIC_AP_INIT device method so the PIC can perform any AP-specific initialization at AP bootstrap time. This fixes SMP on e6500, which is still lacking SMT support. Differential Revision: https://reviews.freebsd.org/D56421
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc/pic: fix the openpic CPU logic to work on powermac Earlier work (40bcad56f - powerpc/pic: Add a PIC_AP_INIT() to set up AP PIC info) broke booting my dual G5 powermac. After much digging, jhibbits@ and I discovered that the openpic implementation for the memory/bus controller used in the G5 CPUs doesn't implement /all/ of the openpic specification. Notably it sticks the WHOAMI register in a different location. This is reading 0x0 back for all the PICs which is .. very not great. So to restore the previous behaviour, use a quick for now that jhibbits@ can set appropriately to trust WHOAMI. I've tested this on my dual G5 PPC and it boots/runs fine. Fixes: https://cgit.freebsd.org/src/commit/?id=40bcad56f Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D56751
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
The Freescale MPIC supports up to 2048 IRQs, but since we only build an array of 768 interrupts in intr_machdep, clamp the max at 512. The most any Freescale PowerPC chip actually supports is 452 on the T4240, so 512 is sufficient. As part of this, increase the vector mask to the full openpic vector mask, and use this limit as the terminator for the dispatch loop, instead of a hard-coded 255. Differential Revision: https://reviews.freebsd.org/D56422
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
I2C subsystem errors belong in the IIC_* error space. It's pretty clear this is what is intended in the code.
debug: classified in
03-filenames_plain1 by
'sys/dev/'
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Probe SMC keys at attach time to detect hardware capabilities, supporting all Intel Apple machines without per-model entries. Sensors are discovered by scanning sorted SMC key ranges for known prefixes and types. Capabilities such as SMS, fan safe speed, and ambient light are detected by key presence. A global key description table provides human-readable names for well-known temperature sensors. Tested on: - MacBook Pro (Early 2007, Mid 2014, Mid 2015) - MacBook Air (Early 2015, Mid 2017) - iMac (Mid 2011, Late 2013) - Mac mini (Mid 2011) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56405
debug: classified in
03-filenames_plain1 by
'sys/dev/'
In order to improve the efficiency of block read/write calls, Intel has introduced a block buffer. Instead of generating an interrupt after receiving/sending a single byte, the data is buffered in the block buffer. It allows the SMBus controller to generate a single interrupt for the whole transfer. At the moment, we don't support that and don't expect the SMBus controller to behave in that way. Unfortunately, BIOS code can also access the SMBus controller and may enable the block buffer. Poorly written BIOS code may also keep the block buffer enabled breaking our driver. Therefore, we should check if the device supports a block buffer and disable it for every request because we don't know if some BIOS code has reconfigured the SMBus controller in between. Reviewed by: emaste MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/2161
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Apply the appropriate quirk. Also, introduce a new uaudio_vendor_audio table, similar to uaudio_vendor_midi, which includes non-standard USB audio devices. The Roland UA-33 needs this, bceause it comes with bInterfaceClass = 0xff (vendor-specific), so snd_uaudio(4) doesn't detect it. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294814 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/24
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Instead of printing the driver version over and over again if multiple controllers are used, set a sysctl name for the used driver version. Approved by: imp, ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56110
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: obiwac, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56619
debug: classified in
03-filenames_plain1 by
'sys/dev/'
MFC after: 3 days
debug: classified in
03-filenames_plain1 by '['sys/powerpc/',
'sys/riscv/', 'sys/x86/']'
Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`, `UINT64_C`, etc unconditionally. I.e. no longer check whether `__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also <https://sourceware.org/bugzilla/show_bug.cgi?id=15366>. This is part of reverting base 00bee6fcd77f, which reverted an upstream libc++ commit that eliminated libc++'s stdint.h wrapper header. Submitted by: Nikolas Klauser <nikolasklauser@berlin.de> MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56746
debug: classified in
03-filenames_plain1 by '['sys/arm/',
'sys/arm64/', 'sys/powerpc/', 'sys/riscv/',
'sys/x86/']'
powerpc: initial straight port of busdma_machdep.c -> busdma_bounce.c This is a straight port of the code and doesn't yet handle different implementations (which will be in a subsequent commit.) Locally tested: * G5 SMP (2x PPC970mp) * power8 / power9 pseries QEMU VM * power8 powernv Differential Revision: https://reviews.freebsd.org/D55313
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: create a tag with the parents implementation if supplied If a parent tag is supplied then use its implementation. Differential Revision: https://reviews.freebsd.org/D55314
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: add in some busdma domain setup * Implement the basic tag domain set routine * Set the domain to the parent domain if provided This is just plumbing for eventual work to re-allocate things into the currently configured domain. Differential Revision: https://reviews.freebsd.org/D55315
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: refactor common busdma tag setup Refactor the common busdma tag setup code into busdma_machdep.c Locally tested: * qemu VM, pseries-9 / power9 * qemu VM, pseries-8 / power8 Differential Revision: https://reviews.freebsd.org/D55340
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: use local flags for bounce buffers instead of common flags Migrate to using local flags for bounce buffers instead of the common flag field. Differential Revision: https://reviews.freebsd.org/D56208
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: busdma declaration shuffling Shuffle some of the declarations around to match other implementations. Expected to be a no-op. Differential Revision: https://reviews.freebsd.org/D56243
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
powerpc: refactor dmamap setup; free dmamap in error paths * refactor the dmamap allocation / setup path for future code changes to align with arm64 busdma code; * free the dmamap allocation if the dma segment list can't be allocated; * free the dmamap allocation during the busdma dmamem allocation path if the actual memory allocation itself fails. Locally tested: * POWER9 ppc64le native boot, Raptor Engineering Blackbird * POWER8 ppc6le, IBM POWER S822LC https://reviews.freebsd.org/D56244
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
The shutdown splash draws over all the useful info if ddb(4) is disabled. Don't draw the splash screen if we're rebooting because of a panic. MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This RTC chip supports 2 alarm timers in addition to RTC functionality, but this driver only supports the RTC at this time.
debug: classified in
03-filenames_plain1 by
'sys/dev/'
dpaa: Migrate from NCSW base to a home-grown driver
The NCSW reference base requires tuning for each target, and currently
is configured for FMANv2. This doesn't readily work on FMANv3 devices,
such as the T-series powerpc, or the LS1043 ARM. Since Freescale/NXP
abandoned the NCSW driver a decade ago, it makes sense to abandon it
ourselves as well. This new driver uses a combination of the NCSW
driver and the Linux driver (BSD/GPL dual licensed) as a reference, but
contains no actual code from them.
The DPAA (Data Path Acceleration Architecture) subsystem consists of the
following components:
* BMan -- Buffer Manager. Manages buffer pools of different sizes (one
size per pool, up to 64 pools)
* QMan -- Queue Manager. Manages the interfaces between DPAA-based
components and the CPU(s).
* FMan -- Frame Manager. Responsible for all ethernet-related
processing. Consists itself of the following components:
* Ports -- interfaces to the QMan. An ethernet interface consists of
2 ports.
Ports use "Next-invoked action" (NIA) descriptors to form a pipeline
for processing on receive and transmit.
* Parser -- performs protocol header parsing and validation. Both
hardware and software parsers are available.
* KeyGen -- Key generator, used to start the classification process
(for the Policer), generating FQIDs and other keys based on the
frame input.
* Policer -- performs traffic shaping and classification
* MAC -- SoC specific ethernet MAC (dTSEC, TGEC, mEMAC). Currently
supports dTSEC and mEMAC, along with their MDIO blocks.
Additional components not yet handled:
SEC -- Security engine (crypto)
RE -- RAID engine
RapidIO
DCE -- Decompression/Compression engine, supports ZLIB, DEFLATE, and
GZIP, as well as base64 encoding and decoding.
BMan and QMan are accessed via cache-coherent portals, using ring
buffers as I/O. The intent is for portals to be per-CPU (core/thread)
to reduce locking contention and improve performance. This driver pins
interrupt handlers to the CPU "owning" a given portal, and uses critical
sections to prevent switching while accessing the portal.
debug: classified in
03-filenames_plain1 by '['sys/dev/',
'sys/powerpc/']'
dpaa: Enable checksum offloading for IPv4 and IPv6 Enable the FMan hardware parser to take advantage of some offloading. This enables receive and transmit checksum offloading for both IPv4 and IPv6. Additional offloading capabilities the DPAA supports include: * vlan parsing * Transmit rate limiting * IEEE-1588 timestamps * Soft parsing for custom protocol checking * Congestion handling
debug: classified in
03-filenames_plain1 by
'sys/dev/'
dpaa: Support jumbo frames as multi-buffer frames
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reported by: ziaee@ Fixes: https://cgit.freebsd.org/src/commit/?id=fd8d34ce27 ("dpaa: Migrate from NCSW base to a home-grown driver")
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reported by: ziaee@ Fixes: https://cgit.freebsd.org/src/commit/?id=d22051b18 ("iicbus/rtc: Add driver for the Ricoh rs5c372 RTC")
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Older SMC firmware exposed AUPO as a Wake-on-LAN control. On updated firmware, the key controls automatic power-on when AC power is restored after a power loss; WoL is handled by the GBE controller instead. Rename the sysctl to reflect the current semantics. No compatibility alias is provided as the sysctl has not appeared in any release. Reviewed by: ziaee, adrian Differential Revision: https://reviews.freebsd.org/D56747
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The LAN8700 / LAN8710 PHYs were Standard Microsystems Corporation (SMSC) parts. I presume SMC was chosen as an abbreviation, but the company always used SMSC as its short name. SMSC was acquired by Microchip in 2012. I kept the pre-acquisition name, as NetBSD (from where we obtained miidevs) uses SMSC. Reviewed by: adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56819
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_panasonic_shutdown() calls hkey_sound_mute() without holding the ACPI serial lock. Every other call site holds `ACPI_SERIAL_BEGIN(panasonic)` before calling it, as the locking model is caller-owned. This seems to affect the whole Panasonic Toughtbook lineup btw. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56718
debug: classified in
03-filenames_plain1 by
'sys/dev/'
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add PCI device IDs for two Ice Lake PCH SMBus controller variants: - 0x34a3 (Ice Lake-LP), previously listed as the generic "Ice Lake" entry (ID_ICELAKE), renamed to ID_ICELAKELP for clarity. - 0x38a3 (Ice Lake-N), a separate PCH variant not previously supported. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56732
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reorder the TLS RX teardown sequence so the TIR is destroyed before the DEK. DESTROY_TIR for a TLS-enabled TIR issues a TRA RX fence that drains all in-flight packets from the crypto pipeline. If the DEK is destroyed first, packets still in flight hit a TPT encryption error (vendor syndrome 0x55) because the key they reference is already gone. Reviewed by: kib Sponsored by: Nvidia networking MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The virtio_p9fs module event handler can be invoked multiple times. Previously, this caused p9_init_zones() and p9_register_trans() to be executed multiple times, leaking UMA zones and corrupting the transport list. During module unload, p9_destroy_zones() was also called multiple times on the same zone pointers, triggering a duplicate free kernel panic in uma_zdestroy(). This patch introduces a static reference counter in vt9p_modevent() to ensure the zones and transports are only initialized and destroyed exactly once, aligning with the approach used by other virtio drivers like vtnet. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56497
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The smartpqi driver did not log device add/remove or controller events to syslog, and hw.smartpqi.debug_level could only be set at boot via loader.conf with no runtime sysctl interface. Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime debug level changes. Add device_printf calls for device addition, removal, and controller events (hotplug, hardware, physical/logical device, AIO state/config changes) so state changes always appear in dmesg. Add DBG_DISC logging for discovery state transitions. Fix spelling errors in strings and comments across the driver. Bump driver version to 14.4691.1.2000 / 15.2.1.2000. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294161 Reviewed by: imp Approved by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56832
debug: classified in
03-filenames_plain1 by
'sys/dev/'
MFC after: 1 week Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Assign the driver type instead of preserving uninitialized stack data PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294899 Reviewed by: aokblast
debug: classified in
03-filenames_plain1 by
'sys/x86/'
eecp holds the extended capability offset. If that offset is larger than 0xff, storing it in uint8_t truncates it, which can make the early EHCI/XHCI capability walk read the wrong location and loop during boot. Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the first xHCI extended capability offset is 0x460. Widen eecp to uint32_t in xhci_early_takeover(), matching xhci_pci_take_controller(). Signed-off-by: Gisle Nes <gisle@gisle.net> Reviewed by: zlei, aokblast MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2127 Closes: https://github.com/freebsd/freebsd-src/pull/2127
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This and the E3000 are both handled by the r8169 driver in Linux, and reportedly this is infact just a straight re-brand of the RTL8126. Tested by: "Sinetek" on Discord Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56917
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: fuz, jrm Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56638
debug: Commit manually moved from "unknown" to "hardware".
riscv: IOMMU support Support for RISC-V IOMMU spec v1.0.1 (ratified) https://github.com/riscv-non-isa/riscv-iommu Supports translation for PCI devices only. Supports 1 or 2-level device-directory-table (DDT). Supports SV39 and SV48 virtual memory system (on per-device basis). Supports both "standard" and "extended" device-context (DC) structure. Supports "bypass" mode to disable translation for a particular device. Supports WSI (Wire-Signalled Interrupts) only. This includes both PCI-bus and FDT attachment drivers. Note in case of PCI-bus attachment, interrupts are not available. In this case no error report is provided in case of translation fault. Otherwise interrupts are not needed. Differential Revision: https://reviews.freebsd.org/D55922
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
riscv: Add IOMMU to NOTES Reported by: bz, ivy Fixes: https://cgit.freebsd.org/src/commit/?id=bcecad2c24aa ("riscv: IOMMU support")
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
u-boot/opensbi determines the ethernet MAC address from ROM and passes it to the OS in the device tree. This change sets the correct MAC address from this source. This prevents the eqos class driver from generating random MAC addresses at each boot. Tested on Starfive VisionFive 2, riscv64 SBC. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56782
debug: classified in
03-filenames_plain1 by
'sys/dev/'
g_part,mkimg: Add additional GPT partition types Add the hifive-fsbl, hifive-bbl, and xbootldr aliases to mkimg(1). Add the xbootldr alias to geom(4), and thus gpart(8). The "hifive" partition types are defined and used by various RISC-V SBCs for locating firmware. "xbootldr", or the Extended Boot Loader Partition is defined here: https://uapi-group.org/specifications/specs/boot_loader_specification/ Reviewed by: emaste, markj, mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56784
debug: Commit manually moved from "unknown" to "hardware".
gpart.8: add entry for xbootldr partition type Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=dab8138e13de ("g_part,mkimg: Add additional GPT partition types") Differential Revision: https://reviews.freebsd.org/D56969
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: moved to hardware
because 'Need to be grouped with
dab8138e13dea539a387c458979403980a137bf2'
* cut-paste buffer stays unchanged PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260069 Reported by: emaste Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D56922
debug: classified in
03-filenames_plain1 by
'sys/dev/'
arm64: Add RSI detection for CCA Detect the presence of the Realm Services Interface (RSI). This detection is performed early in bootup; PSCI initialisation has been moved to initarm() to faciliate this. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56598
debug: classified in
03-filenames_plain1 by '['sys/arm64/',
'sys/dev/']'
arm64: Fix the includes for rsi.c This depended on header pollution only present when FDT is defined. As FDT isn't check for in this file we can remove opt_platform.h and include the correct set of vm header files. Reported by: ivy Fixes: https://cgit.freebsd.org/src/commit/?id=76a2904c352b ("arm64: Add RSI detection for CCA") Sponsored by: Arm Ltd
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
When EARLY_PRINTK is used in a realm environment, the UART physical address must be in the unprotected address space. The resulting physical address will not generally fit in an immediate, so use a literal instead. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56600
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
The patch in the PR failed to apply, so I manually applied the same changes. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295231 Submitted by: Mike Tancsa <mike@sentex.net> Reviewed by: emaste
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Fix comments on constraints storage The fields themselves are not unused, we actually fill them, but once filled we indeed do not use their values (yet). See the '#ifdef notyet' section in acpi_spmc_check_constraints(). No functional change. Reviewed by: emaste, obiwac, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56798
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Remove XXX from a comment about retrieving constraints There is really nothing we can do about a DSM function that works on first call but fails on subsequent calls, except calling it only once, which we already do. While here, soften the comment message, as failure was observed with some specific machines only. No functional change. Reviewed by: emaste, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56799
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Constraints: Rename the Intel-format parser ...from acpi_spmc_get_constraints_spec() to acpi_spmc_get_constraints_intel(), as really there is no ACPI specification proper and parsing the constraints is done according to some *Intel* specification (even if it is true that, by contrast, AMD has none). No functional change (intended). Reviewed by: obiwac, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56800
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Factor out code to test for a DSM's presence ...through a new function has_dsm(), which slightly simplifies reading. No functional change (intended). Reviewed by: obiwac, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56801
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Clear confusion between DSMs and their functions Stick to the ACPI specification's terminology where DSM means "device specific method", but is in fact a set of multiple functions (actually, there is one set of functions per DSM revision, with the set for some revision in theory including those of the previous revisions), by renaming some of the fields of 'struct acpi_spmc_softc' and local variables accordingly. To this end, rename appropriate structures, fields, parameters and variables, mechanically. No functional change (intended). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56802
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Introduce supports_function() For better readability and because this stance will be used in many more places in a subsequent commit. No functional change (intended). Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56803
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): softc: Remove unused 'obj' No functional change (intended). Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56804
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Factor out printing DSM call error, delineate function Introduce failed_to_call_dsm(), which prepends "function" before the function index for better clarity. For now, it prints the function number, as before, but will soon print a human-readable name. Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56805
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Human-readably print supported DSMs and their functions
To this end, revamp how DSMs and their functions are represented.
Replace enumerations, which only bring minimal advantages, with plain
macros, allowing to get rid of 'union dsm_index' and in passing the associated bug
that an underlying type smaller than 'int' is aliased to an 'int', which
assumes little-endian architectures. Associate to each function
a printable name, in the form of a per-DSM array that maps a function
index into a string. Make sure that every used array and their number
of items are sized at compile-time and are declared constant, and that
as little code as possible depends on the particular set of present DSMs
and associated functions.
Since the set of DSMs and sets of per-DSM functions are represented as
bitsets, introduce print_bit_field() to print such sets. This new
function is akin to printf("%b", ...) but with more flexibility. It
takes a function associating a name to some bit index and an opaque
pointer, allowing to leverage existing structures containing names
instead of imposing the use of a separate string containing all names to
be printed. It also provides a default name to bits without an explicit
name, composed of a common prefix and the bit index as a suffix.
Reviewed by: imp (older version), obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56756
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Rename functions parsing constraints
Rename acpi_spmc_get_constraints_intel() and
acpi_spmc_get_constraints_amd() ("get" => "parse") to reflect that they
are actually just parsing the constraints passed by
acpi_spmc_get_constraints().
No functional change (intended).
Reviewed by: imp, obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56806
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Constraints: Simplify some assertions While here, capitalize their messages. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56807
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Constraints: Clearer message on handle retrieve error Currently, the "failed to get handle for ..." log messages on attach are a bit alarming and no context is provided. Print out that these are retrieved when trying to match constraints and that such failures are ignored, which should make administrators worry less. While here, remove duplicated handle retrieving code in acpi_spmc_check_constraints() because: 1. As is, it is dead code: We 'continue' if the handle is NULL, i.e., not already resolved, before trying to resolve it again. 2. This code is called after device suspension, which might make some objects disappear from the ACPI namespace. In any case, it seems unlikely that, suddenly, new objects would appear. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56808
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Stop pretending that all constraints are verified We do not check these constraints (yet), so stop printing that they are verified. While here, make the (not compiled in at the moment) "constraint violated" message more terse, and move the warning it contains to outside of the loop (no need to print it repeatedly if multiple constraints are violated). While here, bail out early if there are no constraints to avoid printing (in the future) that constraints are respected even when there are none. Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56809
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Check DSMs only on attach, do not return 0 on probe Once we have recognized a device by PNP ID, declare support unconditionally on probe, and only check for DSMs in attach. We do this for these reasons: 1. PNP0D80 is de-facto a device supposed to hold DSMs related to suspend-to-idle, so we assume it cannot be used for other purposes. And if that changes, we need another architecture anyway (e.g., have a new driver claiming those devices and behaving like a bus, to which this driver would be a sub-driver). 2. If there are no DSMs that we support on such a device, then a new DSM was added that the driver does not know about and which "replaces" (in terms of functionality) the known ones, or the firmware is buggy. In both cases, failing the attach instead of the probe is reasonable, as that leads to printing some error which we (and probably users too) would like to know about. 3. This is a step to enable multiple instances of this driver (just to be a good citizen, and also to be future proof against weird firmwares that would, e.g., implement the Microsoft DSM on another device than the Intel one). Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56810
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Print supported functions after DSMs This makes things more top-down, as expected when probing devices. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56811
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): INVARIANTS: Do not panic on getting constraints failure Just continue without constraints checking in this case. To this end, remove the 'constraints_populated' field from 'struct acpi_spmc_softc' and any reference to it. However, we introduce another boolean, 'sc->get_constraints_succeeded', in order to check (under INVARIANTS) that acpi_spmc_get_constraints() is called only once on success. Calling that function another time after a success would leak memory. It would be easy to change that function to support multiple calls (e.g., by adding a call to acpi_spmc_free_constraints() near its start), however trying to retrieve the constraints again simply looks like wasted time as the same results are expected to be returned on each call. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56812
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Gracefully support a standalone Microsoft DSM In acpi_spmc_get_constraints(), stop assuming that if there is no AMD DSM, then the Intel one is present. Although this is likely to be the overwhelming majority of cases on amd64, there is no technical reason nor constraint in our code that really needs assuming that. On (so far hypothetical) machines with only the Microsoft DSM, this assumption would cause a cryptic and irrelevant error message (and, prior to the previous commit, a panic on INVARIANTS). Warn the user if both the Intel and AMD DSMs are present, and use the constraints reported by the Intel one (see the comment for why). Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56813
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): In-kernel strdup() cannot fail, remove dead code No functional change (intended). Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56814
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Constraint parsing: Clearer error messages Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56815
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Global message on constraints parsing failure ...in order to indicate to users that power state constraints will not be checked at all. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56816
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Enable multiple instances Support the (so far hypothetical) case of a machine with multiple instances of the PNP0D80 device (e.g., if multiple DSMs are not implemented on the same device), by allowing multiple instances of the device to co-exist. This is achieved by moving 'supported_functions' from 'struct dsm' into the softc, so each instance has its own view of which functions are supported. Consequently, the check on the instance unit on probe can be removed. Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56817
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): acpi_spmc_probe_dsm(): Remove passing superfluous handle The handle is already held by the softc, which is also passed. No functional change (intended). Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56818
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Add a sysctl knob to request verbosity The driver will be more verbose on this knob being non-zero or 'bootverbose' being set. The corresponding variable is typed as an integer to leave room for expansion. To be used in subsequent commits. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56875
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Be less verbose by default Do not print by default details of failures that are unlikely to help a normal user and to have a crucial influence on whether suspension works correctly. Do so only on a verbose boot or if requested explicitly by the user via 'debug.acpi.spmc.verbose'. In particular: - On an Intel Framework laptop, the Microsoft DSM only reports the SLEEP_ENTRY and SLEEP_EXIT functions. That makes some sense since, according to its specification, all functions of a Microsoft DSM except these two are in fact redundant with Intel DSM's ones (also, that of AMD DSM's ones). Those functions being missing are only a potential problem if there is no other DSM than Microsoft's (yet to be observed in the field). - The details of malformed/unapplicable constraints or ones with a newer format the driver does not know about are not readily actionable pieces of information, but rather debug/developer-oriented ones. When verbosity is not requested, only print the details of the first such failure to encourage reporting and at the same time avoid cluttering the output. - Detecting and printing unknown DSM functions is not directly actionable either, and the driver not using these functions may not prevent suspending (but might, e.g., prevent reaching deeper sleep states). Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56876
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): acpi_spmc_run_dsm(): Rename, rename parameters, constify This function actually runs a function of a given DSM. Remove the '_dsm' suffix to remove the inaccuracy and make things simpler. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56877
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Factor out testing for present DSMs/functions Since we are now keeping in the softc the information about which DSM functions are available (in supported_functions[]), the 'dsms' field there is somewhat redundant. Make it completely redundant by keeping the bit representing the enumeration function itself in each element of supported_functions[], and then remove the field. As a result, convert has_dsm() to rely on supports_function(). Adapt acpi_spmc_dsm_check_functions() so that it does not take into account the enumeration function bit. While here, use the self-explanatory stance IDX_TO_BIT(DSM_ENUM_FUNCTIONS) instead of a hardcoded 1. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56878
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Only run DSM functions reported present
Examination of the DSDT in a Framework laptop generally hints at
firmware designers sometimes providing ACPI methods for convenience
(e.g., same firmware for multiple models) but not using them (or not
expecting them to be used) depending on tweaks or the actual hardware
platform.
On an Intel Framework laptop, we specifically observe the presence of
a Microsoft DSM that just reports availability of the SLEEP_ENTRY and
SLEEP_EXIT (7 and 8) functions although the Microsoft specification
requires other functions, whose purpose is similar to corresponding
Intel DSM's ones (such as DISPLAY_OFF). However, we currently always
call the latter even on the Microsoft DSM. On that laptop, fortunately,
the way the code is structured in the _DSM method leads to nothing being
executed on this call.
Given the similarity of intent between most functions from the Microsoft
DSM on one side and those of ADM and Intel on the other, it is
imaginable that other firmware developers could use a strategy where
functions are in fact aliased, in which case insisting on calling the
Microsoft's DSM function even if not enumerated would cause the action
to be performed twice (because we also call the corresponding function
on the Intel/AMD DSM), which may or may not cause other problems and in
any case seems a waste.
So, by default, do not try to run any function that is not enumerated,
as that looks like the safest approach. Add a debug sysctl(8) knob to
revert to the previous behavior, just in case
('debug.acpi.spmc.force_call_expected_functions').
acpi_spmc_run() now checks if a DSM/function combination has been
enumerated, and skips the actual call if it does not. This allows to
remove all checks from the acpi_spmc_*_notif() functions, making the
code much more compact.
acpi_spmc_get_constraints() now checks whether
DSM_GET_DEVICE_CONSTRAINTS is supported in order to determine which DSM
to use and whether to call the function at all.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56879
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): softc: Move supported functions into a DSM info structure This is in preparation to adding the revision as a probed information. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56880
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Trivial simplification in detach function Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56881
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Auto-detect DSM revisions by default
Which revisions to use for the Intel and AMD DSMs is unclear. For the
Intel one, the written specification indicates only 0, but Linux uses
1 (possibly an oversight). For the AMD one, for which there is no
specification, Linux uses 0, but at least on the Framework 13 AMD 7040
series, the "enumerate functions" function only returns a mask that
covers all the functions we expect when called with revision 2.
Introduce an auto-detection strategy where each revision starting from
0 is tried in turn up to some limit (included; default: 15). As soon as
a revision implements all expected functions, we stop the loop and use
that one, in effect selecting the minimum revision that implements all
we need, which should avoid potential backwards-compatibility problems.
If no revision implements all expected functions, the highest available
revision in the checked range is selected, but higher revisions that do
not bring new functions are discarded (see the explanatory comment in
acpi_spmc_probe_dsm()).
The revision policy is still tunable using the same existing sysctl(8)
knobs 'debug.acpi.spmc.intel_dsm_revision' and
'debug.acpi.spmc.amd_dsm_revision'. They have been extended so that
a negative value indicates to use the auto-detection mechanism up to
a revision of minus the value. As before, a 0 or positive value
requests a specific revision. A new knob is introduced for the
Microsoft DSM just in case ('debug.acpi.spmc.ms_dsm_revision').
Since now the revision can be auto-detected, and thus depends on
a particular device instance, move it into 'struct dsm_info' on the
softc. This also enables finishing the split between static and
dynamic/tunable information, allowing to constify all the DSM
descriptors.
Print the revision eventually used along with the supported functions.
Tested on an Intel Framework laptop.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56882
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): If verbose, print called functions ...as a debugging aid, in order to be able to check that some functions are effectively called and to identify them quickly if they cause a hang. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56883
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_spmc(4): Update copyright Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
MFC after: 2 weeks Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Exception entry does not include an implicit, architectural data barrier. Reported by: Ben Simner <ben.simner@cl.cam.ac.uk> Reviewed by: andrew Fixes: https://cgit.freebsd.org/src/commit/?id=5577bb2f67ff ("arm64/vmm: Support tlbi from VHE") Differential Revision: https://reviews.freebsd.org/D56855
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
This device is not yet supported. Unfortunately some recently purchased UB400 dongles also contain this Realtek IC. Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
chn_poll() may hold both rdch and wrch channel locks while calling
chn_trigger(rdch). chn_trigger() switches the lock order from
"channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping
the channel lock before acquiring the dsp lock.
However, only rdch was unlocked during the transition while wrch
remained locked. Since wrch is also a channel lock and witness had
already established the lock order requirement:
dsp dev -> channel
witness reports a lock order reversal when pcm_lock() is acquired while
wrch is still held.
Avoid holding rdch and wrch simultaneously during chn_trigger()
lock-order switching by only keeping the channel locks when needed.
The issue can be reliably reproduced by starting pipewire,
pipewire-pulse, and pavucontrol.
Reviewed by: christos
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57009
debug: classified in
03-filenames_plain1 by
'sys/dev/'
- Reject PROT_EXEC in all cases when Linux support is not compiled in. - Define sysctl only when Linux support is compiled in. - Document better. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Eventually this hack will be removed, so start by disabling it by default. Sponsored by: The FreeBSD Foundation MFC after: 12 months Reviewed by: emaste Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Adjust the rssi and nf arguments to typed int8_t and adjust the maths for rssi to be consistant with what net80211 expects. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: lwhsu, adrian Differential Revision: https://reviews.freebsd.org/D57020
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This change modifies code paths and uses `__diagused` to address `-Wunused` issues that occur when `THUNDERBOLT_DEBUG` == `0`. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D55575
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reported by: bz
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
The header is not needed, and causes some issues with build because it requires vnode_if.h generated due to transient dependency from vnode.h. While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage. Reported and tested by: thierry Fixes: https://cgit.freebsd.org/src/commit/?id=1d5e4020e36e ("vnode: add VIRF_KNOTE flag") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/i386/']'
Reviewed by: Minsoo Choo <minsoo@minsoo.io> Differential Revision: https://reviews.freebsd.org/D56919
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Yes this printf is for local debugging and not required at all on anything. Pointed out by: andrew@
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This returns true if a given device is a PCI device (child of a PCI bus). Reviewed by: bz, kib Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56996
debug: Commit manually moved from "unknown" to "hardware".
Reviewed by: bz, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56998
debug: classified in
03-filenames_plain1 by
'sys/dev/'
* Document what iwx_rxmq_get_signal_strength() is doing in a comment, noting what the firmware returns and what math is being done on it to turn it into a dBm value. * Document what iwx_get_noise() is supposed to do, that we can't just go do math with log numbers like we're doing, but also that we're seeing zeros in this firmware (AX210), which may mean we're decoding using the wrong structs. * Swizzle around the RSSI calculation as a function, add min/max RSSI values, and calculate RSSI against the noise floor. * And handle the lowest noise floor value - it can't be -127dBm as that will throw things off. Cap it at -100dBm which is a little lower than the thermal noise floor at 20MHz (-98dBm), but it matches IWX_MIN_DBM. Differential Revision: https://reviews.freebsd.org/D53780
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all HDMI/DP output pins in an association with identical sequence numbers. The existing code disables the entire association on the first duplicate, leaving HDMI/DP audio non-functional. For digital output pins (HDMI/DP) with seq=0 duplicates, search for the next free sequence slot and reassign the duplicate rather than disabling. The seq=0 restriction targets the known Apple firmware pattern; any other duplicate sequence is more likely a genuine firmware error and the association is still disabled. Update first after reassignment so that hpredir is not left pointing at a stale sequence. Non-digital and input associations retain the existing disable behaviour. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55473
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The stale include line caused config -m to fail with an error trying
to parse the config file during make universe/tinderbox which in turn
caused universe/tinderbox to abort without building any powerpc
kernels (or subsequent architectures such as riscv64) with the error:
make[2]: freebsd/main/Makefile:767: Target architecture for powerpc/conf/MPC85XX unknown. config(8) likely too old.
in .for loop from freebsd/main/Makefile:761 with kernel = MPC85XX
in make[2] in directory "freebsd/main"
make[2]: stopped making "universe_kernels" in freebsd/main
*** Error code 1
Reported by: npn, many others
Fixes: https://cgit.freebsd.org/src/commit/?id=fd8d34ce272b ("dpaa: Migrate from NCSW base to a home-grown driver")
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
The Winbond/Nuvoton W83793G system monitor chip includes many features
not currently supported by this driver. The following are currently
supported:
* Up to 6 temperature sensors, 4 of which have 10-bit resolution
(8.2),two with 8-bit resolution (no decimal component)
* Up to 12 fans
- Fans 0-4 (1-5 on the datasheet) are always enabled. The remaining 7
fans are individually enabled.
* Multiple voltage sensors, reading up to 10 voltage sources. Sysctls
are labeled to match the datasheet.
* Chassis open detection.
The W83793AG is a feature-reduced version, which lacks 3 thermal diodes
and 2 voltage monitors. Since there is no way to tell the difference
between the W83793AG and W83793G programmatically, sensors reported on
the W83793AG will report strange values.
Temperature sensors and 7 of the fans can be individually enabled on the
chip, but currently not configured by this driver. The driver only
reports what was configured by the firmware. Additionally, this driver
numbers the sensors and fans according to the datasheet, so even if, for
instance, fan 8 is disabled, it would skip from fan 7 to fan 9, it does
not renumber. This makes it easier to follow for hardware debugging
purposes.
Missing features:
* Smart Fan support
* Fan PWM control
* ASF (Alert Standard Format)
Only Bank 0 registers are used at this time.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56776
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The address range 0xfffff78000000000 - 0xfffff7bfffffffff spans exactly 256GB (0x4000000000 bytes), not 512GB. For a 2TB kernel map, based on the KASAN 1:8 shadow map ratio, the required shadow map size is indeed 256GB. The current comment incorrectly states 512GB, which can be misleading and cause confusion. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57129
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251
debug: classified in
03-filenames_plain1 by
'sys/dev/'
To be initially used by virtual_oss(8) loopback devices. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26
debug: Commit manually moved from "unknown" to "hardware".
Drop and Add bits reset the data toggle for high-speed devices in XHCI. The toggle bit represents the sequence number in USB 2.0 transfers. However, a device can only recognize that the toggle bit has been reset while in the HALT state. As a result, the host and device toggle values may become mismatched, causing xHCI to reject the packet. This issue was observed while testing the EZ-USB FX2 device. The transfer may then return to the original value after a bi-directional TD because the toggle field is only one bit wide. This explains the reson that we can only receive packets bi-transfer in some case. Therefore, we do not reset the toggle bit here. Reviewed by: adrian MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57146
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This ifdef does not do anything, SV_ABI_LINUX is a flag. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: ivy, brooks Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/37
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Fixes: https://cgit.freebsd.org/src/commit/?id=36b855f18925 ("amd64/vmm: Lock global PCI passthrough structures") MFC after: 3 days Reported by: bz
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
The recent IBS work intruduced a bug on older CPUs where the IBS handler will be called on NMIs even when IBS is not initialized. Work around this in the IBS handler by checking to see if ibs_pcpu is NULL before accessing it.
debug: classified in
03-filenames_plain1 by
'sys/dev/'
https://forums.freebsd.org/threads/dell-wyse-7040-thin-client-intel-i5-6500te-built-in-sound-alc255-mini-how-to.102656/ Reported by: razif (on the forum) Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
On a suspend request via ioctl(), /dev/acpi (and compatible /dev/apm) both call acpi_ReqSleepState() instead of directly calling acpi_EnterSleepState(). The former does more checks, returns success if the machine is already suspending, and notifies user space (via devd(8)) about the impending suspend. In other words, it seems to have been designed for user consumption more than the latter function. So, use acpi_ReqSleepState() in place of acpi_EnterSleepState() in acpi_pm_func(), which is ultimately called by power_pm_suspend(), itself called by power_ioctl(). Other callers of power_pm_suspend() (such as the console drivers) are also user-facing facilities, so should also benefit from this change. Reviewed by: mhorne, imp Tested by: mhorne MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57239
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Segment descriptor contents are fixed on amd64 and not very interesting compared to the other values that are displayed. While here, include both the thread and process details of the current thread and drop redundant output of the trap number. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56989
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the amd64 build under the mistaken belief that this device was available on 32-bit processors only. But it's also available on the 64-bit Via Nano, Nano X2, and some Zhaoxin CPUs. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295517 Fixes: https://cgit.freebsd.org/src/commit/?id=88a53301e19 ("padlock.4: only install on i386") Fixes: https://cgit.freebsd.org/src/commit/?id=d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy") MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57215
debug: Commit manually moved from "unknown" to "hardware".
Previous script called acpiconf(8) (or apm(8) if ACPI wasn't supported, although this was anyway redundant because APMIO just uses ACPI now). Since a new generic power management interface was introduced, this isn't sufficient, as this would only work for ACPI systems and for ACPI S3 suspend (so no way to select suspend-to-idle). Rewrite in C to take advantage of the new power interface. We may want to add a switch to manually override the kern.power.suspend sysctl, which is otherwise what the power device uses to decide which suspend type to switch to (suspend-to-idle or firmware suspend), but this will require us to amend the power interface. Reviewed by: olce, imp, mhorne, ziaee Tested by: mhorne Approved by: olce, imp, mhorne, ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56918
debug: Commit manually moved from "unknown" to "hardware".
Reviewed by: obiwac, emaste, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57232
debug: classified in
03-filenames_plain1 by
'sys/dev/'
All other paths that return from the kernel to userspace pop the user trapframe off of the kernel stack pointer before returning to userspace in restore_registers. fork_trampoline was missing this, so all of the user faults after fork pushed another trapframe leaving a trapframe's worth of wasted space on the kstack. This would be fatal after a future change to remove duplicate initialization of td_frame in cpu_fork() as without this fix each time a thread was recycled it would "lose" another trapframe's worth of space. Reviewed by: kib, andrew Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Reviewed by: kib, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
This used to be needed to initialize the pcb pointer when the pcb was allocated on the kstack. Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
cpu_thread_alloc() already sets these fields anytime td_kstack changes. Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm/', 'sys/arm64/', 'sys/i386/', 'sys/powerpc/',
'sys/riscv/']'
If XSAVE is being used, the XSAVE header will be overwritten either by copying it from the parent thread in copy_thread for user threads, or by a fresh copy from fpu/npx_initialstate on the first use of the FPU for kernel threads. Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/i386/']'
Previously, the cpu_thread_alloc callback was invoked each time a kernel stack was allocated for a thread. This included thread creation, but it was also invoked if a recycled thread had to allocate a new kstack. This means that cpu_thread_alloc could be called multiple times for a single thread, but cpu_thread_free is only called once. Not only that, but the cpu_thread_alloc callback can't tell if it is being invoked on a new thread object, or a recycled thread. Calling *_alloc multiple times on an object is also atypical for kernel APIs. As a result of this confusion, amd64 was potentially leaking an XSAVE buffer each time a new kstack was allocated for an existing thread, since cpu_thread_alloc for amd64 always allocated a new XSAVE buffer. In practice, this edge case is probably rare. A process object needs to be recycled where either the new or old process is a kernel process with a non-default kernel stack size. Nevertheless, to ease the confusion, redefine cpu_thread_alloc to only be called once when a new thread is allocated. The new callback, cpu_thread_new_kstack is invoked each time a kstack is allocated for a thread, including both at thread creation time and if a recycled thread allocates a new kstack. The new callback should set any fields whose value is dependent on td_kstack (e.g. the user frame in td_frame, or td_pcb if the PCB is allocated on the kstack). Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: Commit manually moved from "unknown" to "hardware".
Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Suggested by: kib Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm/', 'sys/arm64/', 'sys/powerpc/',
'sys/riscv/']'
This is similar to commit 5e921ff49ea8bb70506248a4675894729cdad8c2 which moved the pcb for amd64, but a bit different. arm64's pcb is much larger (over 1KB!) than amd64's since it still embeds FP registers. Moving the pcb out of the kstack frees up that much additional kstack space. Unlike amd64 however, embedding the pcb in struct mdthread is not practical as the resulting struct thread would grow such that UMA would now store 1 thread per 4k page instead of 2 threads per page. By using a separate UMA zone for pcbs, 2 struct threads can continue to fit in a single 4k page, and 3 pcbs can fit in another 4k page. Reviewed by: kib, jrtc27, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
Similar to arm64, riscv's pcb embeds a copy of the floating point registers and is too large to store directly in struct mdthread as is done on amd64. Instead, use a separate UMA zone for pcbs. riscv's floating point state is not as large as arm64's, so its pcb is also somewhat smaller and a single 4k page can hold 6 pcbs. Reviewed by: kib, jrtc27 Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
To track which pages have MTE tags. Add a flag field to md_page. We can then use this in MD code to mark which pages have MTE tags. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55954
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
On a copy-on-write, copy the memory tags from the source pages to the destination pages so the forked process can continue to use MTE. Reviewed by: andrew Sponsored by: Arm Ltd Signed-off-by: Harry Moulton <harry.moulton@arm.com> Differential Revision: https://reviews.freebsd.org/D55955
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
sound: Update feeder_eq.c LICENSE header Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire M_MIXER Even though harmless, it is not really useful, as there is essentially only one allocation with M_MIXER. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire mixer_ioctl_channel() This function never succeeds when it is not called from the same process that has opened the file descriptor (e.g., mixer(8)). The reason is that the CHN_FOREACH() loop tries to match the pid of each channel with the pid of the process performing the ioctl, which will not be the same, unless it's the same process that both opened the channel and performed the ioctl. In the case that the same process opens the channels and performs the ioctl, however, we still do not need to worry, because mixer_ioctl_cmd() essentially does the same thing anyway. Additionally, this scenario should be quite rare, given that most applications do not open both /dev/dsp* and /dev/mixer*, and in fact, it is actively encouraged by the official OSSv4 specification not to do that. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire unused hw.snd.vpc_mixer_bypass Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Remove unused "from" mixer_ioctl_cmd() argument Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Use and lock only the appropriate channel in dsp_mmap_single() dsp_mmap_single() mmaps one of the channels associated with a dsp_cdevpriv, based on the nprot argument. PROT_WRITE and PROT_READ|PROT_WRITE select the output channel for mmaping, and PROT_READ the input one. Instead of locking and modifying the flags of all dsp_cdevpriv channels, do it only for the one we actually use. While here, retire the now unused dsp_lock_chans() and dsp_unlock_chans(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, kib Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Re-arrange a calculation in dsp_mmap_single() This makes it easier to read. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, kib Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate() We drop the channel lock to execute cdev_pager_allocate(). By the time we pick up the lock again, CHN_F_MMAP_INVALID might be set, so make sure we fail and free the vm handle. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, kib Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
debug: classified in
03-filenames_plain1 by
'sys/dev/'
snd_uaudio: Do not use snd_mixer->lock as mixer_lock
In similar fashion to c234740c9d34 ("snd_uaudio: Do not use
pcm_channel->lock to protect uaudio_chan"), stop this layering
violation, and introduce a snd_uaudio(4)-internal mixer_lock.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set()
This section would be previously locked by sound(4)'s mixer lock (see
e87654db5a09 ("snd_uaudio: Stop using mixer_get_lock()")), but
snd_uaudio(4) no longer uses it. This particular code path was missed
during testing, because my sound card does not reach it.
Fixes: https://cgit.freebsd.org/src/commit/?id=9a00e0b8ca56 ("snd_uaudio: Do not use snd_mixer->lock as mixer_lock")
Reported by: netchild
Tested by: netchild
Sponsored by: The FreeBSD Foundation
MFC after: 6 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
There is no reason to lock snd_mixer->lock here, since the only thing we are doing with snd_mixer is to call mix_getdevinfo() and mix_get_dev(), which are one-line getters, which are needed to eventually call uaudio_get_child_index_by_dev(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Remove all remaining uses of mixer_get_lock() These functions are called from sound(4) through MIXER_SET() in mixer_set(), but nothing mixer-related is used or needs to be locked in these cases. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by '['sys/arm/',
'sys/arm64/', 'sys/dev/']'
sound: Retire unused mixer_get_lock() Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Do not lock before destroying snd_mixer->lock Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire snd_mixer->enuminfo Instead of caching this when mix_setrecdevs() is called (which many drivers never call), calculate it when we need it. After all, it is quite rare that this structure is used by applications. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS I am not sure why this hack was needed, but the size should be sizeof(struct snd_mixer). Unfortunately, we have to expose snd_mixer, but it should be better than relying on a hack. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
sound: Update mixer.c LICENSE header Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
debug: classified in
03-filenames_plain1 by
'sys/dev/'
bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate() before creating the bus_dma tag and map. If a later initialization step fails, the common error path releases the interrupt and memory resources, but leaves the DMA channel allocated. Call bcm_dma_free() for cleanup, as it already performs the required internal checks and can therefore be invoked directly. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Reviewed by: mhorne MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2241
debug: classified in
03-filenames_plain1 by
'sys/arm/'
The Rockchip GPIO controller implements PIC operations for the INTRNG framework but is missing four masking methods that INTRNG calls during the filter/ithread handoff: pic_disable_intr, pic_enable_intr, pic_pre_ithread, pic_post_ithread. Without them, level-sensitive interrupt sources connected to a Rockchip GPIO pin re-fire continuously while their ithread runs. On a RockPro64 with a FUSB302B Type-C controller (i2c) attached to gpio1 INT_N, the system enters a ~210 kHz interrupt storm the moment the fusb302 driver attaches and INT_N goes low. Two complementary changes: 1. Add the four pic_disable_intr/pic_enable_intr/pic_pre_ithread/ pic_post_ithread method bodies. Each toggles the pin's RK_GPIO_INTMASK bit so the source is masked during the in-flight ithread window and unmasked on return, honouring the generic INTRNG mask/unmask sequence. 2. When the GPIO IRQ filter dispatches a pin and finds no consumer registered, mask the pin at the controller (INTMASK=1, INTEN=0) before continuing. Level-triggered sources keep asserting until acked, so a single stuck pin used to flood the console with thousands of "Interrupt pin=N unhandled" lines per second. The mask survives until something re-attaches and re-enables the IRQ via the standard pic_enable_intr path. Affects all level-triggered IRQs on Rockchip GPIO banks; edge- triggered IRQs were already self-acking and unaffected. Signed-off-by: Kyle Crenshaw <B1nc0d3x@gmail.com> Reviewed by: mhorne MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2197
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D57269
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The check for the extended signature table was backwards, so we always ignored it. We should verify that the extended signature table fits within the total image size. Reviewed by: jrm, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57209
debug: classified in
03-filenames_plain1 by
'sys/x86/'
MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/x86/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283315 Tested by: tuexen MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: markj Tested by: aokblast Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49566
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Introduce pcm_hotswap(), which is responsible for sending devctl SND/CONN notifications. There are two user-visible improvements with this patch: First, in pcm_unregister(), instead of just sending a SND/CONN/NODEV notification when all devices have detached, we also switch to the new default device if the previously default one has detached, but there are more left. Second, in pcm_register(), if the device happens to also be the new default device, we hot-swap to it. Additionally, if hw.snd.default_auto is set to 2, then we will essentially be hot-swapping to the newest attached device. The latter is especially useful for laptops like the Framework 16, which comes with a built-in snd_hda(4) speaker-microphone-only device, and headphones can work with the Framework Audio Expansion Card, which does not extend the snd_hda(4) device, but is in fact a separate snd_uaudio(4) device. To achieve automatic audio redirection between headphones and speakers in this case, there has to be a way to switch between different devices. The way the Audio Expansion Card works is by having snd_uaudio(4) attach to it when the headphones are plugged, and detach when unplugged, so this patch, along with hw.snd.default_auto=2, can pick up those attach events and switch automatically. Combined with the pcm_unregister() update, it becomes possible to switch back and forth between headphones and speakers. While here, be more robust and lock around snd_unit reads. In collaboration with: jrm Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Accessing usb_xfer_queue requires bus lock, we added this missing lock in here to prevent racing issue. Reviewed by: adrian MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57293
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57264
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
* Add a flag to indicate that an INT_CAUSE should not be cleared automatically in the generic handler. This is to ensure correct operation of some INT_CAUSEs that are related to each other and must be cleared in a certain order. * Add decode for many more INT_CAUSE registers. MFC after: 1 week Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This change removes the hard-forcing of PCI_IOV and adds shims to allow the driver to compile and work when the kernel is missing PCI_IOV support. Fixes: https://cgit.freebsd.org/src/commit/?id=7c450d1127c7 Reviewed by: sumit.saxena_broadcom.com Differential Revision: https://reviews.freebsd.org/D57300 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add the device ID to the usbdevs table in order to be able to use it in the rtwn/usb driver for the RTL8188EU attachment. (I adjusted the name to B1 compared to the original submission) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291839 MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
ukbd_set_leds_callback() built the SET_REPORT control request with USETW2(req.wValue, UHID_OUTPUT_REPORT, 0) before the loop that determines the actual HID report ID from sc_id_numlock, sc_id_scrolllock, or sc_id_capslock. The data payload was already correctly prefixed with the real report ID when id != 0, but the control request's wValue told the device to set report ID 0, which does not exist on devices that use non-zero report IDs for LED output. Apple Internal Keyboard / Trackpad (0x05ac:0x0274) uses report ID 1 for LED output. The mismatch caused the device to STALL every SET_REPORT request, so the capslock LED could never be updated. Move the USETW2 call to after the LED-detection loop so that wValue carries the correct report ID. Signed-off-by: Joshua Rogers <Joshua@Joshua.Hu> Reviewed by: wulf MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2210
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57038
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This commit adds the sapphire rapids CPU model to hwpmc_intel.c, allowing hwpmc to be used on this CPU family. Reviewed by: mhorne MFC after: 3 days Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D57263
debug: classified in
03-filenames_plain1 by '['sys/dev/',
'sys/sys/pmc.h']'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
ig4iic: Add PantherLake IDs MFC after: 2 weeks Sponsored by: Framework Computer Inc Signed-off-by: Daniel Schaefer <dhs@frame.work>
debug: classified in
03-filenames_plain1 by
'sys/dev/'
spi: Remove incorrect pci id This id is for SPI flash instead of spi bus Fixes: https://cgit.freebsd.org/src/commit/?id=39e297bf54a5 ("ig4iic: Add PantherLake IDs") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Framework Computer Inc
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The memory where the pre-OS IDT was located might be already consumed by kernel. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57321
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294630 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D57368
debug: classified in
03-filenames_plain1 by
'sys/x86/'
In package control mode, the performance of all cores depends on the most recent value written to the request field. If the last write comes from an E-core, all cores are forced to align with the E-core performance level, resulting in significant performance degradation. Therefore, package control is disabled on hybrid-core systems. Reviewed by: olce MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Framework Computer Inc Differential Revision: https://reviews.freebsd.org/D57377
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Add struct linux_pt_fpregset, the amd64 Linux NT_PRFPREG payload, corresponding to user_i387_struct in Linux. The struct describes the 512-byte FXSAVE area as exposed by PTRACE_GETREGSET. Add bsd_to_linux_fpregset() to translate from FreeBSD's struct fpreg to struct linux_pt_fpregset. Fields are extracted from the fpr_env[] array which stores the FXSAVE environment packed as four 64-bit words. The FP and XMM register banks are bulk-copied as opaque byte arrays. Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: kib Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
T2 Macs (2018+) expose the SMC via memory-mapped registers instead of I/O ports. Add asmcmmio.c/asmcmmio.h implementing the MMIO transport: key read/write, getinfo, getbyindex, and a poll-based wait with exponential backoff. The driver probes for MMIO at attach time by checking the LDKN firmware version key; if MMIO is available it is used, otherwise the standard I/O port backend is used. T2 fan speeds use IEEE 754 floats instead of fpe2 fixed-point. Per-fan manual mode uses F%dMd keys instead of the FS! bitmask. Battery charge limit is exposed via dev.asmc.N.battery_charge_limit. Tested on: MacBookPro16,2 (A2251, iBridge2,10) MacBookPro15,4 (A2159, iBridge2,8) MacBookAir8,2 (A1932, iBridge2,5) Mac mini 8,1 (A1993, iBridge2,7) iMac20,2 (A2115, iBridge2,16) iMacPro1,1 (A1862, iBridge1,1) MFC after: 2 weeks Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D57086
debug: classified in
03-filenames_plain1 by
'sys/dev/'
cxgbe(4): Use backdoor access to read SGE context on T7 This avoids a firmware bug where it crashes when accessing SGE context on a secondary core. MFC after: 1 week Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
cxgbe(4): Do not read indirect INT_CAUSE registers directly Some of the registers added in a172f9e5b3cf are not directly accessible and should be avoided. Fixes: https://cgit.freebsd.org/src/commit/?id=a172f9e5b3cf cxgbe(4): Improvements to the slow interrupt handler MFC after: 1 week Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
cxgbe(4): Use correct FID in KTLS tx work requests MFC after: 1 week Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
For symmetry with ofw_bus_setup_iinfo, the next commits will use it to properly cleanup on failure in bcm2838_pci. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D56895
debug: classified in
03-filenames_plain1 by
'sys/dev/'
If device_attach() fails, we're expected to actually cleanup after ourselves because device_detach() will not be called. Factor out the cleanup bits that don't rely on attach having actually succeeded so that we can cleanup properly in bcm2838_pci. Reviewed by: andrew, imp Differential Revision: https://reviews.freebsd.org/D56896
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Specifically on the RPi CM4, we currently don't set the controller up right and it never moves into the ready state (we don't observe the link active bit). Failure to cleanup here actually results in a panic not long after, due to a use-after-free in the rman bits. Further down in pci_host_generic, we have some rman stashed in the softc that are initialized and placed onto the rman tailq, then the softc is later freed without an rman_fini() to pull them off of the tailq properly. Note that PCIe on this board won't come up at boot without something plugged in, so it currently can't be booted with an empty slot with the intent to hotplug a supported card. Some issues with controller startup have been observed with Broadcom NICs in the wild, but no problems have been observed with other NICs and a variety of different PCIe cards. Shout-out to Vince <git@darkain.com> for the extensive debugging and analysis to arrive at this conclusion. Reviewed by: andrew, imp Differential Revision: https://reviews.freebsd.org/D56897
debug: classified in
03-filenames_plain1 by
'sys/arm/'
At present, the exception syndrome register (ESR) is not accessible via the user context on FreeBSD AArch64, which makes it difficult to determine the cause of an exception. For example, a signal handler might get a `SIGSEGV` with `SEGV_ACCERR`, but it can't know whether that occurred due to a bad read or write. The change implemented here includes ESR in `struct __mcontext`, thereby allowing access via `ucontext_t` for use by signal handlers, sanitizers, debuggers, etc. Note that this addition consumes one of the seven spare 64-bit slots in `struct __mcontext`. Signed-off-by: Alex Arslan <ararslan@comcast.net> Reviewed by: andrew Pull Request: https://github.com/freebsd/freebsd-src/pull/2053
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
There's no point in acquiring a hold if the proc lock isn't going to be dropped. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57468
debug: classified in
03-filenames_plain1 by
'sys/i386/'
Reviewed by: markj, vexeduxr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57250
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This change refactors fatal error delivery via APEI and prints more info:
- Makes the NMI handler call into the ge handler to establish a common
code flow, no matter how the error is delivered
- Adds the FRU to the panic string so as to provide more information than
just "APEI Fatal Hardware Error!" such as
"APEI Fatal Hardware Error: PcieError"
- Prints more details about fatal pcie errors. Note that we skip acquiring
Giant on fatal errors
- Hexdumps the full GED data on fatal errors, so as to facilitate
offline data analysis
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57417
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Wrap the if_input() call in fwe_as_input() with NET_EPOCH_ENTER/EXIT. The network stack requires epoch protection when delivering packets via if_input, and fwe was missing it. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57459
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Remove stale and misleading XXX comments throughout firewire.c. Most were from the original 2002 codebase and either described correct behavior or noted aspirational improvements that never happended. Two actionable items retained as TODO: config ROM CRC validation and pending xfer cleanup on detach. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57466
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Two bugs in the firewire bus layer that affect all consumers ( if_fwip, sbp): watchdog_clock was a static local in firewire_watchdog(), shared across all firewire_comm instances. With two controllers (e.g. built-in + Thunderbolt Display), both advance the same counter, so the second controller's 15-second boot-time timeout guard expires prematurely. fw_tl2xfer() released tlabel_lock before returning the xfer pointer. Reviewed by: zlei, adrian Differential Revision: https://reviews.freebsd.org/D57496
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: christos MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57329
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Packets received with the following configuration are associated with
AXGE_RX_MII_ERR, which looks legit since there's no AXGE_RX_CRC_ERR
or AXGE_RX_DROP_PKT attached:
axge0: <ASIX Elec. Corp. AX88179, rev 2.10/1.00, addr 3> on usbus0
miibus0: <MII bus> on axge0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 3 on miibus0
rgephy0: OUI 0x00e04c, model 0x0011, rev. 5
rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
Without this, 'dhclient ue0' never gets valid lease as all the DHCP
replies are dropped by the driver.
This behaviour is align with the reference driver provided by the
vendor(ASIX_USB_NIC_Linux_Driver_Source_v3.5.0.tar.bz2).
MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Approved by: so Security: FreeBSD-SA-26:27.sound Security: CVE-2026-45258 Reviewed by: markj Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The channel buffer mapped by dsp_mmap_single() may be freed when the device handle is closed, but the mapping persists beyond that, allowing userspace to read or write memory owned by a different consumer. Fix the problem by adding a reference counter to the sound buffer. Define pager ops for the VM object returned by dsp_mmap_single() and use them to manage the extra reference. Add a regression test. Approved by: so Security: FreeBSD-SA-26:27.sound Security: CVE-2026-49417 Reported by: Lexpl0it, 75Acol, Liyw979, Rob1n Reviewed by kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57393
debug: classified in
03-filenames_plain1 by
'sys/dev/'
- ARM C1-Premium erratum 4193780 - ARM C1-Ultra erratum 4193780 - ARM Cortex-A76 erratum 4193800 - ARM Cortex-A76AE erratum 4193801 - ARM Cortex-A77 erratum 4193798 - ARM Cortex-A78 erratum 4193791 - ARM Cortex-A78AE erratum 4193793 - ARM Cortex-A78C erratum 4193794 - ARM Cortex-A710 erratum 4193788 - ARM Cortex-X1 erratum 4193791 - ARM Cortex-X1C erratum 4193792 - ARM Cortex-X2 erratum 4193788 - ARM Cortex-X3 erratum 4193786 - ARM Cortex-X4 erratum 4118414 - ARM Cortex-X925 erratum 4193781 - ARM Neoverse-N1 erratum 4193800 - ARM Neoverse-N2 erratum 4193789 - ARM Neoverse-V1 erratum 4193790 - ARM Neoverse-V2 erratum 4193787 - ARM Neoverse-V3 erratum 4193784 - ARM Neoverse-V3AE erratum 4193784 These are all variants on an erratum where TLBI+DSB instructions on one CPU may incorrectly complete early leading to stores to an updated address using an incorrect translation on another CPU. In all cases the workaround is to add a second TLBI+DSB. Approved by: so Security: FreeBSD-SA-26:31.arm64 Security: CVE-2025-10263 Sponsored by: Arm Ltd
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
AMD does not have a CPUID bit to indicate the lack of K8 PMCs. If all other PMC features are not present we should test an event selector to see if it stores and returns a value. If the VM is implemented correctly, this should result in a #GP on the initial wrmsr_safe. Bhyve and a few other VMs ignore writes, so I got one step further and test that it retains the OS and USR bits. Tested on Zen 5 native and a Zen 5 Bhyve virtual machine. This code should not run on any recent hardware, except in a VM, as it checks that the core counter extension is missing. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268943 Reported by: Sandipan Das, John F. Carr <jfc@mit.edu> Reviewed by: mhorne, imp Sponsored by: Netflix MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2272/changes
debug: classified in
03-filenames_plain1 by
'sys/dev/'
* Force the type of the literal `1` passed to nstosbt() to ensure it's a 64-bit type (or larger). Otherwise it gets inconveniently typed to int, resulting in truncation. * Use `flsll()` when converting sbt to power-of-2-nanoseconds to fix 32-bit compatibility. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292616 Obtained from: Hewlett Packard Enterprise Fixes: https://cgit.freebsd.org/src/commit/?id=26d6617f3 ("watchdog: Convert to using sbintime_t format") MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The Book-E watchdog is effectively a state machine based around an AND mask of the timebase register. A single bit (0-63) is watched in the timebase register, and when it transitions (by counting *or* by programmatically setting) an exception is triggered. The first exception triggers a core interrupt. The second is programmable. In our case, we panic on the first and reset on second.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.
In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.
Tested by: fuz
MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
This feature is utilized when updating storage capacity in capable hypervisors such as QEMU. Reviewed by: imp Approved by: imp(mentor) Obtained from: Fudo Security MFC after: 2 weeks Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D57247
debug: classified in
03-filenames_plain1 by
'sys/dev/'
FreeBSD's USB framework supports detaching kernel drivers to allow user space applications to exclusively claim USB interfaces. However, it lacked support for reattaching the kernel driver afterward. This commit adds the missing functionality, enabling user space to return control of the device back to the kernel. Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52122
debug: Commit manually moved from "unknown" to "hardware".
Add kernel and userland support for Zen6 IBS extensions per AMD pub 69205 (rev 1.00, March 2026): alternate fetch/op disable via ctl2[0], fetch latency filtering, virtual address bit 63 filtering, and streaming-store filtering. Decode the new IbsOpData2 StrmSt and RmtSocket bits. Update libpmc, pmcstat and manpage. Pre-Zen6 systems work unchanged with ibs_ctl2 == 0. Signed-off-by: Andre Silva <andasilv@amd.com> Reviewed by: Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne Sponsored by: AMD Differential Revision: https://reviews.freebsd.org/D56914
debug: Commit manually moved from "unknown" to "hardware".
only those originated by mouse. Because the terminal surrounds requests to vt(4) with locking. Reported by: bz, adrian Reviewed by: adrian, glebius Approved by: glebius (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57442
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54069
debug: classified in
03-filenames_plain1 by
'sys/dev/'
When interface was connected to a link partner with a cable type limitting maximum supported speed, e.g. SFP+ cable in 25G port, driver incorrectly saved a supported speed as the user configured speed. This prevented interface from using all supported speeds after switching cable to SFP28. Link was established at 10G as supported by previously used SFP+ cable. Don't set user requested speed unless actually configured by an user, to allow automatic selection of highest available speed. Only when user sets custom config using advertise_speed sysctl save it and try to apply after cable is changed. Also don't save initial supported speeds if FW supports reporting default PHY config. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53611
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reported by: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add a sysctl entry for the evdev device number (devnum) to allow libudev-devd to populate the corresponding device information fields (MAJOR and MINOR) when running in a jail with no input devices exposed through devfs. Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr> Reviewed by: wulf Sponsored by: Defenso MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56968
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Do not jump to the resource release path when bus_alloc_resource_any() fails, since no MMIO resource was allocated. If a10_intr_pic_attach() fails after the MMIO resource has been allocated, release it before returning. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Reviewed-by: vexeduxr Pull-Request: https://github.com/freebsd/freebsd-src/pull/2253
debug: classified in
03-filenames_plain1 by
'sys/arm/'
Also remove the rid variable since it was unused. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Reviewed-by: vexeduxr Pull-Request: https://github.com/freebsd/freebsd-src/pull/2255
debug: classified in
03-filenames_plain1 by
'sys/arm/'
The Apple T2 (ANS2, PCI 106b:2005) requires several quirks: - 128-byte submission queue entries (CC.IOSQES = 7) - Single MSI vector, one IO queue - Admin and IO queues share a CID table; IO CIDs offset by adminq.num_trackers to avoid overlap - No async event support - IDENTIFY CNS >= 2 rejected to avoid firmware confusion Tested-on: - MacBookPro16,2 (A2251) - Mac mini 8,1 (A1993) - Multiple Non-Apple computers Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57087
debug: classified in
03-filenames_plain1 by
'sys/dev/'
DMA ring transport between the host and the T2 coprocessor. Provides mailbox handshake, queue setup, and firmware keepalive for higher-level T2 services (VHCI, audio, etc.). Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57088
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Implements a VHCI driver on top of the BCE transport: - Virtual USB bus registration via usb_controller - Port discovery and device enumeration - Control, interrupt, and bulk endpoint support - Firmware event handling with taskqueue - Suspend/resume via BCE mailbox Provides keyboard, trackpad, and Touch Bar access on T2 Macs. Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57089
debug: classified in
03-filenames_plain1 by
'sys/dev/'
asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ, asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL (MMIO backend is used instead), causing a page fault when ASMC_DEBUG triggers asmc_dumpall() during attach. Add an MMIO guard at the top of asmc_key_dump(): delegate to asmc_key_dump_by_index() + asmc_key_read() for MMIO devices, consistent with the rest of the T2 code paths. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56748
debug: classified in
03-filenames_plain1 by
'sys/dev/'
BCM57766 on Apple T2 Macs (Macmini8,1) has no dedicated EEPROM and the
chip firmware handshake fails (the T2 intercepts PCI config space),
leaving the SRAM mailbox unpopulated. All four existing MAC retrieval
paths (SRAM mailbox, NVRAM, EEPROM, firmware stub) fail, causing bge to
abort attach with "failed to read station address".
Work around this with two changes:
1. Tolerate EEPROM read failure on BCM57766. The chip is copper-only
so hwcfg=0 is correct; skip the fatal error that aborts attach
before bge_get_eaddr() is ever called.
2. Implement bge_get_eaddr_fw() to read a "hint.bge.N.mac" string
(e.g. "f0:18:98:f4:1e:2f") from loader(8) tunable / kenv.
This is a workaround until the T2 BCE API is understood well enough to
either poke the chip firmware into completing its handshake or read the
MAC from the T2 directly.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57090
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The malloc() failure path returned error, which is 0 at this point, so callers would treat the allocation failure as success. Return ENOMEM instead to correctly propagate the out-of-memory condition. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D42282
debug: classified in
03-filenames_plain1 by
'sys/dev/'
if_bnxt/bnxt_re: add support for driver snapdump Add a logging module which helps to log and collect the driver`s various events and state of device data structures. APIs help modules like l2, RoCE etc. to register and add logs into thg buffers. A segment header is added to the data available in buffers. The final log messages are arranged in following fashion |SegHeader0|Data0|SegHeader1|Data1| Logging module provides two different kinds of buffers: a) A large contiguous memory chunk is used to form circular buffers. Module need to provide a number of buffers while registering to the logging module.Please note that, since memory for the buffers remains with the module as long as it is registered, memory footprints of the driver could be higher so the modules should allocate an appropriate number of buffers. Also, due to limited space, modules should only log important events/messages into the buffer. Modules must use bnxt_log_add_mssg() to add the message into the list. b) Live buffer - They are allocated during coredump retrieval and freed after the coredump data is returned to the user. This helps to collect live data from the driver. Modules must use the bnxt_log_live() function to add the log messages. When coredump is retrieved all the messages available in above buffers are copied into the coredump buffer. Test Plan: Generate the coredump using below niccli command ./niccli.freebsd -i 1 debug --coredump and then verify the coredump contents using the Broadcom's Coredump decoder. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56682
debug: classified in
03-filenames_plain1 by
'sys/dev/'
if_bnxt: Add Firmware crashdump collection support This patch adds support for DDR-based firmware coredump memory handling. It detects firmware coredump capability, allocates host DDR (DMA) memory for crash dumps, and programs the firmware with the allocated memory during attach. The allocated memory is released during driver detach. Also, This patch adds functions to retrieve crash dump data from host DDR memory. The implementation handles data copying from page tables and checks dump availability. Main function bnxt_get_coredump() copies stored crash dump data from DDR memory to the application buffer. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56684
debug: classified in
03-filenames_plain1 by
'sys/dev/'
if_bnxt: add bnxt logger module files to sys/conf/files for built-in kernel builds
The bnxt snapdump and coredump support patches added bnxt_log/{_data}.c. and listed it in
sys/modules/bnxt/bnxt_en/Makefile, but missed to add these files in sys/conf/files.
Fix up the issue by adding bnxt_log/{_data}.c in sys/conf/files.
Fixes: https://cgit.freebsd.org/src/commit/?id=f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump")
debug: classified in
04-filenames_plain2 by 'sys/'
if_bnxt: add few source files to version control
Commits- f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump")
and 03839879a2dd ("if_bnxt: Add Firmware crashdump collection support")
missed to add few files under version control, those files are
added now:
sys/dev/bnxt/bnxt_en/bnxt_log.c
sys/dev/bnxt/bnxt_en/bnxt_log.h
sys/dev/bnxt/bnxt_en/bnxt_log_data.c
sys/dev/bnxt/bnxt_en/bnxt_log_data.h
sys/dev/bnxt/bnxt_en/bnxt_coredump.c
sys/dev/bnxt/bnxt_en/bnxt_coredump.h
bnxt_coredump.c entry is added in sys/conf/files as well.
Fixes: https://cgit.freebsd.org/src/commit/?id=f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump")
Fixes: https://cgit.freebsd.org/src/commit/?id=03839879a2dd ("if_bnxt: Add Firmware crashdump collection support")
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Update hsi headers MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56683
debug: classified in
03-filenames_plain1 by
'sys/dev/'
if_bnxt: Fix the Unknown command 0x80000000 ioctl command error With the latest niccli version, user will observe below Unknown command command error when try to list the devices. if_bnxt: Unknown command 0x80000000 Here, niccli is issuing command opcode as 0x80000000 but driver is expecting 0x20000000 command opcode. So, replaced _IOW(0,0,0) with the _IOC(IOC_IN,0,0,0). Fixes: https://cgit.freebsd.org/src/commit/?id=d53d7b4 ("bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN") MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56685
debug: classified in
03-filenames_plain1 by
'sys/dev/'
if_bnxt: Add support for HWRM passthrough with multiple DMA buffers Added support for HWRM passthrough commands with multiple DMA buffers. Also, changed the mgmt_lock to sleepable exclusive lock. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56686
debug: classified in
03-filenames_plain1 by
'sys/dev/'
ntsync(9): properly handle timeouts Reported by: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
ntsync(9): free wait state on error from copyin of the object's array Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
ntsync(9): do not double-free obj when finstall() failed Reported by: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57478
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Commit 6024e3f99a1e ("Add audio group") introduced GID_AUDIO, initially
for virtual_oss(8) loopback devices. Now make all of them with
GID_AUDIO.
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/35
debug: classified in
05-summary-prefix by 'sound:'
uvideo: import uvideo(4) driver from OpenBSD Port the uvideo(4) driver from OpenBSD. This provides native USB Video Class (UVC) support for webcams and video capture devices. The main changes are adaptation for: - USB transfer callback model - isoc data extraction via usbd_copy_out(), - V4L2 struct alignment for ABI compatibility with v4l_compat. Note that this implementation can coexist with webcamd. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D56960
debug: classified in
03-filenames_plain1 by
'sys/dev/'
uvideo: add kqueue support Add EVFILT_READ kqueue filter so applications using kqueue/kevent can efficiently wait for video frames instead of polling. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D56961
debug: classified in
03-filenames_plain1 by
'sys/dev/'
uvideo: add Camera Terminal controls Implement UVC Camera Terminal (CT) controls per UVC 1.5 specification Table A-12. This adds support for camera-specific controls that are separate from the Processing Unit controls already supported. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D56962
debug: classified in
03-filenames_plain1 by
'sys/dev/'
uvideo: add missing formats to be in par with webcamd's uvcvideo
debug: classified in
03-filenames_plain1 by
'sys/dev/'
uvideo: increase isochronous transfer depth for throughput Increase NFRAMES_MAX from 40 to 128 and IXFERS from 3 to 5 to keep more packets in flight on the USB bus. This brings throughput from ~13.5 MB/s to ~21 MB/s (for comparison on the same camera webcamd provided ~20MB/s. The linux driver also uses 5 IXFERS (but only 32 NFRAMES_MAX) Tested by: manu
debug: classified in
03-filenames_plain1 by
'sys/dev/'
uvideo.4: Initial manual page Fixes: https://cgit.freebsd.org/src/commit/?id=b711ef9c75ba (import uvideo) Reviewed by: 0mp, bapt, kevans Differential Revision: https://reviews.freebsd.org/D57622
debug: classified in
02-filenames_wildcards by
'.*Makefile'
debug: moved to hardware
because 'Need to be grouped with
b711ef9c75ba71d6258d028aaf7b119ccfffaa0a'
Set the correct value in the TX descriptor for the vlan header. PR: kern/https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295175
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The node pointer is guaranteed to be non-NULL by the net80211 stack. The original check was also ineffective as it dereferenced ni->ni_vap before the NULL check. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54547
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Below is the commit message: ``` Wtap originally only supported mesh/ad-hoc mode, and cannot be combined with wpa_supplicant(8) and hostapd(8) since it's unaware of encryption/decryption. This commit adds support for hostap and sta mode with WPA/WPA2, thus wtap(4) can now be used with hostapd(8) and wpa_supplicant(8). ``` Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D36243
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Implement monitor mode by simply adding IEEE80211_C_MONITOR to ic->ic_cap. To get additional informations when capturing 802.11 frames, radiotap is inserted by wtap_tx_tap() when TX and wtap_rx_tap() when RX. There are some type faults in struct wtap_rx_radiotap_header which are mainly mistakenly store unsigned values into signed integers. I have fixed them (wtap(4)) by complying with the types defined in https://www.radiotap.org/fields/defined. Becuase the struct wtap_rx_radiotap_header comes from ath(4), there may be another patch to fix the type faults in ath(4). Differential Review: https://reviews.freebsd.org/D36469
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This follows commit 3296fda0c309c873ae37a0a4e25ded3ae04b421c. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289236 Reviewed by: kib MFC after: 3 days
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm/', 'sys/arm64/', 'sys/i386/', 'sys/powerpc/',
'sys/riscv/']'
The 'hw.acpi.suspend_state' sysctl knob was re-introduced with a bug. Its handler, acpi_suspend_state_sysctl(), expects the ACPI softc in 'arg1', but the knob was registered with NULL there. This causes a panic (NULL dereference) when reading the knob if the suspend state has been set to S1 or S2 or equivalently the suspend sleep type to STANDBY. Fix it by passing the ACPI softc as 'arg1' when registering the knob. Reviewed by: obiwac Fixes: https://cgit.freebsd.org/src/commit/?id=9e1e29bd5ec6 ("acpi: Add back `hw.acpi.suspend_state` sysctl") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57412
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This is done in preparation of having some machine-dependent code access
these arrays through the softc.
Before this change, these arrays were static. We chose to make them
part of the softc, instead of just exporting them ('acpi_quirks' remains
a known offender; some better way forward is to declare the whole ACPI
softc as static).
Some sysctl handlers now need to be passed the softc to access the
arrays, and some already needed to be passed a pointer to a field in the
softc. As sysctl handlers are provided with a single pointer (arg1) and
a single integer (arg2), and now that the softc has to be passed into
the pointer argument (arg1), point indirectly to the wanted softc's
field by passing its offset in the integer argument (arg2).
To preserve the statically sized array in the signature of
power_pm_register(), and consequently avoid constructing such a dummy
array in early initialization (after this change, we can't pass
acpi_supported_stypes[] anymore as there is no existing ACPI softc at
this point), just remove the early ACPI registration via
power_pm_register(). This existed in the past as a hack to ensure ACPI
would be registered in priority, but for a long time now ACPI has been
the only subsystem that registers itself to the generic power
infrastructure, so this early registration has not been needed.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57413
debug: classified in
03-filenames_plain1 by
'sys/dev/'
- Skip firmware reload if MCU already initialized - Fix firmware_put() memory leaks on error paths - Increase MCU init timeout to 15 seconds - Use debug macros instead of device_printf for verbose output - Remove unused 'ret' variable - Fix space indentation to tabs per style(9) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57597
debug: classified in
03-filenames_plain1 by
'sys/dev/'
When hw.est.msr_info=1 is set, est_msr_info() extracts the bus clock from MSR_PERF_STATUS upper bits. On secondary CPUs, the MSR may contain zero in the frequency ratio field, causing a divide-by-zero panic. Observed in pre Skylake Intel cpu. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57614
debug: classified in
03-filenames_plain1 by
'sys/x86/'
On modern Intel CPUs that use HWP (hwpstate_intel: /usr/src/sys/x86/cpufreq/hwpstate_intel.c) instead of EST, this message prints unconditionally during probe even though it is expected and harmless. Gated behind bootverbose to reduce console noise on systems where EST is present but considered legacy. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57616
debug: classified in
03-filenames_plain1 by
'sys/x86/'
nvme: Use newbus to ask if a device is storage As NVMe is in more places, it has a variety of attachments. On non PCI busses, we assume we're a storage device. For PCI, we look at the interface ID. Add newbus glue to make this happen. Sponsored by: Netflix Discussed with: jhb Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56994
debug: classified in
03-filenames_plain1 by
'sys/dev/'
nvme: Move default is_storage method to nvme_private.h Since CODE entries wind up in the nvme_if.c file, we got warnings when it wasn't used (which is always). Move it into nvme_private and change its name to nvme_is_storage_default to put it into the nvme_ namespace. Fixes: https://cgit.freebsd.org/src/commit/?id=949804c81909 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> MFC after: 1 week Sponsored by: NVIDIA Networking
debug: classified in
03-filenames_plain1 by
'sys/dev/'
- Add descriptions for ConnectX-9. - Add ConnectX-9 for libmlx5 Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: Nvidia networking MFC after: 1 week
debug: Commit manually moved from "unknown" to "hardware".
Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: Nvidia networking MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
eth_proto_oper is used to derive the active media mode, but an empty mask leaves no valid bit for ilog2() to consume. Treat this as an invalid carrier update, reset the active media state, and report the unexpected PTYS value. Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> MFC after: 1 week Sponsored by: NVIDIA Networking
debug: classified in
03-filenames_plain1 by
'sys/dev/'
While the majority of virtio platforms will be fully coherent, some may require cache maintenance or other specific device memory handling (eg for secure partitioning). Using bus_dma allows for these usecases. The virtio buffers are marked as coherent; this should ensure that sync calls are no-ops in the common cases. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55492
debug: classified in
03-filenames_plain1 by
'sys/dev/'
While the majority of virtio platforms will be fully coherent, some may require cache maintenance or other specific device memory handling (eg for secure partitioning). Using bus_dma allows for these usecases. The virtio buffers are marked as coherent; this should ensure that sync calls are no-ops in the common cases. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55564
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The thunderbolt implementation is not 100% complete and causes some suspend/resume issues. Comment out the device until it is better fleshed out and some of the core issues with it are resolved. MFC after: 1 week Requested by: obiwac Differential Revision: https://reviews.freebsd.org/D57650
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
The ns8250 driver avoids clearing IER bit 0x10 to account for the split "receiver time-out interrupt enable" bit, but it never sets it in `ier_rxbits` even though a comment in `ns8250_init` implies so. Fix this by setting `IER_RXTMOUT` if we've matched an XScale uart. Differential Revision: https://reviews.freebsd.org/D57629 Reviewed by: imp MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add fw_net.h with common inline helpers used by both if_fwe and if_fwip: ISO chunk init, TX xfer allocation, xferlist free, send queue drain, and DEVICE_POLLING ioctl handling. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57615
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Change powerpc64le's long double from 64-bit double to IEEE 754 binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64. Gated on FreeBSD 16 and powerpc64le only. Differential Revision: https://reviews.freebsd.org/D57388 Reviewed by: adrian Relnotes: yes
debug: Commit manually moved from "unknown" to "hardware".
Reviewed by: emaste, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57710
debug: classified in
03-filenames_plain1 by
'sys/dev/'
VPC is enabled by default, and the only way to turn it off is through a loader hint. That being said, there is no benefit to turning it off in the first place, because VPC provides more fine-grained volume control, as well as access to the SNDCTL_DSP_[SET|GET][REC|PLAY]VOL ioctls and dsp_ioctl_channel(). Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
efi_init() might return error after initializing the mutex, in which case MOD_UNLOAD() is not processed, and the mutex is not destroyed. Similarly, efi_uninit() skips any processing if efi_runtime was left as NULL, leaving mutex not destroyed. Initialize the mutex in MOD_LOAD case, and destroy in MOD_UNLOAD, also handling errors. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57704
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Two related fixes to `aq(4)`'s RSS indirection table handling: 1. Fix an out-of-bounds stack write in `aq_hw_rss_set()`. RSS table entries are 3 bits (8 queues max), but with more than 8 RX rings `rss_table[]` holds larger values; the 32-bit write then spills one `uint16_t` past `bitary[]` and corrupts the stack, so the NIC never links or the kernel panics. Mask each value to 3 bits and pack 16 bits at a time to keep the write in bounds. 2. Build the indirection table in `aq_if_attach_post()` with a modulo over `min(rx_rings_count, HW_ATL_RSS_INDIRECTION_QUEUES_MAX)` instead of `i & (rx_rings_count - 1)`, which assumed a power-of-two ring count. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57240
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Rework the MSI-X and queue-count handling to use the standard iflib
interrupt model and to keep every ring serviced.
- Cap isc_n{tx,rx}qsets_max at the RSS indirection-table size
(HW_ATL_RSS_INDIRECTION_QUEUES_MAX, 8) instead of HW_ATL_B0_RINGS_MAX.
RSS only steers RX traffic to eight rings, so on hosts with more CPUs
the surplus TX rings never make progress: iflib flowid-steers TCP
flows across every TX ring, and a flow landing on a surplus ring has
its segments queued but never transmitted, hanging the connection.
- Add a TX-specific ifdi_tx_queue_intr_enable that reads
tx_rings[txqid]->msix. It was wired to the RX handler, which indexes
rx_rings[] with the qid; safe only while tx_rings_count ==
rx_rings_count, otherwise the lookup walks past rx_rings[] and feeds a
garbage msix value into the IRQ mask register.
- Fix three MSI-X / admin-IRQ bugs: the TX softirq was attached to
rx_rings[i]->irq (overwriting the RX handle and leaving the TX handle
uninitialized); the admin-IRQ failure path dereferenced
rx_rings[rx_rings_count], one past the end; and aq_linkstat_isr cleared
the admin interrupt by writing the raw vector number instead of
BIT(vector).
- Allocate one IFLIB_INTR_RXTX vector per RX/TX queue pair like every
other in-tree iflib driver (em/ix/igc, vmxnet3) instead of an
IFLIB_INTR_RX vector per RX ring plus a hand-wrapped IFLIB_INTR_TX
softirq per TX ring. iflib's iflib_fast_intr_rxtx() then services TX
completions on the shared vector through isc_txd_credits_update().
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57434
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Convert the driver's internal error-handling chain from the Linux negative-errno convention to FreeBSD positive errno everywhere. - All `return (-EXXX)` become `return (EXXX)`, `int err = -EXXX` loses the sign, and `if (err < 0)` checks become `if (err != 0)` across aq_fw.c, aq_fw1x.c, aq_fw2x.c and aq_hw.c. - mac_soft_reset_flb_ returns ETIMEDOUT/0 instead of a bool so it matches its RBL sibling. - The ETIME and EOK aliases in aq_common.h are removed; all sites use ETIMEDOUT and 0 directly, and the `rc = -rc` sign flips in aq_if_attach_pre are dropped. Turn AQ_HW_WAIT_FOR into a statement expression evaluating to 0 on success or ETIMEDOUT on timeout, assigned explicitly at all seven call sites, instead of silently assigning ETIMEDOUT to a variable named err in the caller scope. A statement expression rather than an inline function because every call must re-evaluate its condition each iteration -- one even assigns hw->mbox_addr as a side effect. Fix two correctness bugs surfaced by the conversion: - fw1x_get_stats gated its stats copy with `if (err >= 0)`, correct under negative errno but accepting every positive errno after the flip. Change to `if (err == 0)`. - fw2x_reset returned 0 regardless of capability-download failure, silently leaving fw_caps = 0. Return the real err. Harden aq_if_attach_pre: bit_alloc(4096, M_AQ, M_NOWAIT) was unchecked, so under OOM a later `ifconfig vlanN create` would NULL-deref the bitstring; check for NULL and fail with ENOMEM. The fail label's hardcoded `return (ENXIO)` becomes `return (rc)` so each error path reports its real errno. Remove the dead error checks in aq_hw_offload_set: the `if (err != 0) goto err_exit` blocks after the void tpo_/rpo_/tdm_ register-write helpers were unreachable (err is never set), and the real error capture is the aq_hw_err_from_flags call at the function tail. Drop the now-orphaned err_exit label. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57435
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Independent correctness fixes, plus robustness against a non-responding
device, malformed descriptor writeback, and torn MMIO reads, and the move
to the FreeBSD bus_space(9) register abstraction.
Correctness:
- aq_hw_ver_match returned true if any of major/minor/build was >=
expected; compare lexicographically so e.g. 2.0.1 is correctly seen as
older than 2.1.0.
- The VLAN hardware-filter iteration used the vlan tag directly as the
bitstring index; use vlan_tag + 1 so the active-VLAN bookkeeping lines
up with the table.
- aq_initmedia only registered IFM_AUTO in full-duplex/pause variants, so
a bare "ifconfig aq0 media autoselect" matched no entry and returned
ENXIO. Add the bare IFM_ETHER|IFM_AUTO entry, matching ix/em/igc/ixv.
- Convert the per-ring diagnostic counters to counter(9): per-CPU,
tear-free, no atomics on the increment path, fixing a data race and a
32-bit torn read against the locklessly-read sysctls. Drop three
counters that were never populated (jumbo_pkts, tx_drops, tx_queue_full).
Hardening and modernization:
- Implement aq_hw_err_from_flags (previously a stub returning 0 that left
~24 call sites as no-ops): detect a non-responding device in the
register read path (all-ones, confirmed against reg 0x10) and latch a
sticky AQ_HW_FLAG_ERR_UNPLUG -> ENXIO; aq_if_init clears it so a
transient detection cannot permanently wedge the device.
- Bound the RX fragment loop in aq_isc_rxd_pkt_get (EBADMSG once i reaches
isc_rx_nsegments) so a malformed never-EOP stream cannot write past the
fragment array.
- Bound the TX completion count in aq_isc_txd_credits_update against the
raw HW head pointer (reject head >= tx_size) so a glitched head cannot
make iflib free still-in-flight TX mbufs.
- Remove the dead hardware-RSC branch in aq_isc_rxd_available; it followed
wb.next_desp, a raw device value used as an index, but RSC is never
enabled so rsc_cnt is always 0. Advance sequentially like the other
in-tree iflib drivers; this drops the last raw-hardware-pointer
dereference in the RX path.
- Flush MMIO after interrupt-status acks (AQ_HW_FLUSH) so the write lands
before the vector is re-armed under auto-mask-clear; retry the high word
in read64_ against a torn lo/hi pair; document the non-atomic IMR
read-modify-write in itr_irq_map_en_{rx,tx}_set.
- Replace the raw-pointer MMIO (the Linux readl/writel idiom) with
bus_space(9): store the BAR tag and handle in struct aq_hw and route
AQ_READ_REG/AQ_WRITE_REG through bus_space_read_4/write_4. No functional
change on amd64.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57436
debug: classified in
03-filenames_plain1 by
'sys/dev/'
aq(4): enable jumbo frames, software LRO, and suspend/resume - Configure the RX buffer size from the interface MTU and enable jumbo frames up to 9000 bytes, replacing the fixed standard-frame setup. - Advertise IFCAP_LRO so iflib coalesces received TCP segments with its software tcp_lro(9), like every other in-tree iflib driver (ix/igc/em/vmxnet3); aq does no hardware LRO. iflib builds the per-RX-queue LRO context unconditionally, so the capability bit is all that is required; enabled by default via isc_capenable, toggle at runtime with ifconfig. - Add suspend/shutdown/resume handlers, replacing the unimplemented- function placeholders. aq_if_shutdown/aq_if_suspend stop the interface and deinitialize the hardware; aq_if_resume re-resets the F/W, re-reads the mailbox address and re-selects fw_ops via aq_hw_mpi_create() before iflib re-inits, because the runtime init path (aq_hw_init) reuses the cached mailbox/fw_ops and a D3 power cycle can clear them. iflib calls IFDI_RESUME unconditionally, so this also covers resuming while the interface was administratively down. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57437
debug: classified in
03-filenames_plain1 by
'sys/dev/'
aq(4): modernize and de-Linuxify the vendor driver Dead-code removal, device_printf(9) logging, style(9) de-Linuxification, const F/W-ops tables, and readability cleanups. No change for valid traffic. Dead code and logging: - Remove the sub-gigabit TSO-masking block in the link-state ISR: it cleared IFCAP_TSO from the static isc_capabilities record (read only at attach / SIOCSIFCAP, never on the datapath), so it never gated TSO and only corrupted the validation mask. The Atlantic has no sub-gigabit TSO erratum. - Tidy the RX buffer-size handling: drop the dead switch(MCLBYTES) in aq_if_rx_queues_alloc, rename rx_max_frame_size -> rx_buf_size, and bound the per-fragment length from the wb.pkt_len writeback (EBADMSG on underflow or a final fragment longer than the RX buffer). - Drop every __FreeBSD__/__FreeBSD_version branch (FreeBSD 14.0 baseline); the pre-13 arms used pre-opaque-if_t APIs since removed and one never built. - Route all log messages through device_printf(9) (MAC via %6D), adding a device_t to struct aq_hw; drop the dead AQ_XXX_UNIMPLEMENTED_FUNCTION and aq_log_error macros and the per-ring init console spam. - Minor: comma -> semicolon in aq_if_attach_pre; (uint64_t) -> (uint32_t) TX high-word cast; MODULE_VERSION(atlantic, 1); remove unused/duplicate #includes. style(9) and types: - Remove all typedef'd struct/enum/union types (aq_dev_t, the speed/fc/ debug enums, the volatile RX/TX descriptor types, the firmware-file types) in favor of bare tags; for the DMA descriptors the volatile qualifier moves to the pointer/use sites. Drop the _s/_e tag suffixes and the "#define aq_hw_s aq_hw" alias. Rename the OOP-style *self parameter to hw. Replace usec_delay/msec_delay/ARRAY_SIZE/LOWORD with FreeBSD equivalents (BIT kept). __attribute__((__packed__)) -> __packed. F/W-ops vtable: - Rename the leftover hal parameter to hw; make aq_fw1x_ops/aq_fw2x_ops const (read-only data); drop the always-true "fw_ops &&" and always-present dispatch guards (only led_control, absent in F/W 1.x, keeps its NULL check). Readability: - aq_isc_rxd_pkt_get: fold the four identical RX-error blocks into one rx_err: label. aq_isc_rxd_available: hoist the shared descriptor advance out of the EOP test and drop the redundant continue. aq_hw_offload_set: drop the dead "int err = 0". Fix a stale "10 ms" comment on a 50 ms DELAY and the redundant literal parentheses. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57438
debug: classified in
03-filenames_plain1 by
'sys/dev/'
aq(4): take F/W statistics off the iflib core lock (kick-and-read) The once-per-second statistics refresh ran the whole F/W-mailbox transaction under iflib's CTX (sx) lock: fw2x_get_stats toggled the MPI STATISTICS control bit and busy-polled the state register for the acknowledgement (up to ~25 ms) before downloading the counters, so a slow F/W response blocked datapath reconfigure / ioctls for the duration. The per-cast and error counters have no direct-register source -- the reference Linux atlantic driver and our port both read them out of the F/W mailbox, and the MSM registers the chip exposes are never used for the periodic counters. So rather than poll, adopt the kick-and-read shape the iflib peer with the same constraint uses (vmxnet3): consume the snapshot the F/W produced for the *previous* request, then toggle the bit to request the next one -- no wait. The F/W finished that previous refresh ~1 s ago, so the download needs no poll, and the toggle write stays serialized against set_mode by the CTX lock exactly as before. This removes the 25 ms poll (and the toggle_mpi_ctrl_and_wait_ helper) from under the lock; only the fast 16-dword download remains. Cost: the counters lag one 1 s cycle, invisible for monitoring, and a torn read is already rejected by aq_update_hw_stats' monotonic-delta check. Validated on AQC107: a fixed 500 MiB RX transfer advances good_octets_rcvd by 549.6 MB -- 500 MiB plus the ~4.8% Ethernet framing overhead -- with rx_err=0 and traffic at line rate. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57439
debug: classified in
03-filenames_plain1 by
'sys/dev/'
aq(4): add a runtime dev.aq.N.debug trace control The trace_* family (trace/trace_error/trace_warn/trace_detail, used in the F/W and init/config paths) was gated behind the compile-time AQ_CFG_DEBUG_LVL, which is 0, so the dbg_level_/dbg_categories_ runtime variables were dead and tracing could only be enabled by recompiling. Decouple trace_base_ from AQ_CFG_DEBUG_LVL so it is always compiled and gated purely at runtime on dbg_level_/dbg_categories_, make those two variables writable (no longer const, default level 0 = off), and expose them as dev.aq.N.debug (verbosity) and dev.aq.N.debug_categories (subsystem mask) sysctls. The datapath-heavy AQ_DBG_ENTER/PRINT/DUMP macros and the trace_aq_*_descr descriptor dumps stay behind AQ_CFG_DEBUG_LVL (still 0), so the per-packet paths are untouched -- trace_* is only used off the datapath. The two variables are global (the trace macros reference them directly), so the per-device sysctls share one backing store, which is fine for a debug knob. Validated on AQC107: dev.aq.0.debug defaults to 0 with no trace output; setting it to 6 emits the F/W init/reset/capabilities traces on the next F/W operation; setting it back to 0 silences them; traffic unaffected at line rate, rx_err=0. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57440
debug: classified in
03-filenames_plain1 by
'sys/dev/'
aq(4): naming and exposure Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57656
debug: classified in
03-filenames_plain1 by
'sys/dev/'
On controllers with the LPSS "additional registers" (Skylake and later, IG4_HAS_ADDREGS), ig4iic_suspend() places the controller in the device idle state (IG4_DEVICE_IDLE) and asserts core reset. While idle the DesignWare core is power-gated: its register bank reads back as zero and writes are dropped until the core is taken out of the idle state again. ig4iic_set_config(), called from ig4iic_resume(), only performs that un-idle handshake when it observes IG4_RESTORE_REQUIRED set in DEVIDLE_CTRL. Some platforms (e.g. Intel Alder Lake-P) do not raise that status across suspend-to-idle (S0ix). The core is then left gated: set_config()'s register writes have no effect, it nevertheless returns success, and every subsequent transfer fails with IIC_ETIMEOUT, leaving child I2C-HID devices (touchpad, touchscreen) dead after resume. Give ig4iic_set_config() a force_restore argument and pass it from ig4iic_resume() so the un-idle handshake runs unconditionally for IG4_HAS_ADDREGS controllers, regardless of the RESTORE_REQUIRED status. This keeps the handshake and its reset/restore sequence in one place instead of duplicating it in the resume path. The DesignWare core's register bank stays inaccessible (reads back as zero) until it leaves reset, which happens when ig4iic_set_config() deasserts the core reset. Rather than waiting a fixed, guessed interval, poll the fixed component-type signature (IG4_REG_COMP_TYPE == IG4_COMP_TYPE) immediately after that deassert and continue as soon as the core is ready. On Alder Lake-P the core is ready with no measurable delay; the bounded poll keeps this correct on slower parts, and warns if the core never leaves reset. While integrating these I2C-HID touch devices, also raise hid(4)'s MAXLOCCNT from 2048 to 4096: the report-descriptor parser truncates any variable main item whose usage count exceeds MAXLOCCNT, silently dropping the trailing report fields. Some contemporary touch devices declare variable items with more than 2048 entries, so part of their input reports was being discarded. Reviewed by: adrian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57673
debug: classified in
03-filenames_plain1 by
'sys/dev/'
There is no WRFSBASE and WRGSBASE 32bit variants at all. As such, the fsbase and gsbase must always be equal to the bases in the corresponding segment descriptor, same as on real i386. If a 32bit program reloads either %fs or %gs using setcontext(9) or sigreturn(9), restoring bases from the syscall entry time is wrong. In all other cases, hardware already does the right action when the segment register is loaded, and the bases for the ufssel/ugssel in GDT are updated on the context switch. Reviewed by: markj (previous version) Tested by: terehovv@mail.ru Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57611
debug: classified in
03-filenames_plain1 by
'sys/amd64/'
Alter pmap_copy_page(s) to use memcpy rather than the deprecated bcopy. We'll be adding non-provenance preserving versions for CHERI support and would like to avoid introducing variants of deprecated APIs just to maintain symmetry. Reviewed by: kib Suggested by: emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57687
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/arm/', 'sys/arm64/', 'sys/riscv/']'
Some Book-E cores (at least e6500) can have much larger PID fields, up to 14 bits. Extend the PID mask space to the full space, and future changes may take advantage of this extended space.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
e6500 core supports 14-bit TIDs (16384), while all earlier cores support only 8 bit TIDs. Dynamically allocate the tidbusy array at bootstrap time so that it stays in the TLB1, but is sized appropriately for the core. With MAXCPU of 32, a e6500 tidbusy would be (8 * 32 * 16384), or 4MB for this array, while e5500 would use (8 * 32 * 256), or 64kB.
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
Watchdog interrupt is a "critical" interrupt, so save the correct registers (CSSRn, into critical save area).
debug: classified in
03-filenames_plain1 by
'sys/powerpc/'
fw_busreset() allocates newrom with M_NOWAIT from interrupt context. If the allocation fails, crom_load() dereferences a NULL pointer. Skip the config ROM comparison on allocation failure so the next bus reset will retry. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57728
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Fixes: https://cgit.freebsd.org/src/commit/?id=16f21c5af350 ("amd64: there is no reason to copy ucode around in ucode_load_bsp()") PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295926 Submitted by: Martin Birgmeier <d8zNeCFG@aon.at> MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Pending the OS-supported hibernate functionality, prevent requesting S4 when S4BIOS is not supported. To this end, make sure that acpi_supported_stypes[] indicates that POWER_STYPE_FW_HIBERNATE is not supported if 'acpi_s4bios_supported' is false, even if S4 is supported by the platform (which is only a power-down-like state, without any support to save the system image by itself). This will cause requests to enter S4, which are translated to POWER_STYPE_FW_HIBERNATE before reaching acpi_ReqSleepState()/acpi_EnterSleepState(), to fail in this case. Retire the 'hw.acpi.s4bios' sysctl knob, as having it to 0 by default (S4BIOS not supported) or setting it to 0 (default is 1 when S4BIOS is supported) could only lead, on a S4 request, to a power down without any possibility to restore the system (and, since a recent commit, it has not been possible anymore to force it to 1 when S4BIOS is not announced supported in the FACS table, which would cause a failure or a crash). When OS-supported hibernate is introduced, it will become the default hibernate method over S4BIOS, as we have not heard of any semi-recent hardware platform implementing it (and when it is, it usually needs a sufficiently large dedicated slice/partition, and does not use FreeBSD swap slices/partitions). Then, for people still wanting to use S4BIOS on older platforms that support it, the tentative plans are to modify acpiconf(8) to accept '4BIOS' as an argument to '-s', or modify zzz(8) so that one can pass a specific suspension method. Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57414
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/dev/', 'sys/i386/']'
Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The AMD SMU is supposed to be notified of suspension the SPMC has been, and conversely on resume, as expressed in comments. Fix the EVENTHANDLER(9) priorities used so that they match the comments. Lower values indeed indicate higher priority in this subsystem. Reviewed by: obiwac Fixes: https://cgit.freebsd.org/src/commit/?id=2c60fce365f4 ("amdsmu: Sleep entry/exit hints for PMFW") Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Make the ACPI interface's functions evaluate_object() and get_property() take a constant pathname (by substituting ACPI_STRING with 'const char *'). This allows to remove some __DECONST(). No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Suffix acpi_sleep_enable() with '_locked' For clarification. This function assumes that the acpi mutex is held, contrary to acpi_sleep_disable(). No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Button sleep/wake callbacks: Expose true argument types
This makes the interface composed of the
acpi_event_{power,sleep}_button_{sleep,wake}() functions more accurate
and clears the risk of calling them with a wrong object (such as a wrong
softc).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Sleep event handler: Remove a wrong comment No functional change. Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Sleep/wake event handlers: Expose first argument's true type This is for clarification and to slightly simplify code. At present, the EVENTHANDLER(9) subsystem does not check that the first argument to the event handler, registered via EVENTHANDLER_REGISTER(), is of the right type with respect to the type declaration passed to EVENTHANDLER_DECLARE(), so in that infrastructure no additional safety is gained by this change. No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Export handler invoke helpers, use them in acpi_lid Removes duplicated code. No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi: Set 'acpi_sstate' closer to setting 'acpi_stype' Makes on-going modifications for hibernate easier. No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
03-filenames_plain1 by
'sys/dev/'
* Reorder MINIMAL so everything is in the same order as in GENERIC. * Wherever comments diverged, except for the explanatory comment at the top, copy the GENERIC version to MINIMAL. * Add KDTRACE_FRAME to i386 GENERIC; it was already in MINIMAL, and adding it to GENERIC seemed like the more correct move. With these changes, MINIMAL is a strict subset of GENERIC, apart from the identifier and the explanatory comment at the top. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57729
debug: classified in
03-filenames_plain1 by '['sys/amd64/',
'sys/i386/']'
Some firmwares use the PMCs to monitor OS performance. We can't be certain that the BIOS would detect any change to the counters if we reprogram them. In cases where the firmware is using the PMCs to control power management this could have dangerous side effects or unexpected performance effects. During initialization, detect if any of the counters are enabled and fail if so. Reported by: Sandipan Das Reviewed by: mhorne MFC after: 1 week Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2277
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Small change to add additional IBS register definitions for the new pmc tools. Most of the definitions are for Zen 4 and above where we get detailed information regarding the source of a completed memory operation. Reviewed by: mhorne Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2292
debug: classified in
03-filenames_plain1 by
'sys/dev/'
We need to report the actual link speed, rather than a hard-coded 100Gbs for a variety of reasons, but most importantly, as reporting 100Gbs on a 10g link breaks lacp when this NIC is in an LACP bundle with other vendors' NICs after e98ed8d99fd4 (lacp: Simplify lacp_compose_key()), as the fake 100g puts this nic into a different aggregation group. Sponsored by: Netflix Reviewed by: glebius Tested by: glebius
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Fixes: https://cgit.freebsd.org/src/commit/?id=c84261da6f6c ("arm64: Add an initial GICv5 driver")
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
RVV is a scalable SIMD (Single Instruction, Multiple Data) extension designed to accelerate data-intensive workload such as AI, machine-learning and DSP. RVV exposes vector-length agnostic (VLA) execution and programming model, with implementation defined vector register file size, dynamic vector length selection, flexible register grouping, and rich instruction semantics, serving as the foundation for portable, high-throughput data-parallel acceleration. Spec: https://github.com/riscvarchive/riscv-v-spec RVV extends a base scalar RISC-V ISA with 32 vector registers and seven unprivileged control-status registers (CSRs) to control the engine. Each vector register could be up to 2^16 bits in length, depending on implementation. - Detect the extension during boot time ("v" letter in the ISA string) - Implement RVV management code in the machine-dependent interfaces that handle CPU and thread state - Add memory-management code for vector state save area. The allocation for save area in thread's PCBs has to be dynamic as the length of registers varies across implementations - Save and restore RVV state on context-switch, fork(), scheduler entry - Enable the extension usage on the first instruction trap from userspace ("lazy" enable) - Implement ucontext.h POSIX API Differential Revision: https://reviews.freebsd.org/D56414
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
debug: classified in
03-filenames_plain1 by
'sys/riscv/'
This flag is neither set anywhere, nor is there a way to set it from userland, so it is effectively useless, and currently the effect is that EQ can only be enabled for primary playback channels. Retire the flag and keep this behavior, and think later whether we want to allow virtual channels to get their own EQ feeder as well. Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
acpi_ibm: Report mic mute key evdev events While here, make the naming of micmute_led more consistent. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=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
debug: classified in
03-filenames_plain1 by
'sys/dev/'
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: https://cgit.freebsd.org/src/commit/?id=7e7f8b2c6641 ("acpi_ibm: Report mic mute key evdev events") Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
hwpstate_intel: Use ipi instead of thread_lock + sched_bind Reviewed by: olce Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55628
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Fix recent copyright formatting Add an "empty" (comment) line between copyright and the Foundation text. Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Fix error tests How I failed to notice this during the review will remain a mistery. Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") Event: Halifax Hackathon 202606 Location: jrm@'s bathroom Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl It can cause a "cannot read MSR" error to be reported although reading actually worked. Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Fix two MSR errors being conflated HWP_ERROR_CPPC_REQUEST_WRITE and HWP_ERROR_CPPC_REQUEST_PKG had been assigned the same number. Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Debug sysctl: Fix retrieving the pkg-level MSR IA32_HWP_REQUEST_PACKAGE_CONTROL is never set in 'sc->req'. Just discriminate on 'hwp_pkg_ctrl', which indicates the hardware capability as indicated by CPUID. Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Debug sysctl: Style Introduce 'error', set it to the result of rdmsr_safe() and use 'error' as the test expression. No functional change (intended). Fixes: https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[sS]tyle'
debug: moved to hardware
because 'Need to be grouped with
29b8220b179bf0ce93c0034ec5d9f46db9092353'
No functional change intended. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
hwpstate_intel: Use 8bit scale instead of percentage scale Reviewed by: olce Relnotes: yes Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55629
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): sysctl_epp_select(): Cache again new EPP value This caching was removed inadvertently in the commit mentioned below. Fixes: https://cgit.freebsd.org/src/commit/?id=8452afeb5682 ("hwpstate_intel: Use 8bit scale instead of percentage scale") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
hwpstate_intel(4): Comment the EPB to EPP computation Explain why the '* 17' instead of '* 16', as suggested in revision D55629. Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
For consistency. No functional change (intended). Fixes: https://cgit.freebsd.org/src/commit/?id=c6a0eb7ada62 ("hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Replace repeated per-sensor-type blocks for voltage, current, power, and ambient light sensors with table-driven loops. Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D57595
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add fw_helpers.h with common static inline helpers for FireWire ISO receive drivers: async xfer wait with timeout and tlabel cleanup, quadlet read/write, and ISO mbuf management. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57684
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Add fwcam(4), a driver for IIDC v1.30 (TA Document 1999023) digital cameras over IEEE 1394. Supports Format_0 (VGA) video modes with isochronous receive DMA, feature control (brightness, exposure, gain, shutter, white balance, focus, etc.), poll/kqueue, and hot-plug via bus reset handling. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57685
debug: Commit manually moved from "unknown" to "hardware".
It is not used anywhere. Disabling acpi_cpu(4) can be done through the regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable, see acpi_disabled()). Reviewed by: emaste, obiwac Fixes: https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code") MFC after: 3 days Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57888
debug: classified in
03-filenames_plain1 by '['sys/dev/',
'sys/x86/']'
Same reason as for the previous commit to acpi_cpu(4). This boolean is not used anywhere. Disabling acpi_hpet(4) can be done through the regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable, see acpi_disabled()). Reviewed by: emaste (implicit) Fixes: https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code") MFC after: 3 days Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by '['sys/dev/',
'sys/x86/']'
Same reason as for the previous commit to acpi_cpu(4). This boolean is not used anywhere. Disabling acpi_timer(4) can be done through the regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable, see acpi_disabled()). Reviewed by: emaste (implicit) Fixes: https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code") MFC after: 3 days Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by '['sys/dev/',
'sys/x86/']'
Reviewed by: aokblast Event: Halifax Hackathon 202606 Location: Chair Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57886
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Per TIS 1.3 section 5.6.12, write commandReady to TPM_STS after reading the response so the TPM can free its ReadFIFO and other internal resources. The subsequent tpmtis_go_ready() provides the second write the spec describes and waits for the state transition. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295103 Reported by: Benoit Sansoni <benoit.sansoni@gmail.com> Reviewed by: kevans Approved by: kevans Differential Revision: https://reviews.freebsd.org/D57841
debug: classified in
03-filenames_plain1 by
'sys/dev/'
New names are better descriptions and match what is done in hwpstate_amd(4). No functional change (intended). MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/x86/'
Previously only the play pointer advanced each tick; the record channel refilled the whole buffer with silence and left the DMA pointer at 0. Advance the record pointer by one block per tick and fill that block with silence, so the DMA pointer changes and mmap kqueue consumers can track progress. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D57834
debug: classified in
03-filenames_plain1 by
'sys/dev/'
It's redundant. Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/dev/'
The bus_* functions already handle converting from PCI endianness
(i.e. little-endian) to native endianness when accessing the config
space (see ofw_pcib_bus_get_bus_tag), so converting again with
virtio_htogX/virtio_gtohX undoes any byte-swapping and breaks
big-endian systems. They should only be used for operating on shared
memory.
Note part of this reverts commit fb53b42e36a9 ("virtio-modern: fix PCI
common read/write functions on big endian targets").
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294706
Reviewed by: adrian, tuexen
Fixes: https://cgit.freebsd.org/src/commit/?id=fb53b42e36a9 ("virtio-modern: fix PCI common read/write functions on big endian targets")
Fixes: https://cgit.freebsd.org/src/commit/?id=9da9560c4dd3 ("virtio: Add VirtIO PCI modern (V1) support")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57392
debug: classified in
03-filenames_plain1 by
'sys/dev/'
This subclass declares its own softc structure adding necessary members after the embedded ehci_softc_t. The full size of the struct must be included in the driver declaration, otherwise the allocation backing the softc is not guaranteed to be large enough. Reported by: KASAN Reviewed by: jrtc27, manu Fixes: https://cgit.freebsd.org/src/commit/?id=7a58744fd0f1 ("Split out the attachment from the generic-ehci driver") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57951
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Prometheus doesn't allow spaces, let's normalize this to what we use elsewhere for consistency. The sysctl exporter could probably do this itself, but let's decouple that from the immediate problem: matching the label between the exported data and in-tree is nice for greppability. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296179 Reviewed by: asomers, wulf Differential Revision: https://reviews.freebsd.org/D57966
debug: classified in
03-filenames_plain1 by
'sys/dev/'
Network-related commands, library, and kernel.
ip6_mroute: Fix the type name in sysctl_mfctable() No functional change since apparently it's fine to compute the size of a pointer type when the base type is undefined. Fixes: https://cgit.freebsd.org/src/commit/?id=0bb9c2b665d9 ("ip6_mroute: FIBify")
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
The result of IN6_ARE_MASKED_ADDR_EQUAL() macro is not an integer, so threat it as a boolean value. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294114 Reported by: Peter Much <pmc citylink dinoex sub org> MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Delayed proxy addresses need special handling, since they can use link-local ifa as their source address and have different link-layer data in their response. Fixes: https://cgit.freebsd.org/src/commit/?id=f37fbe30f559 Reviewed by: glebius, markj Differential Revision: https://reviews.freebsd.org/D55850
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
This TF_-flag is only used in the RACK stack and not really needed. So replace it, since glebius@ needs a TF_ flag and right now all of them are taken. No functional change intended. Reviewed by: rrs, glebius, rscheff, Nick Banks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56025
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Fix nooptions VIMAGE build The recent FIBify commits deref struct thread without including sys/proc.h, which can result in a compiler error. This becomes apparent when building with LINT-NOVIMAGE, as net/vnet.h includes sys/proc.h. Fix this by directly including sys/proc.h Fixes: https://cgit.freebsd.org/src/commit/?id=4c486fe40267 ("ip_mroute: FIBify"), https://cgit.freebsd.org/src/commit/?id=0bb9c2b665d9 ("ip6_mroute: FIBify")
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
To be more robust since the checking is now performed where the interface is referenced. While here, remove a redundant check from if_vmove_loan(). Reviewed by: kp, glebius, pouria MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55875
debug: classified in
03-filenames_plain1 by
'sys/net/'
Recurring banners except the first are printed just after the latest interval's statistics line, giving the false impression that the latter are omitted. It is also better to print a new banner only if it is going to be followed by a new line of statistics, in case netstat(1) is interrupted or we have reached the number of iterations specified by '-q'. Fix this by pushing printing these banners inside the loop producing statistics lines, after having waited for the next interval. The first banner is printed before the loop, as we want it to be printed immediately at launch, even if at this point we do not have statistics to display (we have to wait for an interval to compute these, as they are based on a difference). While here, remove the 'goto' spaghetti by putting banner printing into its own private function and using a proper infinite loop in sidewaysintpr(). While here, document the why of the 21 statistics line span between two banners. While here, check for the number of output lines of statistics once such a line has effectively been printed. This allows to remove the internal incrementation performed when reading '-w''s argument, which was a hack to compensate the misplaced check. While here, in the manual page, simplify the description of the '-w' mode and mention that passing 0 to '-q' means "no count limit". Reviewed by: glebius Fixes: https://cgit.freebsd.org/src/commit/?id=84c1edcbad7d ("Rewrite netstat/if.c to use ...") Fixes: https://cgit.freebsd.org/src/commit/?id=bf10ffe1d3a9 ("Add a new option, -q howmany, ...") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56227
debug: classified in
03-filenames_plain1 by
'usr.bin/netstat/'
This change adds the ability to examine the contents of multicast routing tables for other FIBs without the need for executing `netstat` with `setfib(1)`. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D56205 Reviewed by: glebius, markj, zlei
debug: classified in
03-filenames_plain1 by
'usr.bin/netstat/'
Commit a223d6c489c7 made most of the ip6_mroute state per-VNET, but failed to do this for a couple of counter structures. Make them per-VNET too. Reported by: zlei Reviewed by: pouria, zlei Fixes: https://cgit.freebsd.org/src/commit/?id=a223d6c489c7 ("ip6_mroute: Start putting global variables into a structure") Differential Revision: https://reviews.freebsd.org/D56253
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925. Remove the EXPERIMENTAL compile option from the kernel and remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland. This compile option was not enabled by default. Also regenerate src.conf.5. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D56228
debug: Commit manually moved from "unknown" to "network".
While here remove ipi_lbgrouphashmask, as it is always has the same value as ipi_porthashmask. Differential Revision: https://reviews.freebsd.org/D56174
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
While here, slightly restyle ip_vnet_init() and use sparse initializer for pfil_head_args. There is no functional change wrt to pfil(9) hook registration. Differential Revision: https://reviews.freebsd.org/D56175
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Functional change is that on destruction INVARIANTS checks will run. Also the mask is no longer hardcoded, so makes it easier to make hash size a tunable. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D56176
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netinet/', 'sys/netinet6/']'
Reviewed by: tuexen, rrs Differential Revision: https://reviews.freebsd.org/D56177
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D56113
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netpfil/']'
inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets The protocols marked with PR_CONNREQUIRED can never go through pr_connect after being disconnected. This is a tiny improvement of fdb987bebddf0. While here push clearing of the addresses under the same condition. Although this clearing originates from pre-FreeBSD times, it actually makes sense only for protocols that can reconnect. Reviewed by: pouria, markj Differential Revision: https://reviews.freebsd.org/D55661
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
inpcb: retire the inpcbinfo list lock With the SMR locking of inpcbs the use of this lock reduced down to the global list and generation number. It was used only on an inpcb creation and destruction. Use the inpcbinfo hash lock for this purpose. Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55966
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
inpcb: retire the inpcb global list The iteration over all pcbs is possible without the global list. The newborn inpcbs are put on a global list of unconnected inpcbs, then after connect(2) or bind(2) they move to respective hash slot list. This adds a bit of complexity to inp_next(), but the storage scheme is actually simplified. One potential problem before this change was that a couple of pcbs fall into the same hash slot and are linked A->B there, but they also sit next to each other in the global list, linked as B->A. This can deadlock of course. The problem was never observed in the wild, but I was able to instrument it with lots of effort: just few pcbs in the system, hash size reduced down to 2 and a lot of repetitive calls into two kinds of iterators. However the main motivation is not the above problem, but make a step towards splitting the big hash lock into per-slot locks. Differential Revision: https://reviews.freebsd.org/D55967
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
inpcb: make in_pcbdisconnect() acquire the hash lock internally Should be no functional change. Reviewed by: pouria, markj Differential Revision: https://reviews.freebsd.org/D55968
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
The INP_DROPPED is going to become an internal flag for inpcb. As of now it means a TCP pcb that is in TCPS_CLOSED. There is nothing wrong with calling setsockopt(2) on such socket, although has no practical use. This deletes a piece of code from 56713d16a06c5 / D16201. There is no description of the panic fixed, but I will speculate that the panic was about in6p->in6p_outputopts being NULL as the inpcb already went through in_pcbfree_deferred(). This also can be related to compressed TIME-WAIT, that is also gone now. With current locking this shouldn't be possible. An inpcb goes through in_pcbfree() only with pr_detach method, which is called from sofree(), and the latter is called on losing the very last socket reference. So, at the point when in_pcbfree() is called, the socket has lost its file descriptor reference and there can not be any running setsockopt() on it. Leave the call to ip6_pcbopt() still embraced with INP_WLOCK(), since we are modifying inpcb contents. NB: the IPv6 setsockopt(2) definitely has room for improvement. Several memory allocations should be moved out of lock and made M_WAITOK. Covering large piece of setsockopt(2) code with epoch(9) just because ip6_setpktopts() calls ifnet_byindex() isn't correct either. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56169
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
inpcb: make in_pcbbind() acquire the hash lock internally Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55970
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
inpcb: make in_pcbconnect() acquire the hash lock internally Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55971
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
inpcb: make in6_pcbsetport() acquire the hash lock internally Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55972
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
Reviewed by: pouria, rrs, markj Differential Revision: https://reviews.freebsd.org/D55973
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
No functional change.
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
The SOCK_RAW socket is a multiple receiver socket by its definition. An incoming packet may be copied to multiple sockets. Thus, incoming packet handling is expensive. Systems with many thousands of raw sockets usually have them connect(2)-ed to different destinations. This allows for some improvement of the input handling, which was introduced by 9ed324c9a588 back in 2008. This optimization was made specifically for L2TP/PPTP VPN concentrators based on ports/net/mpd5. This change generalizes the idea of 9ed324c9a588, so that it potentially can be used with IPv6 raw sockets. This also eliminates last use of the pcbinfo hash lock outside of in_pcb.c. While here make a speculative design decision: put into the hash table sockets that did only connect(2). Previously, we were indexing only sockets that were protocol bound, did bind(2) and did connect(2). My speculation is that only the remote IP provides some real entropy into the hash and local address and proto are expected to be the same for majority of the sockets. My other speculation is that VPN concentrators other than mpd5 may not bind(2) their sockets, thus not getting any use of the hash. Differential Revision: https://reviews.freebsd.org/D56172
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
vnet_if_return() will be invocked by vnet_sysuninit() on vnet destructing, while the lock ifnet_detach_sxlock has been acquired in vnet_destroy() already. With this change the order of locking is more clear. There should be no functional change. Reviewed by: pouria Fixes: https://cgit.freebsd.org/src/commit/?id=868bf82153e8 if: avoid interface destroy race MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56288
debug: classified in
03-filenames_plain1 by
'sys/net/'
SIOCSIFVNET is not a hardware ioctl. Move it to where it belongs. Where here, rewrite the logic of checking whether we are moving the interface from and to the same vnet or not, since it is obviously not stable to access the interface's vnet, given the current thread may race with other threads those running if_vmove(). MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55880
debug: classified in
03-filenames_plain1 by
'sys/net/'
The change e133271fc1b5e introduced ifnet_detach_sxlock, and change 6d2a10d96fb5 widened its coverage, but there are still consumers, net80211 and tuntap e.g., want it. Instead of sprinkling it everywhere, make it opaque to consumers. Out of tree drivers shall also benefit from this change. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56298
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netlink/']'
ifconfig: Add support for geneve (netlink) This implementation is netlink only Differential Revision: https://reviews.freebsd.org/D55184
debug: Commit manually moved from "unknown" to "network".
ifconfig: Fix printf on geneve for 32-bit architectures Replace uint64_t type with uintmax_t in printf to fix warnings on 32-bit architectures. Reported by: Jenkins Fixes: https://cgit.freebsd.org/src/commit/?id=688e289ee904 ("ifconfig: Add support for geneve") Differential Revision: https://reviews.freebsd.org/D55184
debug: classified in
03-filenames_plain1 by 'sbin/'
ifconfig: Do not build geneve with WITHOUT_NETLINK_SUPPORT geneve(4) is netlink-only, therefore, don't build it with WITHOUT_NETLINK_SUPPORT=1 set. Reported by: kp Fixes: https://cgit.freebsd.org/src/commit/?id=688e289ee904 ("ifconfig: Add support for geneve (netlink)") Differential Revision: https://reviews.freebsd.org/D55184
debug: classified in
02-filenames_wildcards by
'.*Makefile'
debug: moved to network because
'Need to be grouped with
688e289ee904fe625d92f93680a71753d03ba2ee'
Observed below kernel panic calltrace while performing sysctl -a operation while unloading the if_bnxt driver, Fatal trap 9: general protection fault while in kernel mode KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe02a7569940 vpanic() at vpanic+0x136/frame 0xfffffe02a7569a70 panic() at panic+0x43/frame 0xfffffe02a7569ad0 trap_fatal() at trap_fatal+0x68/frame 0xfffffe02a7569af0 calltrap() at calltrap+0x8/frame 0xfffffe02a7569af0 trap 0x9, rip = 0xffffffff80c0b411, rsp = 0xfffffe02a7569bc0, rbp = 0xfffffe02a7569be0 --- sysctl_handle_counter_u64() at sysctl_handle_counter_u64+0x61/frame 0xfffffe02a7569be0 sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame 0xfffffe02a7569c30 sysctl_root() at sysctl_root+0x22f/frame 0xfffffe02a7569cb0 userland_sysctl() at userland_sysctl+0x196/frame 0xfffffe02a7569d50 sys___sysctl() at sys___sysctl+0x65/frame 0xfffffe02a7569e00 amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe02a7569f30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe02a7569f30 Root Cause: iflib adds per-device sysctl nodes under the device tree using the device sysctl context. Some of those nodes are counter sysctl that point at fields inside txq→ift_br. When the if_bnxt driver is unloaded, iflib_device_deregister runs and calls iflib_tx_structures_free, which frees the txqs ift_br. The device sysctl tree is only freed when the device is destroyed. If sysctl -a runs during unload, it can still traverse the device tree and call sysctl_handle_counter_u64 for those nodes. The handler does counter_u64_fetch(*(counter_u64_t *)arg1). By then arg1 can point into freed memory and leads to use after free type kernel panic. Fix: flib now uses its own sysctl context for all iflib-related nodes instead of using device’s context. And iflib sysctl context is now removed before any queue/ring memory is freed. MFC after: 2 weeks Reviewed by: gallatin, ssaxena, #iflib Differential Revision: https://reviews.freebsd.org/D55981
debug: classified in
03-filenames_plain1 by
'sys/net/'
When IFDI_ATTACH_POST() fails (or netmap attach fails), iflib tears down with ether_ifdetach(), taskqueue_free(ifc_tq), and IFDI_DETACH(). CTX_LOCK is still held after ether_ifattach. ether_ifdetach() and taskqueue_drain(admin) must not run under CTX_LOCK. Teardown ordering (match iflib_device_deregister): - Free the per-interface admin taskqueue after IFDI_DETACH / IFDI_QUEUES_FREE, not before. - Drop IFNET_WLOCK() across IFDI_DETACH / IFDI_QUEUES_FREE so driver detach can sleep in LinuxKPI workqueue drain, then retake IFNET_WLOCK() before iflib_free_intr_mem and fail_unlock. MFC after: 2 weeks Reviewed by: gallatin, kgalazka, #iflib Differential Revision: https://reviews.freebsd.org/D56316
debug: classified in
03-filenames_plain1 by
'sys/net/'
FIB_NH_LOG calls the `nhop_get_upper_family(nh)` to read `nh->nh_priv->nh_upper_family` for failure logging. Call FIB_NH_LOG before freeing nh so failures are logged without causing a panic. MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/net/'
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
tcp_close: Use in6_pcbdisconnect for INET6 sockets This also fixes the LINT-NOINET builds. Fixes: https://cgit.freebsd.org/src/commit/?id=40dbb06fa73c ("inpcb: retire INP_DROPPED and in_pcbdrop()")
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
inpcb: make in6_pcbdisconnect() just like in_pcbdisconnect() Allow to be passed with already unconnected inpcb. Fixes: https://cgit.freebsd.org/src/commit/?id=4fadf2466468dd6dcb6cf9e3739ed696a18c1bb4
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
Only use hashes for protocols that are enabled in the kernel configuration. Fixes: https://cgit.freebsd.org/src/commit/?id=ece716c5d347 ("raw ip: move hash table manipulation to inpcb layer")
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
debug: classified in
03-filenames_plain1 by
'sys/net/'
Add support for CMIS based optics, typically used by 400GbE and faster ethernet optics. The CMIS standard requires paged support for i2c ioctls. This has been tested on an Nvidia ConnectX-7 and Broadcom Thor2 400GbE NIC, and I have verified that optics vendor information, light levels, and temperatures match the information provided by various vendor tools. Differential Revision: https://reviews.freebsd.org/D56265 Reviewed by: kbowling, sumit.saxena_broadcom.com Sponsored by: Netflix
debug: Commit manually moved from "unknown" to "network".
lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts When lro mbuf queuing is enabled, we should not queue easily reject-able packets. Queuing them does a bit of extra work (sorting, timestamps) and can potentially delay urgent packets such as LACP PDUs. This change moves simple rejection tests from lro_rx_common() into lro_rx and (more importantly) into tcp_lro_queue_mbuf(). Note this change only moves the easy checks on forwarding and packet metadata, where the rejection criteria is already hot in cache. It does not move parsing and looking inside the packet to verify the ether protocol, ip protocol, etc. This could be done, but we risk essentially doubling the cache misses per-packet by doing so. Differential Revision: https://reviews.freebsd.org/D56337 Reviewed by: rrs, tuexen Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
tcp lro: fix vnet handling Reported by: Shawn Webb Reviewed by: glebius, rrs Fixes: https://cgit.freebsd.org/src/commit/?id=f707cc00ed12 ("lro: move pkt rejection checks to leafs to avoid queueing") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56420
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Make loopback packet drops more obvious by reporting them in interface stats visable via netstat -ni Since loopback uses netisr, packets can be dropped if the netisr queue overflows. These drops are visible via netisr -Q, but its not an obvious place to look. Differential Revision: https://reviews.freebsd.org/D56356 Reviewed by: glebius, tuexen Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/net/'
`ip_tryforward()` and `ip6_tryforward()` checks whether the destination address is local or not without considering if it belongs to the current FIB. If the destination is local but not in our FIB, forward it instead of returning it to ip_input(). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292319 Reviewed by: zlei MFC after: 1 week MFC to: stable/15 Differential Revision: https://reviews.freebsd.org/D56353
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
If a FIB does not have a router configured, X_ip_mforward() would leak a lock. Plug the leak. The IPv6 counterpart did not have such a check. It wouldn't send an upcall to a non-existent router anyway due to the router_ver check, but we should verify that a router is present anyway. Add regression test cases to exercise these code paths. Reported by: Claude Opus 4.6 Fixes: https://cgit.freebsd.org/src/commit/?id=0bb9c2b665d9 ("ip6_mroute: FIBify") Sponsored by: Klara, Inc. Sponsored by: Stormshield
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
On platforms other than amd64, BIOCSRTIMEOUT is equal to BIOCSRTIMEOUT32. Therefore, running the COMPAT_FREEBSD32 code basically clears tv_usec on big endian platforms. When tcpdump is used, the timeout requested is 100ms, which gets cleared to 0 on ppc64 platforms. This results in tcpdump showing the packets only when the read buffer is full. Thanks to kib for guiding me to the correct fix. Reported by: ivy Reviewed by: adrian, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56399
debug: classified in
03-filenames_plain1 by
'sys/net/'
Implement RFC 4191 by handling received Router Adverisement (RA) packets with route information option. For default routes, use the route information's lifetime and preference to overwrite the RA's lifetime/preference. Also install and update more-specific route prefixes with the option's lifetime and expire them when their lifetime elapses. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263982 Reviewed by: markj Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Relnotes: yes Differential Revision: https://reviews.freebsd.org/D55449
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netinet/', 'sys/netinet6/']'
MFC after: 3 days Reported by: Claude Opus 4.6
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Implement the criteria specified in RFC 6191 for recycling TCP connections in TIME-WAIT. Reviewed by: rscheff, Marius Halden Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56321
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
pf: fix error handling in pf_sourcelim_add()
There are two issues in pf_sourcelim_add() error path:
- stale pointers are left in pf_sourcelim_id_tree_inactive when
duplicate source limiter instance is found in pf_sourcelim_nm_tree
- overload table may leak when insertion of new source limiter instance
fails.
Both issues reported and patch submitted by:
Renaud Allard <renaud () allard ! it>
OK sashan@
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 32063577ec
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
pf: pf_frag_compare() should not be using subtraction to compare fragment IDs
Issues reported and patch submitted by:
Renaud Allard <renaud () allard ! it>
OK sashan@
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 747740863c
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
pf: use correct address family in pfr_pool_get()
pfr_pool_get() in call to pfr_prepare_network()must use af
instead of hardcoded AF_INET
Issues reported and patch submitted by:
Renaud Allard <renaud () allard ! it>
OK sashan@
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 8e156a5ebe
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Wiring a virtual address range may require the thread to sleep, and this is not permitted in an epoch section. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
If we are low on TX descriptors, bypass iflib_txq_can_reclaim() and force a reclaim. This is intended to reduce the number of output drops under heavy load when using simple transmit. Differential Revision: https://reviews.freebsd.org/D56339 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/net/'
iflib: accurately count bytes/segments for TSO When using software based ifnet counters, iflib has not factored TSO into account when reporting the segments and bytes sent. So it will underreport NIC bandwidth by a small percent, and will undercount sent segments by a large factor. Fix this by calculating the number of added segments the NIC will send, and add header size multiplied by that number to arrive at a correct accounting of segments and bytes sent. This makes these software counters directly comparable to hardware counters. Doing this requires moving the calculation into iflib_encap() where we have already parsed the packet and know the header size, MSS, etc. Differential Revision: https://reviews.freebsd.org/D56338 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/net/'
iflib: fix book keeping iflib_txq_drain() returns the number of consumed entries. In the case of TSO, a single entry can contain multiple TCP packets. Reported by: Ricardo Branco, David Wolfskill Reviewed by: gallatin Fixes: https://cgit.freebsd.org/src/commit/?id=3fade68cfdf9 ("iflib: accurately count bytes/segments for TSO") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56509
debug: classified in
03-filenames_plain1 by
'sys/net/'
Replace the bare 7 with a named constant.
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
nd6: Break nd6_prefix_update out of prelist_update if PI exists, call prefix_update, instead of doing it inside the prelist_update. no functional change intended. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56130
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Break pfxrtr_add out of nd6_prelist_add Updating defrouter only required by `prelist_update()`. since `nd6_prelist_add()` is a public function, exclude unsed dr logic from it. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56131
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Change prelist_update return type to void The return value of `prelist_update()` is unused. Reviewed by: markj, zlei Differential Revision: https://reviews.freebsd.org/D56132
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Ignore entire PI if violates RFC 4862 section 5.5.3 Ignore prefix information update earlier in `prelist_update()`. If PI is invalid or autonomous bit is unset, we better to let our SLAAC address expire and if we don't have any previous matching prefix, better not to create new one. Because either our router don't want us to have one anymore, or the very RA is malicious. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D56133
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Remove anycast check in prelist_update RFC 2462 is obsoleted by RFC 4862 and it made statements more clear than before. Considering SLAAC can't create anycast addresses by itself, remove its check. While here, update comments based on RFC 4862. Reviewed by: markj, zlei Differential Revision: https://reviews.freebsd.org/D56134
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Break nd6_prefix_lifetime_update out of prelist_update Logic of updating prefix lifetime is big enough that deserves its own function. While here, fix style. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56135
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
nd6: Remove goto and unused condition in prelist_update While here, style it. Reviewed by: markj, zlei Differential Revision: https://reviews.freebsd.org/D56136
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
Add the struct for VHT information and flags for the known and flag field as documented on radiotap.org. iwlwifi has started filling in these details. While here, add Copyright information for all the additions in the last years. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
V_rt_numfibs can be set at compile time (with the ROUTETABLES kernel config option) or boot time (with the net.fibs tunable). vnet_rtables_init(), running during SI_PROTO_DOMAIN, was checking the tunable and updating V_rt_numfibs accordingly, but that means that earlier SYSINITs, such as vnet_mroute_init(), see the compile-time value for V_rt_numfibs before it gets corrected in vnet_rtables_init(). Fix this by initializing V_rt_numfibs earlier, so that SYSINITs are less likely to use the wrong value. Add a comment describing the weird, preexisting semantic of resetting rt_numfibs to 1 in VNET jails. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294510 Reviewed by: glebius, zlei, pouria MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56473
debug: classified in
03-filenames_plain1 by
'sys/net/'
ENOTCAPABLE is for capsicum and its use here is inappropriate. In particular, note that syscallret() treats this value specially. Reviewed by: glebius, pouria, zlei MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56481
debug: classified in
03-filenames_plain1 by
'sys/net/'
When TCP_REQUEST_TRK is enabled, the tcb grows by 600 bytes to accommodate the t_tcpreq_info[MAX_TCP_TRK_REQ] array. Even when the option is enabled, not every connection is using this feature. So let's allocate it on-demand, and save 600 bytes in the common case. Sponsored by: Netflix Reviewed by: rrs, tuexen Differential Revision: https://reviews.freebsd.org/D56484
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
If we take an early goto out_unlocked inp is uninitialized and then may be used in SCTP_LTRACE_ERR_RET(). Initialize inp to NULL to avoid warnings. Found with: gcc15 tinderbox build MFC after: 3 days Reviewed by: tuexen, pouria Differential Revision: https://reviews.freebsd.org/D56503
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
pf assumes that interface names are unique (and share a namespace with
interface group names).
Unfortunately the FreeBSD network stack has a few edge cases where this
assumption can be violated. Try to be more robust against this: rather
than changing the association between a kif and ifp just ignore the next
interface with the same name.
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
pf_udp_mapping_insert() may lock more than one row at a time. Fixes: https://cgit.freebsd.org/src/commit/?id=cd5ff4e841fb ("pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes") Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D56501
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Signed-off-by: Peter Ganzhorn <peter.ganzhorn@gmail.com> Reviewed by: zlei Fixes: https://cgit.freebsd.org/src/commit/?id=6d49b41ee84b iflib: Add pfil hooks MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2150
debug: classified in
03-filenames_plain1 by
'sys/net/'
This ensures that child processes are reaped in the outer loop in main(). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294035 Reviewed by: asomers Fixes: https://cgit.freebsd.org/src/commit/?id=66b107e82b2f ("ctld: Use kevent(2) for socket events rather than select(2)") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56525
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076 Reported by: Ken J. Thomson <thomsonk@yandex.com> Reviewed by: asomers Fixes: https://cgit.freebsd.org/src/commit/?id=969876fcee57 ("ctld: parse config file independently of getting kernel info") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55767
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
This results in slightly less duplicated code. Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56526
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
With securelevel set (for pf that means >= 3) we're expected to reject
rule changes. However, we allowed interface flags to be changed, which
would allow 'set skip on X' to be changed.
Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist.
MFC after: 1 week
Reported by: cyberkittens
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
pf: only allow a subset of netlink calls when securelevel is set
Extend the genl_cmd struct to allow calls to also carry a securelevel.
If that's set compare the current securelevel to only allow the call if
the level is lower than that.
If no value is specified continue to allow calls in any securelevel,
as before.
This allows us to easily implement the same securelevel restrictions for
pf as we have for the corresponding ioctls.
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D56390
debug: classified in
03-filenames_plain1 by '['sys/netlink/',
'sys/netpfil/']'
netlink: fix LINT-NOVIMAGE build Include the required header for securelevel_ge() Fixes: https://cgit.freebsd.org/src/commit/?id=9933bdcb1264 ("pf: only allow a subset of netlink calls when securelevel is set") Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Once we hand an mbuf over to netisr_queue() we may no longer access it. Save the length before the call so we can use it to increment counters afterwards. Fixes: https://cgit.freebsd.org/src/commit/?id=956acdce0505 ("loopback: Account for packet drops") Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/net/'
We are searching through the hash that has only wildcard bindings. This was missed by fdb987bebddf05e15a5af840379c7715a94aec1c. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56488
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
After commit 9b76228006d8, tcp_hptsi() dereferences inp_socket in order to get the inpcb's VNET. This means that mock inpcbs created by the HPTS test fixture must set inp_socket. Also set the current VNET there; previously, it was NULL, and this was not noticed since VNET_DEBUG is disabled even in debug kernels. Fixes: https://cgit.freebsd.org/src/commit/?id=9b76228006d8 ("inpcb: retire inp_vnet")
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
We should look at the table name for automatic tables as well. These
are different tables, so the rules using them are (or can be) different
as well.
MFC after: 3 days
Reported by: Michael Sinatra <michael@burnttofu.net>
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076 Reviewed by: asomers Fixes: https://cgit.freebsd.org/src/commit/?id=969876fcee57 ("ctld: parse config file independently of getting kernel info") Differential Revision: https://reviews.freebsd.org/D56523
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
The default implementation of is_dummy should return false. Only portal group ports should possibly return true. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076 Reported by: Ken J. Thomson <thomsonk@yandex.com> Fixes: https://cgit.freebsd.org/src/commit/?id=6acc7afa34aa ("ctld: Convert struct port to a hierarchy of C++ classes") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56524
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
This ensures it will be destroyed (removing the associated pidfile) anytime the process exits, including from exit(3) calls. This fixes a few places that would "leak" the pidfile on certain errors. This also removes the need for some convoluted logic where configuration objects would hand-off ownership of the pidfile handle from the old configuration to the new configuration. Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56527
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
pf_route() and pf_route6() forward broadcast and multicast traffic
when a route-to rule matches, without any check against the output
interface's broadcast domain. This is a deliberate property of the
route option code path, but it is not documented and the workaround
is non-obvious.
Document the behavior in pf.conf(5) with example block-out rules on
the target interface, scoped with the received-on qualifier so that
only forwarded traffic is dropped while the router's own broadcast
and multicast traffic continues to pass.
Add regression tests covering the full broadcast/multicast and
forwarded/local matrix on both IPv4 and IPv6.
Reviewed by: glebius, kp
Approved by: kp (mentor)
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D56559
debug: classified in
05-summary-prefix by 'pf:'
Case-insensitive TargetName matching on logins was accidentally removed, let's fix that by normalizing TargetName again according to RFC 3722. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294522 Fixes: https://cgit.freebsd.org/src/commit/?id=4b1aac931465f39c5c26bfa1d5539a428d340f20 Sponsored by: ConnectWise MFC after: 1 week Reviewed by: asomers, jhb Approved by: asomers (mentor) Differential Revision: https://reviews.freebsd.org/D56469
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
Reported by: KMSAN MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Make it more obvious that this field is not used. No functional change. Event: Wiesbaden Hackathon 202604
debug: classified in
03-filenames_plain1 by
'sys/net/'
The rationality is that the driver private data holds a strong reference to the interface, and the detach operation shall never fail. Given the vmove operation, if_vmove_loan(), if_vmove_reclaim() or vnet_if_return() is not atomic and spans multiple steps, acquire ifnet_detach_sxlock only for if_detach_internal() and if_vmove() is not sufficient. It is possible that the thread running if_detach() sees stale vnet, or the vmoving is in progress, then if_unlink_ifnet() will fail. Fix that by extending coverage of ifnet_detach_sxlock a bit to also cover if_unlink_ifnet(), so that the entire detach and vmove operation is serialized. Given it is an error when the if_unlink_ifnet() fails, and if_detach() is a public KPI, prefer panic() over assertion on failure, to indicate explicitly that bad thing happens. That shall also prevent potential corrupted status of the interface, which is a bit hard to diagnose. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292993 Reviewed by: glebius MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D56374
debug: classified in
03-filenames_plain1 by
'sys/net/'
Add SIOCGIFCAP ioctl-command for tun/tap character device to be used by bhyve for offloading in the future. Add SIOCSIFCAP for symmetry. Reviewed by: markj, pouria, tuexen MFC after: 1 week Event: Wiesbaden Hackathon 2026 Differential Revision: https://reviews.freebsd.org/D51289
debug: classified in
03-filenames_plain1 by
'sys/net/'
When a KTEST_EQUAL assertion fails, the test function returns, but this can cause it to leak locks, which can trigger a panic under witness. Add a variant which causes control flow to jump to a label in case of failure, and use that to prevent this problem. Reviewed by: Nick Banks <nickbanks@netflix.com>, tuexen MFC after: 1 weeks Differential Revision: https://reviews.freebsd.org/D56647
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
When processing an ASCONF chunk we failed to verify that the chunk length was at least 8 bytes. As a result we might end up passing a negative length to pf_multihome_scan(). Fortunately this merely meant the function did nothing, but we should discard such invalid packets, so explicitly check for this. MFC after: 1 week Reported by: Mark Johnston Sponsored by: Orange Business Services
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
The current and historical versions of ctld would flag our initial set of kernel ports as dummies, because their portal groups were empty since portals come from the configuration on-disk. As a result, we would never try to remove a kernel port at startup that didn't exist in the configuration (possibly a feature if you wanted concurrent ctld(8)), and we would always try to port->kernel_add() on ports in the configuration (even if they actually did have an existing kernel port). Flag these portal groups as kernel groups so that we avoid trying to add ports that already exist. It may be the case that the kernel_remove() loop in conf::apply() needs to do something other than the current `oldport->is_dummy()` to avoid removing ports that it isn't supposed to be managing, but that wuld also seem to apply to LUNs that would be removed today. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D51782
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
As per RFC5061 "4.2. New Parameter Types" the add/delete IP address parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK chunk. They are only allowed to be present in an ASCONF chunk. This also prevents unbounded recursion while parsing an SCTP packet. Approved by: so Security: FreeBSD-SA-26:14.pf Security: CVE-2026-7164 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294799 Reported by: Igor Gabriel Sousa e Souza Sponsored by: Orange Business Services
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
The 'hash' subword doesn't bring any additional information. All inpcb lookup functions operate on hashes. For lookup functions that work on either exact hash or wild hash just perform s/hash_//. Rename in_pcblookup_hash() into in_pcblookup_with_lock(), emphasizing its difference to in_pcblookup_smr(). Rename in_pcblookup_hash_locked() to in_pcblookup_internal(), as it doesn't return a locked inpcb and is used only for internal purposes. Note that the IPv6 sibling of this function already lives by name in6_pcblookup_internal(). Some future changes will make such naming more justified. No functional change. Reviewed by: pouria, markj Differential Revision: https://reviews.freebsd.org/D56482
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
Understand zero size as instruction to not allocate the hash. Do not allocate both hashes for rawip(4). There are no functional changes to TCP or UDP. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56705
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Fix stack overflow by passing in_aliasreq instead of ifr during netlink dump. Fixes: https://cgit.freebsd.org/src/commit/?id=e1e18cc12e68 ("if_gre: Add netlink support with tests")
debug: classified in
03-filenames_plain1 by
'sys/net/'
Routing subsystem allows creating new multipath routes by nexthop groups (e.g RTA_MULTIPATH in netlink), in case of a second nexthop group on the same route, don't panic and merge the existing nhgrp with new one. Reviewed by: melifaro (except one comment) Differential Revision: https://reviews.freebsd.org/D56187
debug: classified in
03-filenames_plain1 by
'sys/net/'
Before this patch, netlink never returned RTA_MULTIPATH. Also, add RTA_MULTIPATH attribute in way that don't confuse non-mpath support consumers. Differential Revision: https://reviews.freebsd.org/D56188
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Fix route expiration of nhops that exists inside a nhgrp. Differential Revision: https://reviews.freebsd.org/D56189
debug: classified in
03-filenames_plain1 by
'sys/net/'
krb5: import MIT 1.22.2 Merge commit '90c687295e2d62f9411fc5b571f5af4e8ee187a7'
debug: classified in
05-summary-prefix by 'krb5:'
krb5: Adjust version to 1.22.2 Fixes: https://cgit.freebsd.org/src/commit/?id=736e411a737b
debug: classified in
02-filenames_wildcards by
'.*Makefile'
krb5: Adjust additional version strings Fixes: https://cgit.freebsd.org/src/commit/?id=736e411a737b
debug: classified in
03-filenames_plain1 by 'krb5/'
Bring in upstream commit 2e75f0d93 fixing two CVEs. Upstream commit log is: In parse_nego_message(), check the result of the second call to vector_base() before dereferencing it. In parse_message(), check for a short header_len to prevent an integer underflow when calculating the remaining message length. Reported by Cem Onat Karagun. CVE-2026-40355: In MIT krb5 release 1.18 and later, if an application calls gss_accept_sec_context() on a system with a NegoEx mechanism registered in /etc/gss/mech, an unauthenticated remote attacker can trigger a null pointer dereference, causing the process to terminate. CVE-2026-40356: In MIT krb5 release 1.18 and later, if an application calls gss_accept_sec_context() on a system with a NegoEx mechanism registered in /etc/gss/mech, an unauthenticated remote attacker can trigger a read overrun of up to 52 bytes, possibly causing the process to terminate. Exfiltration of the bytes read does not appear possible.
debug: classified in
05-summary-prefix by 'krb5:'
SCTP states should always have a src scrub object associated with them. Crafted pfsync packets might not have this, leading to us derferencing a NULL pointer on cleanup. Validate the pfsync state insertion packet to make sure this is correct. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294989 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
We insert rules in pf_krule_global solely for the benefit of the 'keepcounters' feature. Failing to insert (beause the rule hash collides, or an identical rule already exists) would be worse than restoring counts to the wrong rule (or failing to restore them at all). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282863, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294860, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294859, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294858 MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D56745
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: Commit manually moved from "unknown" to "network".
Running sys/net tests in parallel reveals some panics which look like the one below: ``` shared lock of (sx) vlan_sx @ /home/markj/sb/main/src/sys/net/if_vlan.c:2395 while exclusively locked from /home/markj/sb/main/src/sys/net/if_vlan.c:1850 panic: excl->share cpuid = 9 time = 1776467219 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00d84e0780 vpanic() at vpanic+0x136/frame 0xfffffe00d84e08b0 panic() at panic+0x43/frame 0xfffffe00d84e0910 witness_checkorder() at witness_checkorder+0xdb1/frame 0xfffffe00d84e0ad0 _sx_slock_int() at _sx_slock_int+0x64/frame 0xfffffe00d84e0b10 vlan_ioctl() at vlan_ioctl+0x25c/frame 0xfffffe00d84e0b70 if_setflag() at if_setflag+0xdc/frame 0xfffffe00d84e0be0 ifpromisc() at ifpromisc+0x27/frame 0xfffffe00d84e0c00 vlan_setflags() at vlan_setflags+0x64/frame 0xfffffe00d84e0c30 vlan_unconfig_locked() at vlan_unconfig_locked+0xb7/frame 0xfffffe00d84e0c70 vlan_clone_destroy() at vlan_clone_destroy+0x5d/frame 0xfffffe00d84e0cb0 if_clone_destroyif_flags() at if_clone_destroyif_flags+0x8c/frame 0xfffffe00d84e0cf0 if_clone_detach() at if_clone_detach+0x106/frame 0xfffffe00d84e0d20 vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe00d84e0d50 prison_deref() at prison_deref+0xaf5/frame 0xfffffe00d84e0dc0 sys_jail_remove() at sys_jail_remove+0x1a7/frame 0xfffffe00d84e0e00 amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe00d84e0f30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00d84e0f30 --- syscall (508, FreeBSD ELF64, jail_remove), rip = 0x25bd44705ca, rsp = 0x25bcfe72ab8, rbp = 0x25bcfe72b40 --- ``` All vlan interfaces are locked by a single recursive global lock. There are cases, like in the panic above where vlans are stacked on top of each other, where the driver tries to acquire an exclusive lock while holding a shared lock, and vice versa. With longer-term goals of making the networking regression test suites stable when run in parallel, and simplifying network control plane locking, which I find is quite complex and buggy, let's change if_vlan to use the exclusive lock everywhere. Reviewed by: pouria, zlei, kp, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56778
debug: classified in
03-filenames_plain1 by
'sys/net/'
When dumping states optionally (at '-vv') also show the rule which
created the state. This can be helpful if the ruleset changed and we
want to know what rule created the state.
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: Commit manually moved from "unknown" to "network".
Set the ifp variable as soon as soft_c becomes available so that interface statistics can be incremented. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295129 Reported by: Robert Morris <rtm@lcs.mit.edu> Fixes: https://cgit.freebsd.org/src/commit/?id=e44d2e941e8e ("if_geneve: Add Support for Geneve ...")
debug: classified in
03-filenames_plain1 by
'sys/net/'
These are two single-pair Ethernet (SPE) variants that run at 10 Mbps. 10BASE-T1S has automotive origins and supports multiple nodes on up to 25m of cable. 10BASE-T1L is intended for building and industrial automation and supports long-distance point to point links of over 1km. Reviewed by: kbowling Differential Revision: https://reviews.freebsd.org/D56952
debug: classified in
03-filenames_plain1 by
'sys/net/'
* do not require just only ip6 proto for flow-id opcode in ipfw(8). ipv6-icmp, tcp, udp should be fine too. * fix off-by-one bug leading to out-of-bounds read. * apply IPV6_FLOWLABEL_MASK before comparison in flow6id_match(), so flow-id opcode will match a specified flow label. No need to take protocol version and traffic class into account. * add the test to verify that opcode is working correctly. Reviewed by: pouria Obtained from: Yandex LLC MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56869
debug: classified in
05-summary-prefix by 'ipfw:'
When we have multiple aggregators, the link state should reflect the state of the active aggregator. This change was prompted by a script pruning 10GbE interfaces from an lacp bundle with 100GbE interfaces. Mixing speeds like this creates multiple aggregators. When the last 10GbE interface was removed, lagg0 would loose link because the current aggregator's port count would drop to 0, even though the 100GbE aggregator had active ports. This left the system in a hard to diagnose state where lagg0 reported "active", but all outgoing IP traffic was dropped, due to the RT_LINK_IS_UP() check noticing lagg0's if_link_state was marked as down. Reviewed by: zlei Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56579
debug: classified in
03-filenames_plain1 by
'sys/net/'
Address leaks that I missed in commit f7bf9fd6199c
("tests/tcp_hpts_test: Fix resource leaks").
Reviewed by: Nick Banks <nickbanks@netflix.com>, tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56943
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
vxlan_input()'s caller is supposed to free *m0 if it is non-NULL after the function returns. vxlan_input() failed to update *m0 after the pullup however, so if it hits an error case after the pullup, we'll free the mbuf twice. Currently this can happen only if the interface is brought down or due to a packet loop. Reported by: Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai Reviewed by: pouria, zlei MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56944
debug: classified in
03-filenames_plain1 by
'sys/net/'
Check for alloction failure on `npt_alloc()` for RTA_MULTIPATH attributes in `nlattr_get_multipath()`. Also, add tests for maximum number of rtnexthop in rtnetlink. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56954
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Fix length validation of RTA_MULTIPATH attributes in nlattr_get_multipath() by making sure the user request is align. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295102 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=7e5bf68495cc ("netlink: add netlink support") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56963
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
A bug fix was committed locally and submitted upstream. Document it in our upgrade instructions, as these sometimes take a long time before getting merged. Sponsored by: The FreeBSD Foundation
debug: classified in
05-summary-prefix by 'openssh:'
Sponsored by: The FreeBSD Foundation Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D57053
debug: classified in
05-summary-prefix by 'openssh:'
Fixes: https://cgit.freebsd.org/src/commit/?id=2574974648c6 ("OpenSSH: Update to 10.3p1") Sponsored by: The FreeBSD Foundation
debug: classified in
05-summary-prefix by 'openssh:'
tcp: Make RFC 6191 support configurable Add a default-on per-VIMAGE sysctl for RFC 6191 connection recycling. This makes it possible to merge the change to older branches where it can be switched off by default to minimize risk. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Reviewed by: pouria, marius.h_lden.org, tuexen Differential Revision: https://reviews.freebsd.org/D57045
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
tcp: Fix typo in RFC 6191 sysctl Fixes: https://cgit.freebsd.org/src/commit/?id=2af70d7a3849 ("tcp: Make RFC 6191 support configurable") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay
debug: classified in 01-style
by '[tT]ypo'
debug: moved to network because
'Need to be grouped with
2af70d7a384934cee497fb6d75678e04f1416287'
ctld: Remove redundant call to conf::isns_schedule_update This is already called at the end of conf::apply. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56530
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Mark a few more isns_* methods in the conf class private These are only invoked from other methods in the conf class. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56531
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Add a dedicated conf method for shutting down Currently the main loop creates an empty config and applies it to force a shutdown of all of the existing configuration. While this is functional and does avoid duplicating some code, it is also a bit clunky and requires a special hack in the pidfile path handling in the conf::apply method. Instead, use a dedicated conf::shutdown method which tears down the CTL ports and LUNs and closes the sockets. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56532
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Simplify pidfile rename handling in conf::apply Explicitly copy the pidfile path from the initial configuration file to the kernel-derived configuration to avoid having to check if the old path is empty as a special case in conf::apply(). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56533
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Don't ignore pp/vp values of kernel ports with pp == 0 but vp != 0 Fixes: https://cgit.freebsd.org/src/commit/?id=c6f1e9b8a412 ("ctld: Simplify XML parsing memory management") Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Refactor ioctl port handling - Normalize ioctl port names when the port name is first added to the configuration. This can catch potential duplicate port names sooner and helps with other parts of this change. - When recognizing existing ioctl ports, always expand the name to include the physical and virtual port numbers. This permits binding ioctl/0/0 or ioctl/1/0 to a target, for example. - When adding physical ports to a target, first check for an existing kernel port to reuse. This handles both ioctl and non-ioctl ports and removes the need for the conf::add_port method for ioctl ports to check in kports. - If an existing kport isn't found when adding physical ports, check to see if the port name is an ioctl port. If so, call conf::add_port to add an ioctl port. This add_port method overload is now simpler as it always creates a new port. NB: The kernel_port class handles CTL ports that already existed before ctld started including existing ioctl ports, whereas the ioctl_port class handles ioctl ports that are created and completely managed by ctld. This was true before this change but is perhaps more obvious after this change. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57092
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
ctld: Only check physical port linking in a single configuration context Commit 969876fcee57 moved struct pport from being per-configuration to being a "global" object shared across multiple configurations. As a result, the check for duplicate ports actually spanned across configurations, such that reloading a configuration would now think that existing physical ports were already linked. The linking field in pport added in the C++-ification (commit 6acc7afa34aa) faithfully replicated this bug (albeit simpler as I had noticed that the TAILQ links weren't used after the earlier commit). To restore the desired behavior, remove the linking field from struct pport entirely and use a local unordered_map in conf::add_pports which tracks if a given pport is claimed by more than one target. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076 Reported by: Ken J. Thomson <thomsonk@yandex.com> Fixes: https://cgit.freebsd.org/src/commit/?id=969876fcee57 ("ctld: parse config file independently of getting kernel info") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57093
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
These are the last two uses of the wk_rxmic / wk_txmic macros. Everything should be using the accessor methods at ths point. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54790
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
This is a refactor of 228c632ab3f62. First, move compatibility one level up, where we yet work with the full header. Second, move this rarely executed code outside of the inline function. Should be no functional change. Reviewed by: pouria, melifaro Differential Revision: https://reviews.freebsd.org/D56915
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295106 Submitted by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: pouria, melifaro Differential Revision: https://reviews.freebsd.org/D56916
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Validate the length of the packet listed in the mbuf is the same as the calculated packet length. If not reject the packet and bump the bad packet stat. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295198 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57095
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
ipfilter: Add NULL check for fin_dp in ICMP packet handlers Add NULL checks for fin->fin_dp in ipf_pr_icmp6() and ipf_pr_icmp() before dereferencing. When processing packets with IPv6 extension headers, ipf_pr_pullup() can succeed but fin->fin_dp may still be NULL due to extension header processing leaving insufficient data for the protocol header. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6 error handling code path. When ipf_checkicmp6matchingstate() calls ipf_makefrip() with a synthesized fr_info_t that has fin_m set to NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6() which would crash when trying to access the mbuf via M_LEN(). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() Add NULL checks for ic6 (the ICMPv6 header pointer from fin->fin_dp) and oic (the inner ICMPv6 header from ofin.fin_dp after ipf_makefrip). These pointers can be NULL when processing malformed ICMPv6 error packets with extension headers. Also fix the length validation: the original check (fin->fin_plen < sizeof(ip6_t)) could never trigger because an earlier check already ensures fin->fin_plen >= ICMP6ERR_MINPKTLEN (48). Replace with a proper check that fin->fin_dlen contains at least ICMPERR_ICMPHLEN + sizeof(ip6_t) bytes to ensure sufficient data exists for both the ICMPv6 error header and the embedded IPv6 header. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
In our routing stack implementation, metric is an attribute of the nexthop, not the route itself. Store metric in nhop_priv which is control-plane data of nexthop, filter the nexthops by metric and populate the mpath slots in nexthop group with only the lowest metric nexthops for use in the forwarding path. `cmp_priv()` compares nhops based on priv hash. Add metric compare logic to it and only return nexthops with different metrics if the input nexthop's metric is zero (wildcard). Also, add support for metric via rtsock by introducing rmx_metric. Finally, remove the upper 8-bit reservation of weight for administrative distance. Reviewed by: adrian Discussed with: markj Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56322
debug: classified in
03-filenames_plain1 by
'sys/net/'
* Use our new 32-bit metric for RTA_PRIORITY support. * Update snl library for new RTA_PRIORITY support. * return RTA_PRIORITY for both MPATH and non-MPATH routes. Reviewed by: glebius (previous version) Discussed with: markj Differential Revision: https://reviews.freebsd.org/D56323
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Add metric support and show its value in wide flag and libxo output. Also, add metric to the description of wide flag (`-w`) in routing display (`-r`) section of manual page. Reviewed by: markj (manpage) Discussed with: markj Differential Revision: https://reviews.freebsd.org/D57011
debug: classified in
03-filenames_plain1 by
'usr.bin/netstat/'
When checksum offloading is used, IPFW needs to fix the checksum after libalias has done NAT. The ipfw_nat() function does so, but only for mbufs without a receiving interface. However, if, for example, the packet was sent inside a jail that used checksum offloading over an epair, ipfw still needs to fix the checksum even though the mbuf has set a receiving interface (epair). This patch just removes the check whether a receiving interface is set. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295057 Reviewed by: tuexen MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57091
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
We used nla_p_table for pfr_table structures, but this netlink decoder was intended for pfioc_table and decoded an extra field, outside of pfr_table. This allowed userspace to write (slightly) outside of pfr_table. Use a separate nlattr_parser for pfr_table. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295218 Reported by: Robert Morris <rtm@lcs.mit.edu> MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
It is reported that micro(up)time() performs poorly in certain virtualisation scenarios. Absolute accuracy isn't required here, so switch to the slightly less accurate (as per the man page) get-variants. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295043 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/net/'
Reviewed by: bz, pouria Fixes: https://cgit.freebsd.org/src/commit/?id=7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57156
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Even though it is not dereferenced, it is UB to take the address of an out of bounds array element. Reviewed by: pouria, bz, des, adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57158
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
It has done nothing since commit bc7d18ae7224. No functional change intended. Reviewed by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57101
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Reviewed by: bz, glebius, pouria Fixes: https://cgit.freebsd.org/src/commit/?id=7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57167
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Reviewed by: glebius, pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57171
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Taking the address of an OOB array element is UB, even if not dereferenced. Reviewed by: des, bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57172
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
net80211: add some example doxygen inline documents This isn't supposed to be comprehensive, I want to have examples for the common doxygen comments: * describing a struct * inside a struct - single line before the item * inside a struct - same line after an item * inside a struct - multi-line before an item These build fine with the doxygen build in tools/kerneldoc/subsys/ . Differential Revision: https://reviews.freebsd.org/D57056
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
net80211: update/add some VHT doxygen documentation Add and update some documentation to be picked up by doxygen. Differential Revision: https://reviews.freebsd.org/D57079
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
net80211: add initial README.md and PROTOCOL.md * Add top level README.md, linking to in progress and todo items * Add an 802.11 protocol overview, with todo items - this is designed to provide a basic introduction to 802.11 for people wishing to work on net80211 and drivers. * DEBUG.md - cover the debug API * DATAPATH_TRANSMIT.md - transmit datapath * DATAPATH_RECEIVE.md - receive datapath * PROTOCOL.md - a high level (for values of "high") overview of the 802.11 protocol and where it intersects with net80211 Differential Revision: https://reviews.freebsd.org/D56760
debug: classified in
03-filenames_plain1 by '['sys/net80211/',
'tools/kerneldoc/subsys/Doxyfile-net80211']'
Reviewed by: bz, pouria Fixes: https://cgit.freebsd.org/src/commit/?id=7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57234
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
divert: Define semantics for SO_REUSEPORT_LB on divert sockets Allow SO_REUSEPORT_LB to be set on divert sockets. If set, then bind() will add the socket to a "load-balancing group". When a divert-to rule matches a port with an associated group, the corresponding state ID is used to select a specific socket from the group. Packets without an associated state are simply forwarded to the first socket in the group. For now I only pass a state ID from pf, as I couldn't see a useful identifier on the ipfw side. This implementation is simple but has a caveat, that being that if sockets are added to the group while flows are being processed, the size of the group will change and this changes the mapping of state IDs to sockets. So, to get a consistent mapping, the divert socket application must bind all of its sockets before any traffic is diverted by the firewall. Reviewed by: glebius MFC after: 1 month Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D56563
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netpfil/']'
divert: Avoid using atomic_(load|store)_(acq|rel)_16 It's not implemented on some arches. Use a plain int to count the number of sockets in a divert lbgroup. Reported by: Jenkins Fixes: https://cgit.freebsd.org/src/commit/?id=895a0ae67fe2 ("divert: Define semantics for SO_REUSEPORT_LB on divert sockets")
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
The uninitialized timeval was discovered by the new clang.
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
The only possible way to exercise in_pcbrehash() is to bind(2) and then connect(2). The second branch was a dead code since fdb987bebddf. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57241
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
This is very similar to IPv4 change 24e5c2ee2a18. Don't modify inpcb until we are sure connect(2) will be successful. Fixes: https://cgit.freebsd.org/src/commit/?id=0c325f53f16731f608919a4489f96fbbe28d2344
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
The error messages ctld emits when it finds a port or LUN it did not create were inconsistent with each other as well as with ctld's other error messages. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57270
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
If the weight value is larger than 8 bits, set it to the maximum. Also, only send RTA_WEIGHT if its value is not the default. This reduces message size and matches the behavior of non-multipath routes. Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D57266
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
No functional change. Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57349
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57332
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Commit f34aca55adef ("netlink/route: provide pre-2.6.19 Linux compat shim",
2024-06) fixed the partial fix for net/bird2 on the netlink path by mapping the
legacy 8-bit struct rtmsg::rtm_table field onto the modern 32-bit RTA_TABLE
attribute when the latter is absent.
That fix, however, was only applied to rtnl_handle_newroute. The two sibling
handlers: rtnl_handle_delroute and rtnl_handle_getroute were left looking at
attrs.rta_table directly. They are reachable from exactly the same client
(bird, in its netlink scan path), so any FIB number that fits in 8 bits
silently maps to RT_TABLE_UNSPEC in those handlers.
Reviewed by: melifaro (previous version)
Approved by: emaste
MFC after: 1 week
Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
The sc_count check in lagg_transmit_ethernet() and lagg_transmit_infiniband() is racy, as the lagg protocol handlers are only synchronized by net_epoch. Handle a count of 0 in each protocol handler where it's needed, namely in the RR and LB handlers. Reported by: Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai Reviewed by: pouria, zlei MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56942
debug: classified in
03-filenames_plain1 by
'sys/net/'
We cannot call copyout() while in a net epoch section, unless the user memory is wired. Use the global ifnet lock to synchronize the accesses instead. Reported by: emaste Reviewed by: zlei MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57154
debug: classified in
03-filenames_plain1 by
'sys/net/'
When an ipfw rule references a NAT64 instance by name using 'nat64lsn', the kernel looks up the instance in the shared srvstate[] array without verifying the instance type. If the named instance is actually a nat64clat or nat64stl instance (created with 'nat64clat' or 'nat64stl'), the code incorrectly casts the instance to nat64lsn_instance and dereferences the ->cfg pointer, which causes a kernel panic. The root cause is that all NAT64 instance types share the same srvstate[] array but have different struct layouts. For nat64lsn_instance, the field after 'no' is a pointer to nat64lsn_cfg. For nat64clat_cfg, the same offset contains an embedded nat64_config struct. Fix by adding a type check after NAT64_LOOKUP() to verify that the instance's etlv matches IPFW_TLV_NAT64LSN_NAME before proceeding. If the type doesn't match, return IP_FW_DENY to reject the packet safely rather than crashing. Signed-off-by: Teddy Engel <engel.teddy@gmail.com> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292023 Reported by: pouria Reviewed by: ae Pull-Request: https://github.com/freebsd/freebsd-src/pull/2249
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
lacp uses interface speed to separate lacp members into different aggregation groups. It wants to use the lower 4 bits of the key to represent the speed. This change fixes a few bugs around that: 1) Actually use the baud rate reported by the interface as the speed (and fall back to use the baudrate associated with the media if the interface somehow doesn't support if_baudrate) 2) Compressess the baud rates down to the 4 bits reserved for them. Using things like FM_400G_FR8 does not fit in 4 bits (its value is 0x1811) . In fact, interfaces faster than 1Gb/s don't fit in 4 bits using the old scheme 3) Emits a warning on the console once per boot if it encounters a NIC with an unsupported speed to make it slightly more obvious why LACP might not behave as expected. This was prompted by a 400g nic with a broken media detection reporting "unknown" as its speed, and being unable to be in the same aggregation group with a different 400g nic that was properly reporting its speed. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57026 Reviewed by: slavash
debug: classified in
03-filenames_plain1 by
'sys/net/'
Convert PFNL_CMD values in pf_nl.h from an enum to #define constants, add a pfnl_cmd table definition for mktable, and implement the corresponding command decoding helpers in libsysdecode. This allows mktable to generate PF netlink command lookup tables and enables symbolic decoding of PF netlink commands. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored by: Google LLC (GSoC 2026)
debug: Commit manually moved from "unknown" to "network".
Reported by: Andrew Griffiths <andrew@calif.io> Fixes: https://cgit.freebsd.org/src/commit/?id=069a67374ed9 ("ip6: Remove support for RFC2675 (Jumbo Payload Option)") Reviewed by: pouria, tuexen, glebius Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57341
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj, bz, kp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57476
debug: classified in
03-filenames_plain1 by
'sys/net/'
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57475
debug: classified in
03-filenames_plain1 by
'sys/netipsec/'
When we undefer a packet (when the peer acks the state) it's possible that we don't find a corresponding pfsync_deferral. We panic here, but that's actually something that can happen in normal operation: - if we have too many deferred packets already (in pfsync_defer()) - if the deferral timed out (in pfsync_defer_tmo()) Remove this panic and document the scenarios where it might occur. MFC after: 2 weeks Sponsored by: Orange Business Services
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
and Ke Xu from Tsinghua University using GLM-5.1 from
Z.ai
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57383
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
krb5 1.22.1 erroneously removed a check from get_negTokenResp() for successful decoding of the mechListMIC field. Restore the check to prevent a null pointer dereference. Commit message details obtained from upstream commit. Obtained from: Upstream commit 4ae75cded MFC after: 3 days
debug: classified in
05-summary-prefix by 'krb5:'
If a name token contains trailing garbage, error out from
krb5_gss_import_name() instead of crashing the process with an
assertion failure.
Commit message details obtained from upstream commit.
Obtained from: upstream commit 07818f1fd
Reported by: Aisle Research (Ze Sheng, Dmitrijs Trizna,
Luigino Camastra, Guido Vranken) to krb5-bugs
MFC after: 3 days
debug: classified in
05-summary-prefix by 'krb5:'
debug: Commit manually moved from "unknown" to "network".
nlmsghdr::nlmsg_len and nl_buf::offset are u_int. Make msglen match. Reviewed by: pouria, glebius Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57474
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
Discarding m_free's return value will result in an mbuf leak if the mbuf was in a chain. In general we should use m_freem if the mbuf may be in a chain, or assert that the return was NULL. There will not be a chain here due to m_megapullup, so add an assert. Reviewed by: ae Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57479
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
After commit 069a67374ed9, ip6_input() quickly rejects packets with plen == 0, before ip6_input_hbh() is called. So, there is no need to check this condition again in the helper function. Reviewed by: pouria, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D57342
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
libalias maintains a global list of all libalias handles. The list was updated without any locking, but nothing prevents updates from running concurrently. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Describe the ieee80211_task API, why its used and some of its shortcomings. Differential Revision: https://reviews.freebsd.org/D57261
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
This hasn't been used in a long time, and since I am shuffling around the net80211 crypto API a bunch, let's just delete it instead of leaving it here and trying to figure out how to support it if it's used by userland somehow. Reviewed by: guest-seuros Differential Revision: https://reviews.freebsd.org/D57312
debug: classified in
03-filenames_plain1 by
'sys/net80211/'
We drop the inpcb lock in order to copy in the source list, but this leaves a window where the multicast filter structure might be freed. This can be exploited to obtain root privileges. In the v4 code this race is mitigated by holding the global multicast lock across the gap. Restructure the code to copy in filters before doing anything else, so that there's no need to drop the inpcb lock and reason about the correctness of doing so. Do the same in the v4 code for consistency. Approved by: so Security: FreeBSD-SA-26:29.ip6_multicast Security: CVE-2026-49412 Reported by: Andrew Griffiths <andrew@calif.io> Reported by: Maik Münch <maik@secfault-security.com> Reviewed by: glebius Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57347
debug: classified in
03-filenames_plain1 by '['sys/netinet/',
'sys/netinet6/']'
This fixes a panic reported on armv7:
sys/netpfil/pf/counters:match_block -> panic: free: called with spinlock or critical section held
[...]
vpanic() at vpanic
pc = 0xc0321b5c lr = 0xc02f7b5c (free+0x140)
sp = 0xc8c858bc fp = 0xc8c858e0
r4 = 0xe2fad648 r5 = 0xe402ce78
r6 = 0xc8c859e8 r7 = 0x0000001c
r8 = 0xc8c858b4 r9 = 0xc0321b5c
r10 = 0xc8c858bc
free() at free+0x140
pc = 0xc02f7b5c lr = 0xe2f4f920 ($a+0x5f8)
sp = 0xc8c858e8 fp = 0xc8c85930
r4 = 0xe402ce68 r5 = 0xc8c8599c
r6 = 0xffffffff r10 = 0x0000001c
[...]
KDB: enter: panic
Consequently, this fixes armv7 CI:
https://ci.freebsd.org/job/FreeBSD-main-armv7-test/2287/consoleText
Fixes: https://cgit.freebsd.org/src/commit/?id=6353f5d9a5c6f194bb014b8785a57f5314e8c652
Reviewed by: kp
MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Multipath routes can be added via both RTM_F_CREATE and RTM_F_APPEND. Therefore, it's possible to have mpath routes without calling add_route_flags_mpath. Instead of checking V_fib_hash_outbound for every route append, check it during nhgrp_ctl initialization, which is only called for the first multipath request per rib_head. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293136 Reviewed by: glebius Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Differential Revision: https://reviews.freebsd.org/D57469
debug: classified in
03-filenames_plain1 by
'sys/net/'
On Linux struct ifinfomsg uses ARPHRD_* values, while we used IFT_* types (which derive from SNMP ifType definitions in RFC 1573). Update the header to reflect this. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272144 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334
debug: classified in
03-filenames_plain1 by
'sys/netlink/'
No functional change intended. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
This removes requirement for existence of obsolete IPPROTO_DIVERT in <netinet/in.h> and the 'divert' entry in /etc/protocols. Also, this avoids running through the nsdispatch(3) machinery on startup, cutting down about 20 syscalls, three of which are open(2). The code of sockstat(1) itself is also reduced. The only UI change for a normal execution is that now the divert(4) sockets are reported as "divert4" instead of "div4". The prefix "4" itself is also incorrect, as divert(4) is not a part of IPv4. This will be addressed in a separate change. There is small UI change for incorrect runs. Previously protocols listed in /etc/protocols, but not supported, would err out like this: # sockstat -P ggp sockstat: protocol 3 not supported And non-existent protocols would err out like this: # sockstat -P foo sockstat: cap_getprotobyname: No error: 0 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS Now both cases will consistently err: sockstat: protocol foo not supported Reviewed by: pouria, tuexen Differential Revision: https://reviews.freebsd.org/D57507
debug: classified in
03-filenames_plain1 by
'usr.bin/sockstat/'
This makes it possible to list unix(4) protocols in -P, which was not possible before. Update the manual page and provide an example. In 'struct sock' make member proto a pointer into the protocols table instead of a number. This removes namespace collision that mixed IPPROTO_TCP and etc with SOCK_STREAM and etc. There were no known bugs due to this collision, though. Preserve all current UI bugs for possible combinations of protocol selection options. Should be no UI changes outside the improved -P. Reviewed by: pouria, tuexen Differential Revision: https://reviews.freebsd.org/D57508
debug: classified in
03-filenames_plain1 by
'usr.bin/sockstat/'
After commit 08f54dfca197 pfctl_get_astats() doesn't set errno anymore, except in one place. Fix up that one place and adjust callers appropriately. Reviewed by: kp Fixes: https://cgit.freebsd.org/src/commit/?id=08f54dfca197 ("pf: convert DIOCRGETASTATS to netlink") Differential Revision: https://reviews.freebsd.org/D57608
debug: Commit manually moved from "unknown" to "network".
Handle cred, ipopts, and maclabel using the same pattern:
allocate at the beginning and set to NULL when the object is
transferred to a struct syncache. When exiting the function, free
these objects if not transferred or when transferred to the on-stack
struct syncache. This makes use of a new function syncache_release().
This fixes a use after free problem: ipopts should only be freed,
if the on-stack struct syncache is used and the pointer in this
structure still points to the allocated ipopts. If the ipopts
are moved from the struct syncache to the struct inpcb in
syncache_socket(), which is called by syncache_tfo_expand(),
the pointer in the struct syncache is set to NULL.
In a FreeBSD default setup this problem is mitigated by
1. TCP fast open support on the server side not being enabled
(the sysctl-variable net.inet.tcp.fastopen.server_enable is 0).
2. Incoming IP packet with source routing options are not being
processed by the host stack
(the sysctl-variable net.inet.ip.accept_sourceroute is 0).
Only if these two sysctl-variables are changed, a FreeBSD system
is affected, if a server actually using TCP fast open is running.
Reported by: Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by: markj, rscheff
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D57374
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
The default value has been 1 since June 2018, but the docs were not updated to reflect the change. MFC after: 3 days Reviewed by: ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=af4da5865557 (Enable TCP_FASTOPEN by default) Signed-off-by: Matteo Riondato <matteo@FreeBSD.org> Closes: https://github.com/freebsd/freebsd-src/pull/2285
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> MFC after: 1 week Sponsored by: Nvidia networking Differential revision: https://reviews.freebsd.org/D57083
debug: classified in
03-filenames_plain1 by
'sys/net/'
Some interface drivers, notably bnxt, can insert 0 length packets onto their receive queues when certain conditions are met, such as discarding packets in the case of bnxt. When this packet gets processed by assemble_segments(), The solitary mbuf on the queue that composes it consist of a single zero length fragment. The loop in assemble_segments() doesn't seem to expect that a 0 length fragment can exist in the iri_frags list without a non-zero length header preceding it. In this situation, without filter intervention rxd_frag_to_sd() returns a pointer to the corresponding mbuf in the rxq, where it is matched as a zero-length fragment and immediately discarded without freeing as mh has not yet been assigned. This change corrects this behavior by falling through the mh == NULL case and freeing m on the condition that it is not NULL before continuing the loop. Reviewed by: gallatin Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D57537
debug: classified in
03-filenames_plain1 by
'sys/net/'
Reviewed by: kp MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=04a7134c1e92 ("if_ovpn: fix use-after-free of mbuf") Differential Revision: https://reviews.freebsd.org/D57696
debug: classified in
03-filenames_plain1 by
'sys/net/'
Per RFC 2734 section 5, the 1394 ARP packet is a fixed 32-octet structure with no target hardware address field. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57617
debug: classified in
03-filenames_plain1 by
'sys/net/'
Add etlv type validation to ipfw_nat64clat() and ipfw_nat64stl() to verify that the retrieved instance is actually a nat64clat instance before use. All NAT64 instance types share the same srvstate[] array but have different struct layouts. Without type validation, using the wrong instance type with a handler causes type confusion and kernel panic. Signed-off-by: Teddy Engel <engel.teddy@gmail.com> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292023 Reviewed by: pouria Pull Request: https://github.com/freebsd/freebsd-src/pull/2259
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
Until we introduced support for nic ktls offload, all error returns from isc_txd_encap() indicated a permanent failure. Iflib remapped all those failures to ENOMEM, which was treated by the tcp stack as a permanent error and passed back to the caller. This was done to avoid creating "infinite loops" where a packet couldn't be mapped for transmit, and kept being sent over and over. Now that we have support for nic ktls offload, some ktls offload drivers may return ENOBUFS from their encap function to indicate that, for example, the ktls context may not yet be fully initialized. This needs to be treated as a transient error so that the TCP stack may re-try at a later time. To achieve this, pass the raw error back to the caller when the encap routine returns an error aside from EFBIG. Note that I audited all in-tree iflib drivers. Only ice and ixl ran return anything other than 0 from their encap, which is EFBIG. both of which are still treated as they were before. Testing with an out-of-tree ktls offload nic using iflib showed ENOMEM errors from sendmsg() before this change, and no more errors passed back to userspace after this change. Reviewed by: kp, sumit.saxena_broadcom.com Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57550
debug: classified in
03-filenames_plain1 by
'sys/net/'
Just add these directly to the kports object rather than treating them as iSCSI ports. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57283
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
If the inpcb is already bound to a local address, there is no reason to call in6_pcbladdr(). If the inpcb is already bound to a local port, there is no reason to call in_pcb_lport_dest(). In the opposite case, if the inpcb is not bound, and we are about to choose a non-conflicting local addr:port, then there is no reason to call in6_pcblookup_internal(). This change makes in6_pcbconnect() to look much more alike the IPv4 in_pcbconnect(). I tracked this strange logic all the way down to initial KAME import and failed to find any reasoning for it. Reviewed by: pouria Differential Revision: https://reviews.freebsd.org/D57534
debug: classified in
03-filenames_plain1 by
'sys/netinet6/'
- so_pcb can't be non-NULL in pr_attach. - so_pcb can't be NULL in all other methods. - Short circuit data socket attach down to the common attach. - Short circuit both detach methods down to common one. - Inline control socket attach. - Inline control pr_bind. - Inline data pr_connect. - Rely on pr_connect_notsupp() for control connect(2). - Don't use cast on so_pcb, it is void *. Should be no functional change.
debug: classified in
03-filenames_plain1 by
'sys/netgraph/'
There is no need to reference node in its constructor, the framework already granted us a reference. This extraneous reference was later given back on socket detach. However, if node is destroyed before the socket, the node was leaked. This leak was harmless until VIMAGE, where vnet_netgraph_uninit() would cycle through all nodes and shut them down expecting them to not exist after the shutdown. Fixes: https://cgit.freebsd.org/src/commit/?id=19284374970533e1aa04020d4f840e8877ed6266
debug: classified in
03-filenames_plain1 by
'sys/netgraph/'
Don't require ioctl port names to be fully expanded as this contradicts the syntax documented in the ctl.conf(5). However, don't require users to exactly guess when pp or vp can be omitted. Instead, normalize all physical port names by parsing any port name with a pp or vp value and reformatting them to a standardized format. This format is also used when generating names for kernel-enumerated ports. Reported by: Seth Hoffert <seth.hoffert@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=caef3c50ac06 ("ctld: Refactor ioctl port handling") Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'usr.sbin/ctld/'
* Allow disabling IFCAP_RXCSUM_IPV6 or IFCAP_TXCSUM_IPV6. * Do not pretend the checksum is correct by setting the LO_CSUM_SET flags if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is enabled. Instead, remove the LO_CSUM_SET flags (in case they have been set somehow) if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is disabled. * Do not unset the transmit checksum offload flags LO_CSUM_FEATURES or LO_CSUM_FEATURES6 since they now have a meaning for the receive path. Reviewed by: glebius, pouria, tuexen Okayed by: bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57518
debug: classified in
03-filenames_plain1 by
'sys/net/'
Reviewed by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57816
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Just as was done for ipfw's log device stop creating entire struct
ifnet's for pflog devices. Create only a bpf_t.
This does mean we lose the create/destroy infrastructure provided by the
clone interface. Rather than implement this ourselves we allow users to
configure the number of pflog interfaces using the net.pflog.if_count
sysctl. We default to 8 devices, but allow up to 256.
The /etc/rc.d/pflog script will create extra devices as required.
While it was possible to rename pflog devices pfctl expected the pflogX
name, so it's safe to assume users never did this.
Requested by: glebius
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D57851
debug: Commit manually moved from "unknown" to "network".
No functional change intended. Reviewed by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57945
debug: classified in
03-filenames_plain1 by
'sys/net/'
debug: Commit manually moved from "unknown" to "network".
This "interface" type is no more. Leave the constant in if_types.h, we probably need an exp-run before removing it.
debug: classified in
03-filenames_plain1 by '['sys/net/',
'sys/netinet6/']'
Suggested by: pouria, glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by
'sys/netpfil/'
In alias_rtsp_out(), we construct a new packet in a fixed-length buffer before copying it back into the original buffer. We never checked if the data we were writing to this temporary buffer fit in it, nor if the result fit in the original buffer. * Use a dynamically sized allocated buffer instead of a fixed-length stack buffer. * Check for overflow before appending to our temporary buffer. * Check for overflow before copying the data back to the packet buffer. * While here, use size_t for sizes and bool for booleans. Approved by: so Security: FreeBSD-SA-26:41.libalias Security: CVE-2026-49420 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57753
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Malicious userspace might switch TCP stacks twice while the inpcb lock is dropped. If it does so, the validation of tp->t_fb might succeed, but the saved pointer to the stack PCB might be invalid. Reload it to avoid this problem, as BBR already does. Approved by: so Security: FreeBSD-SA-26:43.tcp Security: CVE-2026-49422 Reported by: Maik Münch Reviewed by: tuexen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57791
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
Stuff in man section 8 (other than networking).
MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Reviewed by: zlei, markj Differential Revision: https://reviews.freebsd.org/D56202
debug: classified in
03-filenames_plain1 by 'sbin/'
It's a bit silly to have iov_to_buf() and buf_to_iov() return a ssize_t to begin with, just to be able to return -1 for error. Change this to size_t and use 0 as an error indicator, which won't require any changes to the code using these functions. While here, switch iov_to_buf() to use reallocf() instead of realloc(). Reviewed by: jhb Fixes: https://cgit.freebsd.org/src/commit/?id=2a514d377b37 ("bhyve/virtio-scsi: Preallocate all I/O requests") Differential Revision: https://reviews.freebsd.org/D55800
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
When a specially formatted path is passed to dlopen(), of the form #number/path and the number is the valid dirfd file descriptor listed in the LD_LIBRARY_FDS, interpret it as a relative path name against dirfd number. This complements the result returned from dladdr() for such objects in dli_fname. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56152
debug: classified in
03-filenames_plain1 by
'libexec/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56152
debug: classified in
03-filenames_plain1 by
'libexec/'
tunefs: Don't lower WARNS Use casts to silence the alignment warnings instead of potentially suppressing other legitimate warnings. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56033
debug: classified in
03-filenames_plain1 by 'sbin/'
tunefs: Fix alignment warning on arm64 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=c5e79c7e93dd ("tunefs: Don't lower WARNS") Reviewed by: bakul Differential Revision: https://reviews.freebsd.org/D56229
debug: classified in
03-filenames_plain1 by 'sbin/'
MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56034
debug: classified in
03-filenames_plain1 by '['etc/',
'sbin/']'
Changes for jng 1.0 -> 2.0 include: + Add experimental MSS clamping + Add support for ng_bridge(4) NGM_BRIDGE_GET_STATS (getstats) + Add JSON formatted ng_bridge(4) statistics (see above) via "jng stats -j <name>" + Add error messages + Minor refactoring for code readability (read: quietly() function) + Rename eiface variables to jiface to clarify as-for jail interface (not ng_eiface(4)) + Fix missing description for alternate form of "jng show" usage + Update "jng show <name>" to accept multiple names (now "jng show <name> …" is allowed) + Update "jng shutdown <name>" to accept multiple names (now "jng shutdown <name> …" is allowed) + Add "-a" option to "jng stats" (as-in "jng stats -a") to show all ng_bridge(4) stats + Update "jng stats <name>" to accept any kind of name (make it easier to use) + Add version ident + Remove extraneous line in LICENSE section + Add -h to usage statements + Bump copyright Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D43516
debug: Commit manually moved from "unknown" to "admin".
tunefs: Better fix for arm64 alignment issues Rather than trust that the compiler will lay out the stack frame the way we expect it to, use a union to force the correct alignment. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=616f47f176c3 ("tunefs: Fix alignment warning on arm64") Reviewed by: kevans, mckusick Differential Revision: https://reviews.freebsd.org/D56245
debug: classified in
03-filenames_plain1 by 'sbin/'
tunefs: Fix pointer arithmetic While here, remove a bogus const which has been there for years. MFC after: 1 week Reported by: ivy@ Fixes: https://cgit.freebsd.org/src/commit/?id=1b83e8a3f840 ("Constify string pointers.") Fixes: https://cgit.freebsd.org/src/commit/?id=8244dd326265 ("tunefs: Better fix for arm64 alignment issues") Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56343
debug: classified in
03-filenames_plain1 by 'sbin/'
This allows something like the following local.lua to install a filter
to implement its own notion of hidden BEs using a naming convention of
a leading dot to hide them:
-- file: /boot/lua/local.lua
local core = require("core")
local function be_hide(be)
if core.isSingleUserBoot() then
-- All BEs are accepted for single-user
return true
end
local name = be:match("/([^/]+)$")
if not name then
-- Accept malformed BEs, for whatever reason
return true
end
return name:match("^%.") == nil
end
if core.bootenvFilter then
-- Just in case we need to be compatible with older versions of
-- core.lua without the filtering functionality.
core.bootenvFilter(be_hide)
end
-- EOF
Requested by: Marek Zarychta
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55359
debug: classified in
03-filenames_plain1 by 'stand/'
arm64: Add arm64 SVE tests Add the tests/sys/arch directory for architecture-specific tests and use it to add arm64 SVE tests. These test the kernel is managing the SVE state in a way we expect. These tests require SVE hardware support to run so will skip when they can't detect it. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D43311
debug: classified in
03-filenames_plain1 by 'etc/'
test/sys/arch: Fix arch without test/sys/arch/${MACHINE_ARCH}
Fixes: https://cgit.freebsd.org/src/commit/?id=0ddaa4c86d68 ("arm64: Add arm64 SVE tests")
Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*Makefile'
debug: moved to admin because
'Need to be grouped with
0ddaa4c86d68e8dacee8a78877e5742d53c122b3'
download.freebsd.org is backed by project mirrors and a CDN, which should benefit most users. Sponsored by: The FreeBSD Foundation Reviewed by: delphij (releng) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54849
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
In case the user did input, we should put newline on screen to avoid possible error messages to get mixed with user input.
debug: classified in
03-filenames_plain1 by 'stand/'
Because panic() does provide mechanism to have architecture specific panic call, we can instruct it to print out stack trace too (in hope we actually can print). While there, also implement simple check to detect loop in trace. illumos issue: https://www.illumos.org/issues/17887
debug: classified in
03-filenames_plain1 by 'stand/'
This allows safe_set to be leveraged in other contexts where additional chars like '*' or '!' or even '\[\]' need to be preserved in the result.
debug: classified in
03-filenames_plain1 by
'libexec/'
file_loadraw() can have a need to load unverified files like "dtrace_dof". Allow severity_guess() to look at the filename but if it returns less than VE_MUST check that the type is not one we insist on verifying. In vectx_open if severity < VE_MUST we can allow it to be unverified. If passed VE_GUESS we call severity_guess(). Regardless, we record severity in ctx so it is available to vectx_close(). Sponsored by: Hewlett Packard Enterprise Development LP Reviewed by: khng Differential Revision: https://reviews.freebsd.org/D56297
debug: Commit manually moved from "unknown" to "admin".
hccontrol LE_Set_Advertising_Data does not currently allow construction of manufacturer-specific type 0xFF AdvData. Fixed by a new data-entry option -b "b1,b2,b3,...,bn" where b's are 8-bit byte strings (octets). Signed-off-by: F. Duncanh <fduncanh@gmail.com> Reviewed by: takawata, pouria Pull Request: https://github.com/freebsd/freebsd-src/pull/2082
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Both (U)EFI and BIOS are completely different things, be precise and don't use them together. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56329
debug: classified in
03-filenames_plain1 by 'stand/'
Improve mfi_pd_inq_string() by * Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte * Don't truncate vendor-specific information by escaping into a too small buffer * Use cam_strvis() from libcam instead of old, outdated local copy * Recaculate size of inq_string based on the reused buffer sizes and format statements PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294354 Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56328
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This is the small internal doc fix from https://reviews.freebsd.org/D46313 Reviewed by: michaelo Approved by: (blanket; comment fix) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55325
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
rather than on VID/PID. Later is not reliable for some types. VID/PID identification can be restored by specifying of -p option. Tested by: arrowd, wulf PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290639 MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
MFC after: 3 days
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
NETWORKING is the documented placeholder, while /etc/rc.d/NETWORKING still provides the legacy alias NETWORK. The NETWORKING script was originally introduced to avoid conflicts with NetBSD's lowercase network script on case-insensitive file systems. The NETWORK alias was retained for compatibility with older scripts. Following the discussion in PR 293652, remove the legacy NETWORK alias from 16-CURRENT. Keeping both names adds more confusion than value now that NETWORKING is the documented placeholder and current base system and ports tree uses are already clean. Add an UPDATING entry to note that local RC scripts using REQUIRE: NETWORK should be migrated to REQUIRE: NETWORKING. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293652 Reviewed by: michaelo, jlduran Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56300
debug: classified in
03-filenames_plain1 by
'libexec/'
When zpool status -x reports errors, the output only shows basic error counts without identifying which files are affected. Replace the unconditional echo of the brief status with verbose output (zpool status -v) in the error path so administrators can see exactly which files have been damaged. The healthy/no-pools path still shows the brief status. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223243 Signed-off-by: Po Han Chen <hypery11@gmail.com> Reviewed by: imp, jlduran, asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/2089
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Extend pmcstat -R output to include the raw TSC for each decoded record and print tsc_freq from the initialize record so TSC deltas can be converted to elapsed time. Update the pmcstat documentation to describe the decoded output and the architecture-specific TSC behavior. Sponsored by: AMD Signed-off-by: Andre Silva <andasilv@amd.com> Reviewed by: imp, mhorne, Ali Mashtizadeh Pull Request: https://github.com/freebsd/freebsd-src/pull/2085
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The -t option gives the user the ability to create a control device for a given virtual_oss(8) instance, so that the instance's configuration can be manipulated during runtime with virtual_oss_cmd(8). As is expected, the control device's name is not known, since it is specified by the user. This patch introduces a virtual_oss_default_control_device rc variable, which defaults to "vdsp.ctl". The goal of this is that third-party programs and scripts can access the control device of the default virtual_oss(8) configuration without guessing. This is especially useful for sbin/devd/snd.conf which deals with hot-swapping sound devices using virtual_oss(8). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55670
debug: classified in
03-filenames_plain1 by '['libexec/',
'sbin/']'
Currently it is only needed by powerpc ofwfdt.c, and defined statically
there. Make it available as part of libofw, mirroring what we have in
the kernel.
Two small tweaks are made to the implementation:
1. Return type is changed to bool
2. Return 'true' when OF_getproplen() == 0. This matches the expected
semantics of the kernel version, described in OF_hasprop(9).
Reviewed by: manu, imp, adrian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56429
debug: classified in
03-filenames_plain1 by 'stand/'
RFC 4191 section 3.1: if the received route's lifetime is zero, the route is removed from the Routing Table if present. Also, do not tell route information option is unknown. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263982 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55448
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
i messed up when we added support for names on these things. the
id and names are each supposed to be unique, which is checked by
putting the one limiter into an rb tree based on their id and another
based on their name. unfortunately i used the same RBT_ENTRY fields
for both trees, which meant using both trees on the same limiter
corrupted the topology, which goes badly when you want to use
multiple limiters.
found by, tested, and ok dgl@ (who is not me, this is not a typo)
ok jmatthew@
Obtained from: OpenBSD, dlg <dlg@openbsd.org>, f951d642cc
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by 'sbin/'
bi_load itself loads various things into the staging area which can cause it to grow, which may result in the staging area moving, including the kernel. Therefore the address we get for the kernel entry point prior to bi_load may not be correct afterwards when we actually call it, and so we must defer the translation. On arm and riscv (but not arm64, which predates both of them in loader.efi and did not gain a copy of arm's added printf when arm support was added) we also printf this entry point to the console, which we can no longer do since bi_load calls ExitBootServices, so remove this printf that, in practice, seems to not be so useful, given nobody ever felt the need to add it to arm64. If anyone really feels this is an important printf to have then bi_load will need to be split so we can call printf after all the loading and potential reallocation of the staging area, but before ExitBootServices is called. We may also want to make this code more uniform and shared between the three architectures here, since there isn't much architecture-specific about this (and something like the RISC-V boot hart protocol could easily be made an MD hook). Reviewed by: imp Fixes: https://cgit.freebsd.org/src/commit/?id=0cafabf97fae ("Add support for arm64 to loader.efi and boot1.efi") Fixes: https://cgit.freebsd.org/src/commit/?id=ea7796a9ae6b ("EFI: don't call printf after ExitBootServices, since it uses Boot Services") Fixes: https://cgit.freebsd.org/src/commit/?id=2192efc03bc4 ("RISC-V boot1.efi and loader.efi support") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56431
debug: classified in
03-filenames_plain1 by 'stand/'
Since this original comment was written, the actual issue in SLOF was diagnosed and documented in commit 424089a0fc, which fixed it for loader(8). Update the comment in boot1 to be more informative to future readers. MFC after: 3 days Reviewed by: jhibbits, adrian Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56470
debug: classified in
03-filenames_plain1 by 'stand/'
ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process incoming replies. When these options fail, replies are silently dropped and ping6 appears to hang. Use err(3) instead of warn(3) so the user gets a clear error and immediate exit. Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: pouria, jlduran, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56237
debug: classified in
03-filenames_plain1 by 'sbin/'
reloc_ptr() skips relocations for the kernel module, because on most platforms the kernel is ET_EXEC and this is not required. On PPC, the kernel is ET_DYN and we need to relocate here, otherwise the module metadata will not be loaded properly and the kernel module will have an incorrect version, preventing module dependencies from resolving. This fixes loading kernel modules from loader.conf on powerpc. Diagnosed by: jrtc27 Reviewed by: jrtc27, adrian Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56457
debug: classified in
03-filenames_plain1 by 'stand/'
The -d option was indented with spaces instead of tabs, and this broke formatting. Before: -d Enable debugging of rc.d scripts -j Perform actions within the named jail After: -d Enable debugging of rc.d scripts -j Perform actions within the named jail MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The `pfctl -S` flag was added to disable DNS resolution in <https://reviews.freebsd.org/D50724> but documentation and error messages refer to a `pfctl -N` flag for the same purpose. The `pfctl -N` flag performs an unrelated function, so the docs and error messages need to be changed. Caught this when revising documentation for the `-N` flag. Reviewed by: kp Signed-off-by: Ross Williams <ross@ross-williams.net>
debug: classified in
03-filenames_plain1 by 'sbin/'
After we found some preloaded z_initfirst object, we must process till the end of the preload list still, not stopping on the first found object. Reported by: des Reviewed by: des, markj, siderop1@netapp.com Fixes: https://cgit.freebsd.org/src/commit/?id=78aaab9f1cf359f3b7325e4369653f6b50593393 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56466
debug: classified in
03-filenames_plain1 by
'libexec/'
Initialize nla_geneve_link structure to zero to prevent segfault when a TLV is not received by the netlink parser. Reported by: Seth Hoffert <seth.hoffert@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=688e289ee904 ("ifconfig: Add support for geneve (netlink)")
debug: classified in
03-filenames_plain1 by 'sbin/'
Also treate ':' at the start of a line as for '#' ie. a comment.
debug: classified in
03-filenames_plain1 by
'libexec/'
Treat '#' as a comment anywhere, but ':' only at start of line.
debug: classified in
03-filenames_plain1 by
'libexec/'
rather than with read() to alleviate concerns about partial reads.
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Use "read -r" to set the root password in "bsdinstall rootpass" to prevent issues with passwords containing one or more backslash characters. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294781 Discussed with: tuexen, crest Approved by: khorben MFC after: 3 days Event: Wiesbaden Hackathon 202604
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
* Get certdata.txt directly from the NSS Mercurial repository, rather than from the Mozilla Firefox repository which imports it from NSS at irregular intervals. * Instead of always fetching the latest certdata.txt, fetch a specific version. For this commit, we set this to the version that was last imported in May 2025. * Add a refrence to the MPL to the generated files. * Regenerate with latest OpenSSL. This is purely cosmetic; mostly, the certificate names now contain less unnecessary whitespace and some elements are quoted. MFC after: 1 week Reviewed by: michaelo, kevans Differential Revision: https://reviews.freebsd.org/D56620
debug: Commit manually moved from "unknown" to "admin".
Regenerate using certificate data from NSS 3.123.1. MFC after: 1 week Reviewed by: kevans
debug: Commit manually moved from "unknown" to "admin".
mixer(8): Deprecate some unintuitive control values
This is a follow-up to cc7479d7dc9b ("mixer(8): Improve mute and recsrc
controls"). These deprecated values will be completely removed on
2026-06-15.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: 0mp
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/21
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
mixer(8) tests: Remove tests for deprecated control values Fixes: https://cgit.freebsd.org/src/commit/?id=a28bb575c89c ("mixer(8): Deprecate some unintuitive control values") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'usr.sbin/.*/tests/.*'
debug: moved to admin because
'Need to be grouped with
a28bb575c89c8de62684419ece1ff5e070e4ce24'
Reviewed by: emaste Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Manually tuning ZFS for systems with <8GB ram hasn't been necessary at least since the switch to OpenZFS. We have users reporting using 1GB RAM with no manual tuning/issues. Further, the page this links to is a stale wiki page, which is causing complaints. Remove this misleading note and replace it with a similar message for UFS. While here, reword that note to be a bit clearer. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287719 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D50971
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Also rework a bit the way device path are displayed for consistency. Signed-off-by: stephane.rochoy@stormshield.eu Reviewed by: imp Sponsored by: Stormshield Pull-Request: https://github.com/freebsd/freebsd-src/pull/2167
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Log via syslog when snprintf truncates the crontab path, instead of silently skipping the entry. Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: bcr, kevans Differential Revision: https://reviews.freebsd.org/D56235
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
dhclient: Check for unexpected characters in some DHCP server options Some options are written directly to the lease file, which may be parsed by subsequent dhclient invocations. We must make sure that a malicious server can't control the "medium" field of a lease definition, otherwise they can achieve RCE by injecting one into the lease file, whereupon it will be passed to dhclient-script, which passes it through eval. Approved by: so Security: FreeBSD-SA-26:12.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/)
debug: classified in
03-filenames_plain1 by 'sbin/'
dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Fixes: https://cgit.freebsd.org/src/commit/?id=8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740
debug: classified in
03-filenames_plain1 by 'sbin/'
When the number of DHCP options exceeds a threshold, script_set_env() will reallocate the environment, stored as an array of pointers. The calculation of the array size failed to multiply by the pointer size, resulting in a smaller than expected buffer which admits out-of-bounds writes. Approved by: so Security: FreeBSD-SA-26:15.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/)
debug: classified in
03-filenames_plain1 by 'sbin/'
Encode filenames in the VIS_CSTYLE | VIS_OCTAL style regardless of output mode. When reading filenames from a checksum file, attempt to decode them, and use the decoded name unless the decoded name does not exist but the undecoded one does. This breaks compatibility with GNU coreutils, which unfortunately uses a non-reversible encoding when outputting filenames containing non-printable characters. While here, drop a sentence about preimage attacks against MD5 and SHA1 from the manual page, as I no longer trust it to be true. MFC after: 1 week Reviewed by: bcr, markj Differential Revision: https://reviews.freebsd.org/D56615
debug: classified in
03-filenames_plain1 by 'sbin/'
For some reason, we've incorrectly calculated the size of the CRB data buffer register. There's no need to divide the CRB data buffer size by 4. We should allow access to the whole buffer instead. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/2169
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Due to misplacement of the second -L argument of diff command, it is treated by getopt_long as an error. Also add -l option for a diff command that alters the way it shows differences. Instead of printing full diff, it reports changed file the same way as added/removed files are reported. Reviewed by: imp Obtained from: Yandex LLC MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56708
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Kernel timestamps are relative to kern.boottime. With -t, kern.boottime is added and converted to either a default format or the one specified using the -f option. Signed-off-by: Andre Albsmeier <mail@ghub.e4m.org> Reviewed by: kib, pouria Discussed with: imp Pull-Request: https://github.com/freebsd/freebsd-src/pull/1985
debug: classified in
03-filenames_plain1 by 'sbin/'
Add an example for allowing members of the network group to read from bpf devices. In particular, this allows members of the network group to monitor traffic without running with root privileges. Reviewed by: markj, glebius Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56742
debug: classified in
03-filenames_plain1 by 'sbin/'
Get the next hops of the specified route. route.8 manual will be updated when other actions for this option are implemented. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56191
debug: classified in
03-filenames_plain1 by 'sbin/'
ping: use CLOCK_REALTIME for ICMP Originate Timestamp RFC 792 defines the ICMP Originate Timestamp field as milliseconds since midnight UTC. However, ping(8) currently derives this value from CLOCK_MONOTONIC, which represents time since an unspecified starting point and is not related to UTC. The issue was introduced by commit 1ad76f1b6047, which replaced gettimeofday(2) with clock_gettime(CLOCK_MONOTONIC) for timekeeping in ping(8). Fix this by using CLOCK_REALTIME when generating the ICMP originate timestamp. Before: $ ping -Mt -c1 127.0.0.1 ICMP_TSTAMP PING 127.0.0.1 (127.0.0.1): 56 data bytes <...> time=0.061 ms tso=16:50:31 tsr=17:38:28 tst=17:38:28 (note the tso is off) After: $ ping -Mt -c1 127.0.0.1 ICMP_TSTAMP PING 127.0.0.1 (127.0.0.1): 56 data bytes <...> time=0.038 ms tso=17:42:09 tsr=17:42:09 tst=17:42:09 Reviewed by: asomers, glebius Fixes: https://cgit.freebsd.org/src/commit/?id=1ad76f1b6047 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56759
debug: classified in
03-filenames_plain1 by 'sbin/'
tests/ping: Fix date(1) invocations Fixes: https://cgit.freebsd.org/src/commit/?id=069681afd58a ("ping: use CLOCK_REALTIME for ICMP Originate Timestamp")
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
debug: moved to admin because
'Need to be grouped with
069681afd58a711eb7407be4a9c9a05f787d250f'
The FreeBSD-base bits are accessible via pkg.FreeBSD.org, even for releases, so there is no need to point at pkgbase.FreeBSD.org. MFC after: 3 days
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This is useful for testing alternative service managers without modifying /etc/rc MFC After: 1 weeks Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56828
debug: classified in
03-filenames_plain1 by 'sbin/'
Ever since certctl was rewritten in C, the rehash command has reingested TRUSTDESTDIR / UNTRUSTDESTDIR in addition to TRUSTPATH / UNTRUSTPATH. This seemed like a good idea at the time but was, in retrospect, a mistake, as it means a (un)trusted certificate remains (un)trusted forever (or at least until it expires) even if it is removed from (UN)TRUSTPATH. Among other issues, it causes ports QA to fail for any port that either installs certificates or depends on a port that does. Although this behavior was undocumented, the change may surprise users who have added certificates manually, so update the manual page to point it out and add prominent warnings to the trust and untrust commands. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290078 MFC after: 1 week Reviewed by: kevans, bcr Differential Revision: https://reviews.freebsd.org/D56617
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Previously, devmatch would stop at the first linker.hints file found in kern.module_path. This meant modules installed in /boot/modules/ were invisible to devmatch if /boot/kernel/ contained a linker.hints file (which it always does). Merge hints from all directories in kern.module_path. This allows third-party or out-of-tree kernel modules in /boot/modules/ to be auto-loaded by devmatch just like built-in modules. Reviewed by: imp Differential Revivion: https://reviews.freebsd.org/D56847
debug: classified in
03-filenames_plain1 by 'sbin/'
If anyone would build bhyve with -DNDEBUG, any code in the expression in assert() won't be executed. Instead put the return value in a temporary variable to assert that it has the expected value. Reviewed by: emaste, markj (earlier version) Fixes: https://cgit.freebsd.org/src/commit/?id=2a514d377b37 ("bhyve/virtio-scsi: Preallocate all I/O requests") Differential Revision: https://reviews.freebsd.org/D55803
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Currently rtadvd ignores interface pltime/vltime specifications unless the (static) address range is also included in the config file. This extends the validity of a pltime and/or vltime stanza in the config file for an interface to delegated addresses from an upstream provider. Signed-off-by: tickerguy <karl@denninger.net> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288426 Reviewed by: pouria Pull Request: https://github.com/freebsd/freebsd-src/pull/1863
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This fixes a regression introduced in cae280931c9e which prevents user_data as a shell script to be used PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295062 Reported by: Ross McKelvie <ross@exitzero.uk> MFC After: 1 day
debug: classified in
03-filenames_plain1 by
'libexec/'
Ensure the script used is invalid when parsed by libyaml which highlight the issue revealed in PR295062 while at here validate the mode of the file is properly changed PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295062 MFC After: 1 day
debug: classified in
03-filenames_plain1 by
'libexec/'
The jail(8) command must not leave parsed configuration files open since the file descriptors will be leaked to child processes including the untrusted exec.start or exec.stop hooks. While fopen() doesn't provide direct access to O_CLOEXEC, it does provide access to FD_CLOEXEC via "e" in the mode string which provides the desired defense in depth against leaking file descriptors into exec.* hooks since those always execve() into a shell. Jail configuration is potentially sensitive and some hooks execute from within the jail context, leaving some opening for the jail to exfiltrate information about the host environment. (Commit message wordsmithed by kevans) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295052 Reviewed by: kevans MFC after: 3 days
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This protects against accidentally leaking them past fork()+exec() in future refactorings. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295052 Reviewed by: kevans
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Avoid dependency on INET (IPv4) by using PF_LOCAL, allowing media check to work on systems without INET support. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295045 Reviewed by: kevans MFC after: 1 week
debug: classified in
03-filenames_plain1 by 'sbin/'
The FreeBSD network stack, for better or worse, does not impose any requirements on interface names. As such it's valid for an interface name to start with a number (or indeed, be something like '⭐'). Allow this in pfctl, and add a test case for the specific case of interface names starting with a number. Note that we don't support UTF-8 names fully, so those may still fail. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295064 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
03-filenames_plain1 by 'sbin/'
When fsck_msdosfs runs with FAT32 cache mode (used for large filesystems that cannot be mmap'd), a detected FAT header correction was written into the in-memory buffer but the corresponding cache entry (fat32_cache_allentries[0]) was never marked dirty. As a result, fat_flush_fat32_cache_entry() skipped it, the corrected bytes were never written to disk, and copyfat() propagated the uncorrected on-disk data to all backup FAT copies. Every subsequent fsck run would repeat the same "FAT starts with odd byte sequence / FIXED" cycle indefinitely. Fix by marking fat32_cache_allentries[0].dirty = true after applying the in-memory correction, ensuring the chunk is flushed before copyfat() runs. Obtained from: https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/4047981 MFC after: 3 days
debug: classified in
03-filenames_plain1 by 'sbin/'
This is only used by rc.subr and belongs in rc, not runtime. Fixes: https://cgit.freebsd.org/src/commit/?id=fa6d67cd16b5 ("BSD.root.dist: Add package tag for all directories") MFC after: 3 days Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D56900
debug: classified in
03-filenames_plain1 by 'etc/'
Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D56908
debug: classified in
03-filenames_plain1 by 'stand/'
nuageinit: add decode_base64 tests
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add addsudo tests
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add adddoas tests
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add update_sshd_config tests
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix dirname('/') returning nil instead of '/'
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add dirname edge case tests
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add config2_network DNS services test
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add nil/empty guard to decode_base64() Return an empty string when input is nil or zero-length instead of processing it through the decoding loop.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add hostname validation (RFC 952/1123) to sethostname() Validate hostnames before writing them: - Reject empty hostnames - Reject hostnames longer than 253 characters - Reject hostnames with invalid characters - Reject hostnames starting or ending with dot/hyphen - Reject labels longer than 63 characters - Reject labels starting or ending with hyphen Expand the sethostname test to cover all rejection cases. Update nuage.sh sethostname_body to ignore stderr (warnings).
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: remove dead checkgroup(), inline check in purge_group() Call getgroups() once instead of N times per call. Inline the membership check directly, removing the now-unused checkgroup() helper function.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix non-standard f:close(cmd) and remove dead precmd - f:close(cmd) -> f:close() in adduser() and exec_change_password(): the 'cmd' argument is not standard Lua and is silently ignored. - Remove dead 'precmd' variable in adduser().
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix TOCTOU in addsshkey, adddoas, addsudo Replace check-then-create patterns with direct creation: - addsshkey: check what exists before creation, use mkdir_p() for .ssh directory, handle errors with warnmsg() instead of assert(). Apply chmod/chown only on newly created files/directories. - adddoas: same pattern for doas.conf and the etc directory. - addsudo: same pattern for the sudoers file and sudoers.d directory. All three functions now use warnmsg() for error handling instead of returning nil,err or using assert().
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix update_sshd_config crash when file does not exist Previously update_sshd_config() would assert-fail if sshd_config did not exist. Now it creates a new file with the given key/value. Also replace the fragile simultaneous r+ + temp file approach with a cleaner read-then-write pattern: read all lines into memory, modify as needed, then write to a temp file and rename. All assert() calls replaced with proper error handling via warnmsg(). Add test case for missing file creation.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: refactor goto abuse in chpasswd() Replace goto next/list pattern with proper elseif/else control structure. The goto-based flow was fragile and hard to follow; the elseif chain makes the validation logic explicit and linear.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: complete SSH support with ssh_deletekeys and disable_root Add missing SSH cloud-config options from cloud-init spec: - ssh_deletekeys: remove existing SSH host keys on first boot so new ones are generated automatically by sshd(8). Implemented as delete_ssh_host_keys() in nuage.lua using lfs.dir() with a directory existence guard via lfs.attributes(). - disable_root: set PermitRootLogin to 'no' (or a custom value via disable_root_opts) in /etc/ssh/sshd_config. - disable_root_opts: optional string or array to override the PermitRootLogin value used when disable_root is true. Only the first array element is used.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: use single-quote shell escaping for hostname in rc.conf.d The hostname value was written inside double quotes in /etc/rc.conf.d/hostname. POSIX shell performs command substitution inside double quotes, so a hostname containing $() or backticks would be executed when the file is sourced (e.g., by rc(8)). Switch to using the existing shell_escape() helper, which wraps values in single quotes. In POSIX shell, single-quoted strings are completely literal — no expansion or substitution of any kind is performed. While the hostname is already validated to contain only [a-zA-Z0-9.-], this change provides defense-in-depth so the output format is safe regardless of future validation changes. Reported by: Yazdan Soltani <yazdan.soltani@gmail.com>
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix shell command injection in multiple rc.conf.d writes
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: fix shell injection in power_state_change delay and add test
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: validate set-name to prevent shell injection in variable names Shell variable names cannot be safely quoted with shell_escape() — only alphanumeric characters are valid. Add validation that set-name only matches [a-zA-Z0-9]+; invalid values are rejected with a warning and the rename is skipped entirely.
debug: classified in
03-filenames_plain1 by
'libexec/'
- Add shell_escape() helper to safely escape shell arguments - Apply shell_escape to all user-controlled values in shell commands: adduser (usershow, useradd, lock, primary_group, groups) addgroup (groupshow, groupadd, members) exec_change_password (usermod) settimezone (tzsetup root and timezone) install_package (pkg package names) - Escape double quotes in hostname when writing rc.conf.d/hostname - Add missing 'local' declaration for resolvconf_command in nameservers() - Escape interface name in resolvconf -a command - Change open_resolvconf_conf() from 'w' to 'a' mode to prevent data loss when nameservers() is called multiple times - Clean up stale resolvconf.conf at the start of each boot (skip on postnet to preserve config written by first call) MFC After: 1 day
debug: classified in
03-filenames_plain1 by
'libexec/'
"bsdinstall script" will now do a pkgbase installation by default. The system components to install can be specified in the COMPONENTS variable, and have the same names as those used in the interactive installer. bsdinstall will still do a legacy distset installation if DISTRIBUTIONS is defined in the installerconfig file. MFC: 1 week PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290375 Sponsored by: ConnectWise Reviewed by: ziaee, ivy, jduran Differential Revision: https://reviews.freebsd.org/D56717
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This is needed at least for MAX() and PATH_MAX. MFC after: 1 week
debug: classified in
03-filenames_plain1 by 'sbin/'
Required for MAXPATHLEN and MAXLOGNAME. MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
MFC after: 1 week
debug: classified in
03-filenames_plain1 by 'sbin/'
- gjournal.c needs param.h to get a definition of isclr(). - fsck.h needs signal.h for sig_atomic_t. Sort includes while here. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56858
debug: classified in
03-filenames_plain1 by 'sbin/'
Make the behaviour similar for both IPv4 and IPv6. Also add the corresponding tests. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294733 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56618
debug: classified in
03-filenames_plain1 by 'sbin/'
Teach limits(1), sh(1), and setclassresources(3) about RLIMIT_VMM. Fixes: https://cgit.freebsd.org/src/commit/?id=1092ec8b3375 ("kern: Introduce RLIMIT_VMM") Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D57031
debug: Commit manually moved from "unknown" to "admin".
For Realtek we only add new entries. For Intel the old way of extracting IDs from the driver no longer works. The new list is shortened as we drop more specific entries which were already covered by wildcard entries. The new lists are also sorted within the groups. There are 4 entries the new driver no longer carries but are still present in older versions, so we keep them manually. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
We already run `certctl rehash` at the end, there is no point in asking users upgrading from 15.0 to 15.1 to manually merge the trust store. MFC after: 3 days Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D57028
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
safe_set is the routine that does all the work. In safe_set; if we replace one=`cmd arg` or two=$(cmd arg) add quotes around the result eg. one="_cmd arg_" Also lines containing `` or $() are too likely to result in syntax errors, so just delete them. Differential Revision: https://reviews.freebsd.org/D56795
debug: classified in
03-filenames_plain1 by
'libexec/'
The wlanconfig utility is not careful about handling untrusted network names, which can contain shell metacharacters. Factor network selection into a subroutine and use the `set -- "$@"` trick to build up a list of positional parameters for bsddialog without evaluating them. Approved by: so Security: FreeBSD-SA-26:23.bsdinstall Security: CVE-2026-45255 Reported by: Austin Ralls Reviewed by: dteske, des, asiciliano Differential Revision: https://reviews.freebsd.org/D56973
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The f_menu_wpa_scan_results() function returns a list of networks discovered by a scan. The untrusted network names are evaluated in f_dialog_menu_wireless_edit. The quoting applied in f_menu_wpa_scan_results() protects against evaluation of something like "$(whoami)" but one can add single quotes to defeat that. Pass the SSID names through f_shell_escape to work around this. Escape single quotes in f_dialog_wireless_edit() and f_menu_wireless_configs() too for consistency. I note that this module doesn't seem to actually work, see e.g., bugzilla PR 229883. Approved by: so Security: FreeBSD-SA-26:23.bsdinstall Security: CVE-2026-45255 Reported by: Austin Ralls Reviewed by: dteske, des Differential Revision: https://reviews.freebsd.org/D56974
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
route(8): Show metric value in get route Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56325
debug: classified in
03-filenames_plain1 by 'sbin/'
route(8): Show metric value in monitor route Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56326
debug: classified in
03-filenames_plain1 by 'sbin/'
route(8): Add metric argument Add support for metric in route command. Differential Revision: https://reviews.freebsd.org/D56335
debug: classified in
03-filenames_plain1 by 'sbin/'
pselect(2) might overflow if the desciptor number is above FD_SETSIZE and silently corrupt the stack. Switch to ppoll(2) so the receive socket fd is no longer constrained by FD_SETSIZE. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D56721
debug: classified in
03-filenames_plain1 by 'sbin/'
Also fix the corresponding tests. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263240 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57010
debug: classified in
03-filenames_plain1 by 'sbin/'
Make sure the user is part of the audio group to avoid unintended snooping of loopback audio by unprivileged users. While here, retire voss_dsp_perm, since we don't use the same value everywhere now. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The loopback device allows us to record desktop sound by reading from it, or even use it as an input device, for example during a call. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/16
debug: classified in
03-filenames_plain1 by
'libexec/'
Reviewed by: christos Fixes: https://cgit.freebsd.org/src/commit/?id=70e27ecba518 (virtual_oss: Introduce virtual_oss_default_control_device rc variable) Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/36
debug: classified in
03-filenames_plain1 by 'sbin/'
In send_[rw]rq(), we were using strlcpy() to avoid overflowing our packet buffer, then failing to check the result and blithely advancing our pointer by the full length. Luckily, this code is only ever used by tftp(1), not tftpd(8). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57075
debug: classified in
03-filenames_plain1 by
'libexec/'
The first argument is always the function name, for which we can simply use __func__. This leaves only the optional return value, so we can use a single variadic macro instead of two nearly-identical copies. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57076
debug: classified in
03-filenames_plain1 by
'libexec/'
nvlist_take_string_array(9) takes ownership of the array and its strings. casper_ttymsg() freed neither, leaking memory on every F_CONSOLE and F_TTY message. On long-running systems with high error-rate syslog traffic routed to /dev/console, syslogd.casper grew to hundreds of MB. Use nvlist_get_string_array(9) to borrow the array instead. Update casper_wallmsg() similarly. Approved by: src (des) Closes: https://github.com/freebsd/freebsd-src/pull/2222 Fixes: https://cgit.freebsd.org/src/commit/?id=61a29eca550b ("syslogd: Log messages using libcasper") MFC after: 3 days MFC to: stable/15 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295488 Reported by: Pat Maddox <pat@patmaddox.com> Reviewed by: markj Tested by: dch
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
When pxeboot gets a 0 as a port number from portmapper (indicating an error), it currently happily sends NFS packets to the server's port 0 in an endless loop. Change this to instead bail out with a useful message. This happens, for example, with recent Linux NFS servers as many distributions switched to TCP only NFS serving by default. FreeBSD's pxeboot must have UDP. In this situation pxeboot asks the server's portmapper for the UDP NFS port and since there is none gets 0. Also add a hint to the manpage explaining this and how to fix it. Reviewed by: ziaee, kevans, imp
debug: classified in
03-filenames_plain1 by 'stand/'
* Instead of an error string, return the usual 0 or -1 and let the caller figure out what, if anything, to tell the user. * Avoid string manipulations by opening /dev first and using openat() with O_RESOLVE_BENEATH. * Add a boolean argument which, if false, causes ttymsg() to return without sending the message if the tty's group-writable bit is not set. This saves programs that respect this setting (like syslogd(8)) from having to check before calling ttymsg(). * Update all callers. The observable effect of this change is minimal except for slightly different error messages when ttymsg() fails. However, syslogd(8) will no longer print spurious error messages on the console after trying and failing to write a log message to an X11 session. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295171 MFC after: 1 week Reviewed by: jfree, markj Differential Revision: https://reviews.freebsd.org/D57018
debug: Commit manually moved from "unknown" to "admin".
This has been broken since IPv6 support was added in 2000. We would validate the port number (which had to be a port number, but can now also be a service name) and then ignore it. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=08829865f659 ("IPv6 support for lpr.") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57181
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
lpd: Drop deprecated -p option This alias for the -s option has been deprecated since 2002. Time to drop it from the documentation. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57183
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
lpd: Avoid buffer overflow when sending a job When forwarding a print job to a remote server, we could overflow the command buffer if a control or data file had a very long name. MFC after: 1 week Reported by: Joshua Rogers <joshua@joshua.hu> Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57184
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
lpd: Fix issues reported by clang-analyzer Also, unlink our temporary file if we fail to chmod it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57185
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
bhyve/virtio-scsi: Support for multiple targets Currently, virtio-scsi supports only one target with 16383 LUNs, which fits nicely with what CTL provides. It would be useful to support more than that, multiple targets each with 16383 LUNs. While this can be useful with CTL by attaching each target to another CTL target port, this will be necessary to support SCSI passthrough. The new syntax for configuring targets will look like this: -s X,virtio-scsi,target=/dev/foo,target=/dev/bar,target=4:/dev/baz This will create the following configuration nodes: pci.0.X.0.device=virtio-scsi pci.0.X.0.target.0=/dev/foo pci.0.X.0.target.1=/dev/bar pci.0.X.0.target.4=/dev/baz The existing configuration syntax is still understood for compatibility: (1) -s X,virtio-scsi (2) -s X,virtio-scsi,/dev/foo (3) -s X,virtio-scsi,dev=/dev/foo This will create the following configuration nodes: pci.0.X.0.device=virtio-scsi (1, 2, 3) pci.0.X.0.target.0=/dev/cam/ctl (1) pci.0.X.0.target.0=/dev/foo (2, 3) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53221
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
bhyve/virtio-scsi: Implement task management functions Currently, all I/O requests are queued internally, and a number of threads will pick I/O requests of the queue and send them to CTL with a synchronous CTL_IO ioctl. On the other hand, TMF requests are sent to CTL immediately using the same synchronous ioctl. Besides being unworkable for non-CTL backends such as for SCSI passthrough, this simple approach may easily run into situations where a TMF request operating on a particular I/O request is sent to CTL while it is still on our queue and thus unknown to CTL. In addition, for target and/or LUN resets we should really clear our queue and return all outstanding I/O requests with a proper status. Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53222
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
bhyve/virtio-scsi: Support multiple backends In order to support multiple backends for virtio-scsi, we should isolate the core of virtio-scsi from the backend-specific code. The existing interface to CTL will become the new "CTL" backend for virtio-scsi. Care has been taken to keep compatibility with previous configurations: The first backend linked (CTL) will be the default backend if none is specified, and it does provide a default configuration if no further options such as targets are explicitly configured. Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53223
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
bhyve/virtio-scsi: Make all I/O processing parameters configurable
This includes:
- seg_max, the number of segments allowed in a single command
- {ctl,evt,req}_ringsz, the number of descriptors in a queue
- thr_per_q, the number of processing threads per request queue
- num_queues, the number of request queues
Reviewed by: markj
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D54073
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
nanobsd: Use NANO_IMG1NAME Do not hard-code _.disk.image, use NANO_IMG1NAME instead. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57040
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Get the code size by its partition index Previously the code was assumed to be on the on the first line of the _.partitioning file. Instead, explicitly look up the size by its partition index to make the parsing order-independent. The _.partitioning file: 1. First column: starting sector. 2. Second column: size in 512-byte sectors. 3. Third column: partition index. Get the code size by explicitly selecting when the partition index is 1. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57216
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Remove spurious exit call Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57217
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Use rounded sizes for cfg and data slices Use the calculated (rounded up) cfg and data sizes from the _.partitioning file, instead of consuming them directly from the global variables. We obtain the size of the cfg and data slices by explicitly searching for index 3 and 4 respectively in the _.partitioning file. This ensures that the final image has the rounded-up sizes, and not the raw sizes. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57219
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Account for metadata overhead in code slice The code slice size (CODE_SIZE) includes 16 sectors reserved for disk metadata (see bsdlabel(8) offset). Subtract these 16 sectors from the total size passed to nano_makefs. This prevents the generated filesystem from consuming the entire slice allocation, ensuring there is enough space for the metadata without overflowing the partition boundary. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57220
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Offset code partition to a track boundary Ensure the primary and secondary code partitions start at a proper track boundary by applying a NANO_SECTS offset in bytes. While track-boundary alignment is largely obsolete on modern storage, this change maintains compatibility with current images (legacy). A future commit will transition to 1 MiB alignment boundaries. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57221
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Explicitly set image size and secsz in mkimg When building an unprivileged NanoBSD image, explicitly set the desired image size, by passing --capacity to mkimg in bytes, and the logical sector size (-S) to 512 bytes. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57222
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Refactor secondary code partition logic Rearrange the conditional logic for building the secondary code slice (altroot). Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57223
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Fix code image size formatting mkimg(8) parses sizes using expand_number(3). It is an error to use "b" as a suffix. This is the result of a confusion with makefs(8), which uses NetBSD's strsuftoll(3). Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57224
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Use makefs -R flag to honor rounded sizes Switch from the min/max size flag (-s) to the round-up flag (-R) when invoking makefs(8). Because the partition sizes passed to nano_makefs have already been rounded up by calculate_partitioning(), using -s can cause makefs to try to perform sizing adjustments that usually result in failures. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57225
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Adjust the order of the flags in makefs The order of the flags matter in makefs(8). The -t (type) flag must come before the -o (options) flag; otherwise, the options are reset. Move the -t flag before the -o flag and remove the shim function _xxx_adjust_code_size() that was created to align to the default makefs FFS values. It effectively prevented us from generating NanoBSD images using unprivileged builds with the partitions internally aligned as intended. Reviewed by: senguptaangshuman17_gmail.com, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57226
debug: classified in
05-summary-prefix by 'nanobsd:'
nanobsd: Register the boot.config file in the metalog Ensure that the boot.config file gets an entry in the metalog by tgt_touch()ing it. If a file is not present in the metalog, it gets excluded from the final image when using "-U" (unprivileged builds). MFC after: 2 weeks
debug: classified in
05-summary-prefix by 'nanobsd:'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
This doesn't really matter, as we trust that the installer tarballs are not malicious, but it doesn't hurt to set these flags. Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57274
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
rc: virtual_oss: Define some variables in rc.conf They will now be part of /etc/defaults/rc.conf and be accessible by sysrc(8). Fixes: https://cgit.freebsd.org/src/commit/?id=70e27ecba518 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable") PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295560 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Reqeust: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
debug: classified in
03-filenames_plain1 by
'libexec/'
rc: virtual_oss: Wait for process to exit Sometimes virtual_oss processes do not exit immediatelly. If we do not wait for the processes to fully exit before returning from virtual_oss_stop(), then the service restart operation might call virtual_oss_start() too early and fail, because it will think the service wasn't stopped and is still running. Reported by: jrm Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
debug: classified in
03-filenames_plain1 by
'libexec/'
rc: virtual_oss: Handle absent pidfile properly Instead of throwing errors from the programs that use it, print a warning if the file does not exist. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: 0mp, jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
debug: classified in
03-filenames_plain1 by
'libexec/'
rc: Fix improper use of load_kld Fix scripts that needlessly used -e when the simpler -m would work, or that used -m when the module and file name are the same, or, in one particularly egregious case, used -m with the wrong name when using nothing at all would have worked just fine. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57705
debug: classified in
03-filenames_plain1 by
'libexec/'
rc: Improve load_kld * Centralize the usage message. * Document and enforce that -e and -m are mutually exclusive; previously, speficying both would result in only -e being applied. * If -e was not specified, and -m was not specified or did not match, fall back to `kldstat -n file` which will always work for modules that aren't built into the kernel. This means the kld and ntpd scripts can now rely on load_kld to dtrt. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57706
debug: classified in
03-filenames_plain1 by
'libexec/'
rc: Make devmatch use load_kld The default behavior of load_kld is now robust enough for devmatch. Switching means settings from /etc/sysctl.kld.d are now properly applied when the corresponding modules are loaded by devmatch. While here, reduce the amount of output produced by devmatch from one line per module to a single line. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57707
debug: classified in
03-filenames_plain1 by
'libexec/'
This particular calls swaps the samples and maxchan arguments, which can cause a buffer overflow in p_ch_chain if maxchan exceeds its bounds (VMAX_CHAN). Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
When saving a coredump, savecore(8) maintains .last symlinks for the info and vmcore artifacts, but not for the crashinfo text report. Make crashinfo(8) create the link, pointing at the current core.txt.<bounds> file. This makes /var/crash/core.txt.last track the same core dump as info.last and vmcore.last. [mhorne: I tweaked the submission, such that the link will be created as soon as the core.txt.X file is generated; not only after a successful report has been written.] Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2199
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Restore exporting DISTRIBUTIONS to make it available to other scripts. Reviewed by: imp, asomers Fixes: https://cgit.freebsd.org/src/commit/?id=dc14ae4217a0 ("bsdinstall: do pkgbase installations with the "script" command") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57319
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
use recommended switch with default case to catch invalid values Reviewed by: kevans, adrian Differential Revision: https://reviews.freebsd.org/D54759
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291867 Reported by: gavin Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=c597432e2297 ("route(8): convert to netlink") Differential Revision: https://reviews.freebsd.org/D57336
debug: classified in
03-filenames_plain1 by 'sbin/'
stand: compile ia32 EFI loader with -malign-double The UEFI spec says: > Structures are aligned on boundaries equal to the largest internal > datum of the structure and internal data are implicitly padded to > achieve natural alignment. Unlike the old Intel EFI toolkit, the EDK2 headers expect ia32 builds to use -malign-double to achive this. Make EFI versions of libsa32, liblua32, and ficl32. With the difference being that they are compiled with -malign-double. Differential Revision: https://reviews.freebsd.org/D55385
debug: classified in
03-filenames_plain1 by 'stand/'
stand/efi/Makefile: fix build order Move liblua32efi and ficl32efi before .WAIT, otherwise there's a race between the interpreter and the loader being built. Reported by: kbowling Discussed with: kevans Fixes: https://cgit.freebsd.org/src/commit/?id=d15cc7625dde9bcb6a63ee59cccf14f3b93b15bf
debug: classified in
02-filenames_wildcards by
'.*Makefile'
debug: moved to admin because
'Need to be grouped with
d15cc7625dde9bcb6a63ee59cccf14f3b93b15bf'
Include `<stdbool.h>` instead of defining a local bool enum. This avoids duplicating a standard type name and keeps the source compatible with headers that provide bool as a macro, or in case of C23 that compilers provide it as keyword. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
03-filenames_plain1 by 'sbin/'
The change to relaxed mode has had too many unintended breakages. Revert back to strict mode until that works for all the cases that are currently broken. Fixes: https://cgit.freebsd.org/src/commit/?id=784150fd2535, https://cgit.freebsd.org/src/commit/?id=d69fc3a9dc71 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295289 Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by 'stand/'
Since virtual_oss is now part of base, there is no reason not to provide
an installer option to enable it, and make it more visible to new users,
who might also benefit from the devd rules in /etc/devd/snd.conf, which
use virtual_oss, as well as 8532b4a43636 ("rc: virtual_oss: Create a
loopback device in the default configuration").
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: ivy
Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/31
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pfctl doesn't like empty anchors (-a ''), but we can specify the root anchor as '/' too, so do that instead. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295324 Tested by: Paweł Krawczyk MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Since IPv6-only setups are becoming more common, and IPv6 connectivity is often sufficient for tasks such as DNS resolution and NTP time synchronization, update defaultroute rc.d script to support IPv6-only environments. Reviewed by: pouria, ae Differential Revision: https://reviews.freebsd.org/D56797
debug: classified in
03-filenames_plain1 by
'libexec/'
This is useful for driving BE changes from the loader command prompt, rather than having to use the menu. Note that the active carousel in the boot environment carousel doesn't currently reflect a switch in boot environments done this way- I'm considering this only a minor bug, as you probably can't or won't go back to the menu if you're using these commands. Reviewed by: imp (previous version)
debug: classified in
03-filenames_plain1 by 'stand/'
While here, remove unnecessary blank lines. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=6d65c91b9a47 ("etcupdate: fix arguments order of diff command") Reviewed by: Boris Lytochkin <lytboris@gmail.com> Differential Revision: https://reviews.freebsd.org/D57330
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: remove duplicate pw_user_add declarations
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: fix uninitialized name pointer in pw_group_del The 'name' variable could be left uninitialized if neither the positional argument nor -n is supplied, leading to undefined behavior when passed to getgroup().
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: fix inverted condition in shell_path error handling
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: fix const qualification in unquote() The unquote() function took a const char * parameter but modified the string in-place (removing quote characters). Change the parameter to char * and update callers that passed const char * to cast explicitly.
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: fix setmode(NULL) crash when homemode is a boolean value
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
pw: fix incorrect metalog path in mkdir_home_parents
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
nuageinit: implement bootcmd support Add support for the 'bootcmd' cloud-config directive, which allows running commands very early in the boot process, before the hostname is set and before the network is configured. - nuageinit: bootcmd() function follows the same pattern as runcmd(), writing commands to /var/cache/nuageinit/bootcmds instead of runcmds. It is the first entry in the pre_network_calls table. - rc.d/nuageinit: execute /var/cache/nuageinit/bootcmds immediately after /usr/libexec/nuageinit completes, before unmounting the config drive. This ensures bootcmd runs before NETWORKING per cloud-init spec.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement manage_etc_hosts support Add support for adding the instance hostname to /etc/hosts on the 127.0.0.1 and ::1 localhost lines, matching cloud-init's default behaviour (manage_etc_hosts: true). create a revolve_hostname helper to avoid code duplucation.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: add tests for bootcmd, ssh_deletekeys, disable_root, manage_etc_hosts
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement mounts support Add support for the 'mounts' cloud-config key which configures mount points by appending entries to /etc/fstab and creating the corresponding directories.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement resolv_conf support Add support for the 'resolv_conf' cloud-config key which writes directly to /etc/resolv.conf.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement keyboard support
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement ssh_authkey_fingerprints support Add support for the 'ssh_authkey_fingerprints' cloud-config key which logs SSH host key fingerprints to the console via ssh-keygen.
debug: classified in
03-filenames_plain1 by
'libexec/'
The common case for etcupdate is to run it after building and installing the world, in which case we already have an object directory to draw on. Add a -b option to turn nobuild off (opposite of -B), and turn nobuild on by default. MFC after: 1 week Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D57306
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
On startup, check that /dev/null exists and is a character device. Otherwise, one of two things will happen: either /dev is a writable directory and we will immediately create /dev/null as a regular file and dump garbage into it, or it does not and we will spit out a stream of error messages about failing to create /dev/null. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295782 MFC after: 1 week Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D57447
debug: classified in
03-filenames_plain1 by
'libexec/'
bhyve's -p allows to pin guest's virtual CPU vcpu to hostcpu, however this becomes very tedious work when you have to pin more than a single CPU. This allows to pass a range to -p, e.g. -p 0-3:4-7 which will pin the cpus 0:4, 1:5, 2:6, 3:7. The ranges must be equal and the CPU numbers must be ascending. Sponsored by: Armenian Bioinformatics Institute Reviewed by: corvink, markj Tested by: bnovkov MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D54937
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Prior to this commit, we'd compute the page tables and have the last entries point to the staging area. We'd then add some more metadata to the image and boot. This assumed the staging area didn't need to move for this last bit of data. However, if we go over the staging limit, when we copyin new data, we grow the staging area, usually be moving it to a lower address. This overage usually happens when we're loading modules and so things work out nicely. Sometimes we're close to the limit, and we need to do this growing inside bi_load, after we've computed the page table, making the page table wrong, and the code we jump to random rather than the btext routine we normally start at. To fix this, move computation of the table (but not its allocation) to after bi_load, but before we call the trampoline. This problem was most observed when loading microcode for many peole, but Gleb reproduced the error with a set of modules that didn't include ucode. This bug hunt was greatly assisted by Claude who looked at the crash from the EFI boot loader and surmised that we weren't jumping to the code we thought we were jumping to. After inspecting the code, I asked claude how corruption could happen (I thought overwriting the page table), but claude notice the possibility that staging might change after we computed the page table, and this fix is the result. Claude didn't suggest a diff, but did provide many helpful clues that lead me to this fix. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294630 Reviewed by: kib (prior version) Sponsored by: Netflix MFC After: insta per re@ request Differential Revision: https://reviews.freebsd.org/D57462
debug: classified in
03-filenames_plain1 by 'stand/'
nuageinit: implement ntp support Add support for the 'ntp' cloud-config key which configures NTP by writing /etc/ntp.conf with server and pool entries.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement ca_certs support Add support for the 'ca_certs' cloud-config key which manages CA certificates by writing them to /etc/ssl/certs/ and running certctl rehash.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement MIME multipart user-data support Add support for MIME multipart/mixed user-data, allowing a single user-data blob to contain multiple parts with different content types.
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement power_state_change and locale support
debug: classified in
03-filenames_plain1 by
'libexec/'
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement final_message support
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: implement phone_home support Posts instance data (hostname, instance_id, public keys) to a URL using fetch(1). Supports: - url: target URL - post: list of data items to send, or 'all' - tries: number of retry attempts (default 1)
debug: classified in
03-filenames_plain1 by
'libexec/'
nuageinit: expose decode_base64 to fix tests
debug: classified in
03-filenames_plain1 by
'libexec/'
Suggested by: kevans
debug: classified in
03-filenames_plain1 by
'libexec/'
Sponsored by: Beckhoff Automation GmbH & Co. KG
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Currently, 'write_files' does not create parent directories, and 'runcmd' cannot be used here, since those scripts run after the files have been written. The only workaround is to create the files in an existing directory, such as '/root' or '/tmp', and then move those files using 'runcmd', but this is cumbersome when there are many files, even if they are small. With this change, nuageinit now creates the parent directories for each file using the path field, which mimics the same behavior as in cloud-init. Permissions and ownership can also be configured using 'runcmd'. Reviewed by: bapt@ Approved by: bapt@ Differential Revision: https://reviews.freebsd.org/D57395
debug: classified in
03-filenames_plain1 by
'libexec/'
If virtual_oss is not enabled when these rules run on startup, dmesg will show the following messages: Starting devd. virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory Reported by: olce, Mark Millard <marklmi@yahoo.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
03-filenames_plain1 by 'sbin/'
When `boot_policy` is `RELAXED`, `find_currdev()` tried ZFS pools on every disk before searching the boot ESP and sibling partitions. Booting install media from USB could therefore select an installed ZFS root on internal storage instead of the intended memstick UFS image. Extract the boot-device partition walk into `try_boot_device_partitions()` and run it before relaxed foreign-pool probing. The ZFS search order is preserved; pools on the boot device are tried first, followed by pools on other devices when `boot_policy` is `RELAXED` and the boot device yields no bootable root. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2239
debug: classified in
03-filenames_plain1 by 'stand/'
Signed-off-by: Phil Krylov <phil@krylov.eu> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1735
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1700
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
ppp: Don't fetch a non-existent variadic argument Only fetch the optional mode argument to ID0open to pass to open(2) if O_CREAT is present in the flags argument. It is UB to fetch an argument that doesn't exist. On CHERI this UB results in a fault. Reviewed by: brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D57137
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
ppp: Permit CHAP challenges up to 255 bytes RFC 1994 does not place any limit on the length of the value field in challenge messages except that the length is a single octet which bounds the maximum length to 255. NB: I'm not sure why the local[] and peer[] arrays contain room for an authentication name (AUTHLEN) in addition to a challenge value/response, but I've just left that in place. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271955 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: des Differential Revision: https://reviews.freebsd.org/D57138
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
ppp: Reject FSM messages whose length is smaller than the message header PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271843 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D57139
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
While here, use the more specific "pidfile" consistently instead of ambiguous "filename". Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57531
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
virtual_oss(8) does not currently keep track of the cuse(3) it creates, nor does it destroy any of them on exit, except for the control device. This is harmless if virtual_oss(8) is killed after all audio streams have been shut down, but if it's killed during I/O, the process hangs and/or goes into uninterruptible sleep state. To fix this, have pointers to all cuse(3) devices, and explicitly destroy them on exit. Also make sure we don't leak memory in dup_profile(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/41
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
There is no reason to have per-profile copies, plus this way we open /dev/sndstat multiple times if more than 1 profile is created. Also close the FD on exit to avoid leaking. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: jrm Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/41
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
_loopback entry in `static_routes` ensures a loopback route exists in all routing tables. However, loopback routes may already be added by the kernel. Therefore, re-adding them triggers an `EEXIST` error on every boot. This change suppresses those harmless errors. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259553 MFC after: 1 week Reviewed by: glebius, jlduran, markj Differential Revision: https://reviews.freebsd.org/D57470
debug: classified in
03-filenames_plain1 by
'libexec/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Reviewed by: des, dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57549
debug: classified in
03-filenames_plain1 by
'libexec/'
Reviewed by: des, dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57549
debug: classified in
03-filenames_plain1 by
'libexec/'
The fill loop was bounded by packlen, which is sized for the receive buffer (datalen + IP6LEN + ICMP6ECHOLEN + EXTRA), not for outpack. With large datalen the loop wrote past outpack[MAXPACKETLEN]. Bound it to the actual data area in outpack instead. Reported by: Oculytic Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D57441
debug: classified in
03-filenames_plain1 by 'sbin/'
Update bsdconfig dot USAGE Replace mention of graphics/ImageMagick with graphics/GraphicsMagick
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Update bsdconfig dot USAGE graphics/gimmage is no longer in ports, remove mention
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Update bsdconfig dot USAGE graphics/gqview is no longer in ports, remove mention
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
print/gsview is no longer in ports, remove mention
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Add gm prefix to convert command. `convert` of ImageMagick is now available under `gm convert` where `gm` is the main entry point for GraphicsMagick commands.
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
graphics/gx is no longer in ports, remove reference
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
log_set_peer_name() and log_set_peer_addr() were never used Differential Revision: https://reviews.freebsd.org/D57164
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Previously, gfxfb_blt flushed the framebuffer on every call. Since a single drawing operation may invoke gfxfb_blt multiple times, this can result in unnecessary flushes. Instead, write updates to the shadow buffer (when present) and mark the affected area as dirty. Flushing is deferred so multiple gfxfb_blt calls can be coalesced into a single update. As before, only the dirty region is flushed. This fixes the slow bootloader problem in some platforms. Reviewed by: imp, adrian, obiwac Tested by: obiwac, jrm MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57373
debug: classified in
03-filenames_plain1 by 'stand/'
Free the previous value before re-strdup'ing, and initialise
remoteMountPoint to NULL in fs_entry_create() so the free() is safe on
the newly-created path
Observed via a dtrace leak snapshot on 15.0-RELEASE-p4:
data leaked = 1983, count = 1683
libc.so.7`malloc+0xa8
snmp_hostres.so.6`fs_tbl_process_statfs_entry+0x276
snmp_hostres.so.6`refresh_storage_tbl+0x502
snmp_hostres.so.6`op_hrStorageTable+0x1a
libbsnmp.so.7`0x2a2b1892ba3d
libbsnmp.so.7`snmp_getbulk+0x37f
Reviewed by: sjg, ngie
Differential Revision: https://reviews.freebsd.org/D57604
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Use ATF to wrap the new reimplementation of pjdfstest that came out of GSOC 2022, now available in the ports tree as filesystems/pjdfstest. So far I added tests for UFS (with several different option combinations), tmpfs and ZFS, plus ZFS+nullfs. All of these create a memory disk, initialize the filesystem, and point the pjdfstest executable at it. In the future it would be good to add tests for at least NFS and p9fs. Reviewed by: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56605
debug: classified in
03-filenames_plain1 by 'etc/'
Reviewed by: emaste Fixes: https://cgit.freebsd.org/src/commit/?id=ad0e698e642e ("ifmcstat: remove libkvm(3) code") Event: BSDCan 2026
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Correct the manpage to reflect the preference for GUID vs UUID. Take the long version of --guid for the -g option. Sort the argument list while we are touching it. Reviewed by: imp MFC after: 1 week MFC to: stable/15 Event: BSDCan 2026 Differential Revision: https://reviews.freebsd.org/D57695
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Introduce a new variable "security_status_loginfail_ignore" to filter unwanted login failure messages from the daily security checks. Co-authored-by: Michael Osipov <michaelo@FreeBSD.org> Co-authored-by: Joseph Mingrone <jrm@FreeBSD.org> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295191 Reviewed by: jrm MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57671
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
rtld calls functions in the .init_array section one at a time, until it finds a distinguished sentinel value. The C runtime does the same thing (in crtend.c). However, that checks for the sentinel -1 and not 1. If one is using a linker that unifies .ctors and .init_array, then rtld will miss the sentinel value. I believe the author of this code intended to write -1 instead of 1. Indeed, changing the code to also check for -1 prevents rtld from attempting to call a non-existent function. The same is true of .dtors and .fini_array. Signed-off-by: Daniel Levin <daniellevin2607@gmail.com> Reviewed by: kib MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2270
debug: classified in
03-filenames_plain1 by
'libexec/'
Warn the user before trying `make installetc` if etcupdate was invoked without -b (or with -B) and it appears that `make buildetc` hasn't already been run (which usually happens as part of `make buildworld`). MFC after: 1 week Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57504
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
MFC after: 1 week Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Move a comment further up in the file. After the sethead() we need to use efi_exit(), not after the performance measuring stuff. Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by 'stand/'
During the non-root user setup (adduser.sh), people are often confused what the separator is when they are asked which groups to join the new user into. For example, wheel and operator: users often assume that the two groups are separated by a comma (and maybe even a space after it), but the script will check for that and refuses such entries. Help the users by mentioning that the groups need to be space separated in the question itself. That way, it does not take up extra space and avoids confusion about what the separator is. Reviewed by: jrm Event: Halifax Hackathon 202626 Differential Revision: https://reviews.freebsd.org/D57768
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
By default don't block booting with a prompt if a zpool needs a keyboard
password to unlock it. To enable prompting for keyboard password during
boot require:
zfskeys_enable="YES"
zfskeys_prompt_enable="YES"
to both be enabled. This returns to POLA of prior behaviour.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296130
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57750
debug: classified in
03-filenames_plain1 by
'libexec/'
MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57765
debug: classified in
03-filenames_plain1 by 'sbin/'
This is mostly to provide cleaner code for future changes to copy from. - Use NULL instead of casting 0 to pointer types. - Inline readone() in the sole caller now that it is just a single line. - Use a helper variable for the count of items on each line of output in readit(). - Fix the double space in the middle of byte output to only trigger for width 1. For other widths it would output spurious spaces at the end of the line which doesn't really hurt, but is buggy nonetheless. - Avoid using implicit booleans by explicitly comparing integer expressions against zero. - Don't compare the endptr returned from strtol() against NULL. Differential Revision: https://reviews.freebsd.org/D57535
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
makefs cd9660: Populate creation time stamps in RockRidge extensions Differential Revision: https://reviews.freebsd.org/D57527
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
makefs: Fix build on systems without st_birthtime such as Linux Reviewed by: emaste Fixes: https://cgit.freebsd.org/src/commit/?id=0a301f33306c ("makefs https://cgit.freebsd.org/src/commit/?id=cd9660: Populate creation time stamps in RockRidge extensions") Pull Request: https://github.com/freebsd/freebsd-src/pull/2297
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The ifconfig(8) utility built with MK_JAIL=no does not support the -j option. When the option is specified, Perror() is called without setting errno, which can result in errno being reported as zero and a misleading error message being displayed. Also remove "[-j jail]" from the usage message when built with MK_JAIL=no. Event: Halifax Hackathon 202606
debug: classified in
03-filenames_plain1 by 'sbin/'
Move the memory map allocation before the ExitBootServices retry loop to ensure no boot service calls occur between GetMemoryMap and ExitBootServices. This simplifies the control flow by removing the inner sizing loop and matches the strategy used by the Linux EFI stub. Identified while investigating an ExitBootServices hang on AMD AGESA 1.3.0.0a firmware (Gigabyte B650 GAMING X AX V2). Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56249
debug: classified in
03-filenames_plain1 by 'stand/'
Add option -W that allows to write into a BAR region. Also, add an option -R that allows to read from a BAR region that works similar to -r that reads from the PCI config space. Reviewed by: bcr (manpages), jhb Differential Revision: https://reviews.freebsd.org/D55915
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Rather than insist on a space-separated list, normalize the input so that any number of spaces, commas, colons, or semicolons are accepted. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D57774
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Use the checkyesno function from rc.subr instead of hardcoded checks for boolean variables. Also drop an incorrect comment about the default logamount value; the actual default is zero (unlimited). MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57678
debug: classified in
03-filenames_plain1 by
'libexec/'
For firewall_allowservices and firewall_trusted, if an element of the list looks like an absolute path, read the file, skipping comments and blank lines, and treat the first word on each line as an address or subnet to be added to the list. We should probably be using tables instead, but this is still an improvement over the status quo ante. MFC after: 1 week Relnotes: yes Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D57679
debug: classified in
03-filenames_plain1 by
'libexec/'
The comment says “silently exit if ddb is not enabled”, but we'd exit
with an error message.
Note that I switched the sysctl variable used to test for the presence
of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a
smaller value if set.
While here, drop a pointless fork-exec, and use ${SYSCTL_N} for
consistency.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=177217
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57686
debug: classified in
03-filenames_plain1 by
'libexec/'
Before mounting a new mfs on /tmp, we check if there already is one. However, the dupe check only takes /dev/md[0-9]* into account, while the default mfs type these days is tmpfs. Rewrite it to look for tmpfs as well. Note that the dupe check is redundant in the tmpmfs=auto case, but we leave moving it for later. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=182035 MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57682
debug: classified in
03-filenames_plain1 by
'libexec/'
* In the server configuration, disable protocols not supported by the kernel. * In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1, ::1, or both depending on which protocols the kernel supports. MFC after: 1 week Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D57840
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
POSIX does not allow mixing direct writes to STDOUT_FILENO with stdio operations on stdout like we do here. More importantly, it causes tests to fail randomly (or not-so-randomly after I added an fflush in a previous commit). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57884
debug: classified in
03-filenames_plain1 by 'sbin/'
Add some comments about the boot protocol. Need to do a deeper dive into the networking code since it's the last set of code used here. Signed-off-by: Warner Losh <imp@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D57800
debug: classified in
03-filenames_plain1 by 'stand/'
These are scattered in several places, so centralize the setting of these flags. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57861
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Add verbose flag to try_as_currdev Since we print almost everywhere before we call this, centralize the devpath to text dance here. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57801
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Refactor try_boot_device_partitions Break out the probing into try_disk_and_partitions and adjust the trying message slightly to be a little clearer what we're doing. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57802
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Expand uefi_rootdev to probe disks uefi_rootdev had to be the exact device to work. This is often difficult to arrange and awkward. Instead, have it search the specified device: As a partition if it specifies the partition, and as the whole disk if the specified partition didn't work or it specifies a disk. This brings it into lone what we do with other devices. This overrides the boot manager search we do before we do this for the boot device, but this knob has always been meant to overload the boot manager search. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57803
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Improve the trying MD messsages Expand the tring MD message a little to make it clearer. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57804
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Trim ZFS searching for other booting options When we're searching the system for all the disks in relaxed mode, we need to do a final pass over all the non-boot disks. We no longer need to have two loops since ZFS on boot device is selected properly in try_boot_device_partitions. This also simplifies the code a bit. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57805
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD Set hint.md.%d.physaddr and hint.md.%d.len for each of the VirtualDisks. The memory for these remains after we exit boot services so FreeBSD can use them. This leverages the BIOS work we did for memdisks. In hindsight, I should have passed this in via metadata, but it's been in a release. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57806
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Recognize new memdisk=<url> and memcd=<url> options Support ipxe downloading of a memory disk (either presented to the OS as a harddisk or a cd). This requires an ipxe server since it uses the ipxe download protocol to grab the disk. If there is a disk, we add it to the environment as a disk, and then the rest of the bootloader just sees it and boots from it. I've cribbed code from https://github.com/russor/memdisk_uefi and adapted it to work in the context of the FreeBSD bootloader. The ipxe_download.h file was created from the documentation of the interface. So a .ipxe file with the line chain http://10.2.0.1/loader.efi memdisk=${cwduri}FreeBSD-15.1-RELEASE-amd64-bootonly.iso would use the FreeBSD boot loader to boot the FreeBSD 15.1 release. md(9) has a bug at the moment that prevents it from probing the partitions on it. Also, we'll automatically decompress gzip, bzip2 and zstd files automatically. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57677
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer. Fixes: https://cgit.freebsd.org/src/commit/?id=afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options") Sponsored by: Netflix Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D57893
debug: classified in
03-filenames_plain1 by 'stand/'
loader.efi: polish SPDX header Fixes: https://cgit.freebsd.org/src/commit/?id=afee781523e45198c7be0a19281bcae2c4ab66db
debug: classified in
03-filenames_plain1 by 'stand/'
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
The documented flags are named differently than the script name, this requires special handling of the flags. The Service Jails feature requires the handling of the variable to be differently than it was initially. The change back then did not work, which resulted in the flags to be ignored. This commit fixes the issue in head. This affects 15.0 and 15.1 too. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296233 Reported by: Robert Blayzor <rblayzor@inoc.net> Tested by: Robert Blayzor <rblayzor@inoc.net> Fixes: https://cgit.freebsd.org/src/commit/?id=f99f0ee14e3af81c2 - rc.d: add a service jails config to all base system services MFC after: 1 month MFC to: 15-stable
debug: classified in
03-filenames_plain1 by
'libexec/'
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
rtld: add spinlock around the crt malloc calls Right now, the rtld malloc is called under the write-locked rtld bind lock. A future change adds places where only read-locked rtld bind lock is held, and then the spinlock protects the malloc structures from the parallel updates. Reviewed by: kevans Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57908
debug: classified in
03-filenames_plain1 by
'libexec/'
rtld: stop using unbound alloca() For DoneList allocations, its size depends on the number of loaded DSOs. Small images could be served by alloca(), but large donelists need to go into heap. For map_object(), alloca size is the number of segments in the object. In both cases, over-grown situations would cause a stack overflow. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295991 Noted and reviewed by: kevans Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57908
debug: classified in
03-filenames_plain1 by
'libexec/'
rtld: unify the return path for map_object() Reviewed by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57908
debug: classified in
03-filenames_plain1 by
'libexec/'
The shadow buffer is addressed relative to `tg_origin`, which includes the padding offset, whereas `gfxfb_blt` operates on coordinates without that offset. To make `gfx_fb_copy_area` emulate the behavior of `gfxfb_blt`, the source coordinates must include the padding offset, while the destination coordinates must not. The original implementation omitted the offset from the source coordinates; this change corrects that. Additionally, `gfx_fb_cons_display` already applies the padding offset, so the redundant adjustment is removed. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296246 Reported by: 2khramtsov@gmail.com Reviewed by: imp Tested by: 2khramtsov@gmail.com, junchoon@dec.sakura.ne.jp, naito.yuichiro_@gmail.com Fixes: https://cgit.freebsd.org/src/commit/?id=32da2f23ae4d MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57821
debug: classified in
03-filenames_plain1 by 'stand/'
Since syslogd was converted to run in a Capsicum sandbox, it needs to explicitly connect() its forwarding sockets rather than using sendmsg(). At the time syslogd starts during boot, some of its forwarding destinations may not be routable, in which case connect() fails. Fix this by making connect() failures non-fatal, and use cap_net to lazily connect sockets once something actually tries logging to the destination. Add a regression test. Reported by: ae Reviewed by: ae Discussed with: jfree Fixes: https://cgit.freebsd.org/src/commit/?id=4ecbee2760f7 ("syslogd: Open forwarding socket descriptors") MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57394
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
When pinning a vcpu to a hostcpu fails, print out a diagnostic message to stderr indicating the failing CPU pair. MFC after: 1 month Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D57619
debug: classified in
04-filenames_plain2 by
'usr.sbin/'
Drop the _np suffix. Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56222
debug: Commit manually moved from "unknown" to "libs".
Starting from the existing fmax{,f,l} functions I've added the fmaximum
family, which handles NaN according to the newest standard (propagating
it).
This commit is a PoC for GSoC 2026.
Reviewed by: fuz, kargl
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D55834
debug: classified in
04-filenames_plain2 by 'lib/'
Move is_restricted_var() to libsa/environment.c so it can be leveraged by boot_setenv called from subr_boot with not truted input. Also, allow for local tuning via ENV_IS_RESTRICTED_ALLOWED_LIST and ENV_IS_RESTRICTED_LIST Sponsored by: Hewlett Packard Enterprise Development LP. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D56287
debug: Commit manually moved from "unknown" to "libs".
Reported and tested by: fluffy Reviewed by: emaste Fixes: https://cgit.freebsd.org/src/commit/?id=3a01e1e1a50cb9a9594aac2148dc920a6b295428 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56283
debug: classified in
04-filenames_plain2 by 'lib/'
We've compiled it since the LLVM 13 import in 2021, but for some reason never exported it. A user of CheriBSD recently caused Morello LLVM to emit a reference to it so finish the job and export it. Reviewed by: dim, emaste Fixes: https://cgit.freebsd.org/src/commit/?id=6e75b2fbf9a0 ("Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a") MFC after: 1 week Sponsored by: DARPA, AFRL See also: https://github.com/CTSRD-CHERI/cheribsd/issues/2614 Differential Revision: https://reviews.freebsd.org/D56310
debug: classified in
04-filenames_plain2 by 'lib/'
The 'simplification' commit referenced below actually broke one aspect of MFD_HUGETLB: the caller isn't supposed to be required to specify a size. MFD_HUGETLB by itself without a shift mask just requests a large page, so we revert that part of memfd_create() back. While we're here, fix up the related parts of the manpages a little bit, since MFD_HUGETLB is actually supported. The manpage claims that we would return ENOSYS if forced mappings weren't supported, but this was actually not true. However, that seems like a very important distinction to make between ENOSYS and EOPNOTSUPP, so fix the implementation to match the docs. Fixes: https://cgit.freebsd.org/src/commit/?id=8b8cf4ece660f ("memfd_create: simplify HUGETLB support [...]") Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56114
debug: classified in
04-filenames_plain2 by 'lib/'
debug: classified in
04-filenames_plain2 by 'lib/'
Added support for the f{maximum,minimum}_{mag,num} families, the new
C23 standard functions for maximum magnitude and number-preferring
maximum. This includes modifying fmax.3, on top of D56230, to
recommend the use of fmaximum_num and fminimum_num.
Reviewed by: fuz, kargl
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D56236
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56362
debug: classified in
03-filenames_plain1 by
'include/'
libarchive 3.8.7
Important bugfixes:
#2871 libarchive: fix handling of option failures
#2897 iso9660: fix undefined behavior
#2898 RAR: fix LZSS window size mismatch after PPMd block
#2900 CAB: fix NULL pointer dereference during skip
#2911 libarchive: do not continue with truncated numbers
#2919 CAB: Fix Heap OOB Write in CAB LZX decoder
#2934 iso9660: fix posibble heap buffer overflow on 32-bit systems
#2939 cpio: Fix -R memory leak
#2947 libarchive: lzop and grzip filter support
Important bugfixes between 3.8.5 and 3.8.6:
#2860 bsdunzip: fix ISO week year and Gregorian year confusion
#2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
#2875 7zip: fix out-of-bounds access on ELF 64-bit header
#2877 RAR5 reader: fix infinite loop in rar5 decompression
#2878 mtree reader: Fix file descriptor leak in mtree parser cleanup
(CWE-775)
#2892 RAR5 reader: fix potential memory leak
#2893 RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called
twice
#2895 CAB reader: fix memory leak on repeated calls to
archive_read_support_format_cab
Obtained from: libarchive
Vendor commit: ded82291ab41d5e355831b96b0e1ff49e24d8939
MFC after: 1 week
debug: classified in
05-summary-prefix by 'lib.*:'
Fix all pointer-sign warnings generated when compiling libifconfig. One of these warnings comes from the misuse of snl_add_msg_attr_string for a byte array. Though userland treats carpr_key as a string, it is actually an array of bytes. Handle it as such in libifconfig. While here, fix a small consistency nit in ifconfig_sfp_get_sfp_dump. Signed-off-by: Ryan Moeller <rmoeller.dev@gmail.com> Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1850
debug: classified in
04-filenames_plain2 by 'lib/'
When processing the return data from these calls pass the limiter
pointer, not the limiter pointer pointer.
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
04-filenames_plain2 by 'lib/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468
debug: classified in
04-filenames_plain2 by 'lib/'
No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
vm_vcpu_open() really should check the value returned from malloc() and return NULL on failure. Also, all users of vm_vcpu_open() need to check the returned value for NULL, too. Reviewed by: corvink, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56346
debug: classified in
05-summary-prefix by 'lib.*:'
Prior to the change 4f809ffec69c, the sizes are formated by humanize_number(3) with the flag HN_DECIMAL, which displays the result using one decimal place when it is less than 10. That is more accurate and useful. Add equivalent field modifier hn-decimal to xo_emit() to restore the previous behavior. Reported by: Mark Millard Reviewed by: js Fixes: https://cgit.freebsd.org/src/commit/?id=4f809ffec69c gpart: add libxo support for "show" subcommand + man page updates MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56514
debug: classified in
04-filenames_plain2 by 'lib/'
These are required by ISO/IEC 9899:2024 § 7.18.1 ¶ 1 but were forgotten in my initial work. The current approach leaks intptr_t, uintptr_t, intmax_t, and uintmax_t through <sys/_stdint.h>. This could be avoided using a more complicated approach if desired. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294131 Fixes: https://cgit.freebsd.org/src/commit/?id=6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 Reported by: Collin Funk <collin.funk1@gmail.com> Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56515
debug: Commit manually moved from "unknown" to "libs".
The maximum and minimum functions, as well as nextafter and nexttoward, were using manual NaN checks instead of the isnan() macro. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294692 Reviewed by: fuz, kargl MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'lib/'
Makes the code easier to understand. MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
This partially reverts upstream libc++ commit aa7f377c965c: [libc++] Remove libc++'s own stdint.h and locale.h (#107436) These headers are not doing anything beyond the system or compiler provided equivalent headers, so there's no real reason to keep them around. Reducing the number of C headers we provide in libc++ simplifies our header layering and reduces the potential for confusion when headers are layered incorrectly. The problem is that libc++'s own `stdint.h` _does_ do something: it defines `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` before including the system `stdint.h`, causing the latter to expose macros like `SIZE_MAX`, `UINT64_C`, and others. If the `__STDC_LIMIT_MACROS` and `__STDC_CONSTANT_MACROS` macros are not exposed, C++ programs compiled for standards before C++11 can fail with errors due to those macros not being available. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: Commit manually moved from "unknown" to "libs".
This is because contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc attempts to use pthread_get_name_np(3) and pthread_set_name_np(3), which are not defined on Linux. Reported by: ivy PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'lib/'
When using outline atomics on arm64 the compiler will create a call to a function that performs the atomic operation. This allows us to use the fastest operation depending on the hardware. As these functions are implemented in libgcc create a linker script so libraries that link against libgcc_s will include libgcc to pull them in. Reviewed by: imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45268
debug: classified in
04-filenames_plain2 by 'lib/'
Add EXTERR_CAT_HWPMC_IBS to the external error categories and replace generic EINVAL returns in ibs_allocate_pmc() with EXTERROR() calls that provide detailed error messages. This will be augmented with additional cases in the near future. Reviewed by: mhorne Sponsored by: AMD Signed-off-by: Andre Silva <andasilv@amd.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/2134
debug: Commit manually moved from "unknown" to "libs".
Various calls in the implementation can clobber errno; preserve it for the caller since none of these will bubble up pass/fail to simplify some future error handling in ctld. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D56539
debug: classified in
04-filenames_plain2 by 'lib/'
To allow their use by efibootmgr. Signed-off-by: stephane.rochoy@stormshield.eu Reviewed by: imp Sponsored by: Stormshield Pull-Request: https://github.com/freebsd/freebsd-src/pull/2167
debug: Commit manually moved from "unknown" to "libs".
bridge(4) doesn't support BRDGGIFVLANSET for span members, which means if a span interface is configured, libifconfig will fail to fetch bridge members. Skip this for IFBIF_SPAN members. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292634 MFC after: 3 days Reported by: Emrion <kmachine@free.fr> Reviewed by: pouria, zlei Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56694
debug: classified in
04-filenames_plain2 by 'lib/'
The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). Approved by: so Security: FreeBSD-SA-26:16.libnv Security: CVE-2026-39457 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56689
debug: classified in
04-filenames_plain2 by 'lib/'
Annex K specifies an interface for handling constraint violations from gets_s, but we previously broke this for some classes of get_s misuse. Provide a more nuanced version that tries to dodge errors that would trigger a constraint handler while still providing value. Notably, we don't want to trigger a failure unless the passed-in length reasonably fits within an RSIZE_MAX, because gets_s will immediately call larger lengths bogus and fail. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56734
debug: classified in
03-filenames_plain1 by
'include/'
The getgroups test is a NetBSD tests, so just apply our larger hammer and disable the feature entirely. The audit test can take a more surgical approach and use __ssp_real() appropriately, since it's a local one. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56735
debug: classified in
03-filenames_plain1 by
'include/'
Fixes: https://cgit.freebsd.org/src/commit/?id=770cf0a5f02d ("Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge") MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'lib/'
Added the fmaximum_mag_num{,f,l} and fminimum_mag_num{,f,l} functions.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719
Reviewed by: fuz, kargl
MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'lib/'
Replaced the old pattern of using a ternary to force addition (raising exceptions for sNaN's) with a new one using a volatile variable. The _mag_num family was already implemented with this pattern PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719 Reviewed by: fuz, kargl MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'lib/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56365
debug: classified in
05-summary-prefix by 'lib.*:'
for MacOSX partial compatibility, defined as O_PATH | O_SYNC | O_DIRECT. libc openat() wrapper is modified to fstat() the descriptor and re-open in the normal mode if the type is not symlink. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56365
debug: Commit manually moved from "unknown" to "libs".
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: lwhsu, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51736
debug: classified in
04-filenames_plain2 by 'lib/'
The return value of posix_spawn_file_actions_init() is an error number. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56911
debug: classified in
04-filenames_plain2 by 'lib/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56365
debug: classified in
05-summary-prefix by 'lib.*:'
From the PR:
The attached diff implements the inverse square root function, i.e,
rsqrt(x) = 1 / sqrt(x). Exhaustive testing of the float version
suggests that it is correctly rounded in round-to-nearest for all
test values in the range [0x1p-127,0x1p126].
Exhaustive testing of rsqrt and rsqrtl cannot be done, but 1100M
values of x for rsqrt and 400M values for rsqrtl were tested. All
tested values were correctly rounded.
I do not have access to LD128 (i.e., IEEE 128-bit floating point)
hardware, so the implementation of rsqrtl() is untested.
The following is a summary of changes to source code.
* lib/msun/Makefile:
. Add s_rsqrt.c and s_rsqrtf.c to COMMON_SRCS.
. For non-53-bit long double targets, add s_rsqrtl.c to COMMON_SRCS.
. Add MLINKS for rsqrt.3, rsqrtf.3, and rsqrtl.3 to sqrt.3.
* lib/msun/Symbol.map:
. Add rsqrt, rsqrtf, and rsqrtl to the Symbol map for shared libm.so.
* lib/msun/man/sqrt.3:
. Update the sqrt.3 manual page to include information for rsqrt[fl].
. Note, these function come from ISO C23 (and IEEE-754 2008).
* lib/msun/src/math.h:
. Add prototypes for new functions.
* lib/msun/src/math_private.h:
. Add _SPLIT, _FAST2SUM, _SLOW2SUM, _XADD, _MUL, and _XMUL
macros to perform type-type arthimetic (i.e., float-float).
* src/s_rsqrt.c:
. New file with the implementation of 'double rsqrt(double)'.
. For 53-bit long double targets, add a weak reference for rsqrtl.
* src/s_rsqrtf.c:
. New file with the implementation of 'float rsqrt(float)'.
* src/s_rsqrtl.c
. New file with the implementation of 'long double rsqrt(long double)'.
Note, the LD80 version uses bit twiddling and LD128 version is a
straight C language implementation. The LD128 is untested due to
lack of hardware.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295089
MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
Required for MAXPATHLEN. MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
MAXBSIZE is defined in param.h, which defines many other things. To avoid forcing all consumers of libufs.h to include param.h, let's instead redefine it and verify the definition in inode.c. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56859
debug: classified in
04-filenames_plain2 by 'lib/'
Fixes: https://cgit.freebsd.org/src/commit/?id=b60053fde172 ("libcasper: Fix inconsistent error codes of cap_get{addr,name}info()")
debug: classified in
04-filenames_plain2 by 'lib/'
If the old limit had family/hosts/sockaddr set, the new limit must have them too. Before, a missing key in the new limit was treated as "allow any", which let a caller silently extend their limits. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D56991
debug: classified in
04-filenames_plain2 by 'lib/'
nlist: Handle multiple symbol tables * Instead of looking for and stopping at the first SHT_SYMTAB section, iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either found all our symbols or run out. * Perform bounds checks on section and string table offsets and sizes before attempting to mmap() the string table. * Perform bounds checks on individual symbol table entries before attempting to access the corresponding strings. * Stop treating _Foo and Foo as the same symbol. This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295336 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=77909f597881 ("Initial elf nlist support [...]") Fixes: https://cgit.freebsd.org/src/commit/?id=644b4646c7ac ("OpenSSH: Update to 10.1p1") Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D57034
debug: classified in
04-filenames_plain2 by 'lib/'
nlist: Decrement nent on match PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295336 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=4617a6cb82a6 ("nlist: Handle multiple symbol tables")
debug: classified in
04-filenames_plain2 by 'lib/'
The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). poll(2) takes an array indexed by slot rather than by fd value, so it has no FD_SETSIZE limit. Approved by: so Security: FreeBSD-SA-26:22.libcasper Security: CVE-2026-39461 Reported by: Joshua Rogers Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56695
debug: classified in
04-filenames_plain2 by 'lib/'
uid_t and gid_t are uint32_t (unsigned 32bit integers). They are printed as signed integers when calling getfacl (and other tools using the acl_to_text() libc function). This causes uid/gids larger than 2G (214783648) to print as negative numbers - which causes problem with setfacl since the acl_from_text() libc function fails on negative numbers. Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57179
debug: classified in
04-filenames_plain2 by 'lib/'
To hit this, the user must be using a PEM style private key with no corresponding .pub key adjacent to it. OpenBSD-Commit-ID: b7150acc5322fa33f21491834d9471fbe3d30f20 (cherry picked from commit cf6c0b3b94cdc223f1b8be1ef2d93e993af5d976) Reviewed by: emaste
debug: Commit manually moved from "unknown" to "libs".
* Check the range of the link count before trying to use it. * Rewrite the comment explaining what the link count is used for. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57324
debug: classified in
04-filenames_plain2 by 'lib/'
* kqueues is a count but is listed as a size * pipebuf is a size but is listed as a count PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295623 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=a4c04958f526 ("libutil: support RLIMIT_PIPEBUF") Fixes: https://cgit.freebsd.org/src/commit/?id=85a0ddfd0b26 ("Add a resource limit for the total...") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57333
debug: classified in
04-filenames_plain2 by 'lib/'
`yp_prot.h` has carried a SunRPC-era typedef of `bool` guarded by `BOOL_DEFINED`, but the header itself does not use it. The YP/RPC interfaces use `bool_t` for protocol booleans. Defining `bool` in a public header collides with modern C headers that provide `bool` as a macro or keyword, such as `<stdbool.h>` and C23-aware assert handling. Drop the compatibility typedef and leave `bool` definition to the consumer's language mode. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
03-filenames_plain1 by
'include/'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
03-filenames_plain1 by
'include/'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
03-filenames_plain1 by
'include/'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in
03-filenames_plain1 by
'include/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57038
debug: Commit manually moved from "unknown" to "libs".
- Update /etc/protocols with IANA list updated 2026-03-09. - Document that 240 (pfsync) is not assigned by IANA. - Document deprecated protocols. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295739 Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57445
debug: classified in
04-filenames_plain2 by 'lib/'
Signed-off-by: Faraz Vahedi <kfv@kfv.io> Pull Request: https://github.com/freebsd/freebsd-src/pull/2243 Reviewed by: fuz MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
Paul Zimmermann (of Core-Math and MPFR fame) graciously tested
the recently committed rsqrt[fl]() functions. He identified 127
incorrectly rounded values for rsqrtf() in round-to-nearest mode.
This patch fixes the rounding in RN. Exhaustive testing now shows
that rsqrtf() is corrected rounded for RN. He also tested rsqrt()
and rsqrtl() in the interval [1,4). Both appear to be correctly
rounded. Finally, the patch includes small changes to comments.
A concise list of changes is
* lib/msun/src/s_rsqrt.c:
. Fix comments.
* lib/msun/src/s_rsqrtf.c
. Fix comments.
. Exhaustive testing by Paul Zimmermann found 127 incorrectly
rounded values in round-to-nearests. These gave have the
form 0x1.13e07pN with N an odd integer. With this patch, all
values are now correctly rounded in round-to-nearest.
* lib/msun/src/s_rsqrtl.c
. Fix comments.
. Move all variable declarations to top of function and sort.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295706
MFC after: 1 week
Fixes: https://cgit.freebsd.org/src/commit/?id=3085fc9d97bd83785ba3ba43e0378d7d67987d1f
debug: classified in
04-filenames_plain2 by 'lib/'
Add C23 sized deallocation entry points as thin wrappers around free(3). Implementations may ignore size and alignment hints, so behaviour stays correct for existing allocations without validating caller metadata yet. When jemalloc is updated to 5.3.1, rewire these to je_free_sized() and je_free_aligned_sized() so deallocation can use the allocator's sized deallocation (free_sized for fast paths and free_aligned_sized for correct aligned hints.) Please note this change satisfies the standard interface only. Both functions should be delegated to jemalloc after the upgrade so callers get the intended allocator behaviour; until then, hints are unused and neither sized nor aligned-sized deallocation optimizations apply. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz Pull Request: https://github.com/freebsd/freebsd-src/pull/2201 MFC after: 1 month
debug: classified in
05-summary-prefix by 'lib.*:'
C++ exposes cfenv functions via using ::func. Our name-mangling mechanism rewrites all function calls causing symbols such as std::feclearexcept to be transformed into std::__feclearexcept_int. Since no such function exists, compilation fails. The using ::feclearexpect declarations themselves are unaffected because they are not function calls, which further exposes the mismatch As a result, enable the fast path only for C and fall back to the slow path in C++. Reviewed by: kib Fixes: https://cgit.freebsd.org/src/commit/?id=5bc64b7d417d MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57450
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56992
debug: classified in
04-filenames_plain2 by 'lib/'
Replace the `(bool(*)(bool))` probe in `__assert_sanitize()` with an unevaluated conditional expression, so types with `explicit operator bool()` that require a contextually converted constant expression of type `bool` are handled correctly. Ergo, arity check is now performed separately via `__assert_sanitize_arity()`, a unary template whose parameter pack must bind to exactly on argument after `__VA_ARGS__` is substituted into the call. Also align NDEBUG with C23 requirements. Reported by: dim, aokblast Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: aokblast, fuz MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=867b51452ea78ece0b312a387e63fdbc2a11056a Pull Request: https://github.com/freebsd/freebsd-src/pull/2265
debug: classified in
03-filenames_plain1 by
'include/'
C23 deprecates <stdalign.h> and specifies that the header shall provide no content (§7.15.1). Signed-off-by: Faraz Vahedi <kfv@kfv.io> Pull Request: https://github.com/freebsd/freebsd-src/pull/2223 MFC after: 1 month Reviewed by: imp, fuz
debug: classified in
03-filenames_plain1 by
'include/'
Regenerate gd_qnan.h on riscv using the qnan.c config tool found in contrib/gdtoa. This fixes the following tests in CI: lib/libc/stdio/scanfloat_test:infinities_and_nans lib/libc/stdlib/strtod_test:strtold_nan Reviewed by: jrtc27 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57405
debug: classified in
04-filenames_plain2 by 'lib/'
Look up the pfctl family id when we open the handle, rather than for
every function call.
This saves us a lot of netlink calls, at the expense of storing one
extra int in the handle.
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
04-filenames_plain2 by 'lib/'
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.
Explicitly reset the snl_state when we're done to prevent this.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
04-filenames_plain2 by 'lib/'
Commit 6e7c10c79dea fixed a couple of snprintf()s for large uid/gid numbers above 2Gig. This patch fixes another one. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D57561
debug: classified in
04-filenames_plain2 by 'lib/'
This test fail until at least https://reviews.llvm.org/D155066 is rebased and picked up for aarch64 and more work is done for the other archs. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289096 Reviewed by: jlduran Fixes: https://cgit.freebsd.org/src/commit/?id=fef84fd8ae845e19cec0f6b9aac0e6451cca3d7a MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'lib/'
While here, remove the conditional on the "ci" config var to ensure that this is reproducible locally as well. This fixes a case where we are expecting a fail before the failing ATF_CHECK_* assertion happens. Found in a CI failure here: https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16608/testReport/lib.msun/logarithm_test/log1p_accuracy_tests/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253984 Fixes: https://cgit.freebsd.org/src/commit/?id=405188aeac540f7666dfde37c2f32d222119f56e MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57351
debug: classified in
04-filenames_plain2 by 'lib/'
Userspace mlx5_driver_init() only attached when vendor/device matched hca_table, while the kernel already probed additional Mellanox PCI IDs That mismatch prevented libibverbs from loading the mlx5 provider on those HCAs. Extend hca_table to mirror mlx5_core_pci_table and add cross-references so future kernel ID additions are paired with a userspace update. Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: Nvidia networking MFC after: 1 week
debug: classified in
05-summary-prefix by 'lib.*:'
This reflects the difference from the upstream libusb code. See: https://github.com/libusb/libusb/blob/master/libusb/libusb.h Reviewed by: adrian Event: BSDCan 2026 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57620
debug: classified in
04-filenames_plain2 by 'lib/'
ctermid(3): Fix return values section ctermid() doesn't, and has never, set errno. While here, add ctermid_r to the name section and align the parameter name in the source file. Reviewed by: bnovkov Approved by: bnovkov MFC after: 3 days Obtained from: https://github.com/apple-oss-distributions/libc Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D57396
debug: classified in
04-filenames_plain2 by 'lib/'
ctermid(3): Fix return Reported by: bnovkov Fixes: https://cgit.freebsd.org/src/commit/?id=dc24f31b67f5 ("ctermid(3): Fix return values section") Sponsored by: Klara, Inc.
debug: classified in
04-filenames_plain2 by 'lib/'
Commit `3a686b851f8f` fixed a `dbm_nextkey` edge case when using the function after reaching the end of the database, but it inadvertently broke the following `R_NEXT` behaviour: "If the cursor is not yet set, this is the same as the R_FIRST flag." Fix this by adding a new cursor constant that allows us to differentiate between an unset cursor and a cursor that overflowed. Reported by: ae Fixes: https://cgit.freebsd.org/src/commit/?id=3a686b851f8f Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D57670 Reviewed by: markj
debug: classified in
04-filenames_plain2 by 'lib/'
Commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc fixed it. MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'lib/'
While here, drop duplicate include. MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57733
debug: classified in
03-filenames_plain1 by
'include/'
libusb: implement IAD parser libusb provide functions to parse interface association descriptor. This descriptor indicates that a function is composed by multiple interface and which interfaces is associate to the target function. This descriptor is not a separate USB require, instead, it comes with the config descriptor. Reviewed by: adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50958
debug: classified in
04-filenames_plain2 by 'lib/'
libusb: implement libusb_set_option Implement libusb_set_option for API compatibility of libusb upstream The implementation status of each option is as following: LIBUSB_OPTION_LOG_LEVEL: just like libusb_set_debug LIBUSB_OPTION_LOG_CB: add callback support for DPRINTF LIBUSB_OPTION_NO_DEVICE_DISCOVERY: disable initialization of devd and netlink when register. Also, create no thread when registration of callback happens. LIBUSB_OPTION_USE_USBDK: no needed as USBDK is for Windows Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50818
debug: classified in
04-filenames_plain2 by 'lib/'
libusb: refactor the process of setting option when init the context. From https://github.com/libusb/libusb/commit/6622f386f52807dac76c8a260c98aa02c311bc93#diff-c1f9bc250077d41456a3e580fca0ddf5d8c25b741bff6d9b9505990a8b70b254R2358. We are able to set all of the option from the init_context. To address this, we modify the process of setting option in init_context to make it be more clear and then adapat libusb_set_option inside to all other option. Reviewed by: adrian Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51224
debug: classified in
04-filenames_plain2 by 'lib/'
libusb: implement libusb_get_max_alt_packet_size The libusb has a function to calculate the size from given interface, alt_setting, endpoint. Implementing it by refactoring the calculating function for libusb_get_max_iso_packet_size. Reviewed by: adrian Sponsored By: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51225
debug: classified in
04-filenames_plain2 by 'lib/'
libusb: implement zlp flag in libusb transfer The USB protocol defines a Zero-Length Packet (ZLP) to signal the end of a transfer when the data size is an exact multiple of the Maximum Packet Size (MPS). Without a ZLP in such cases, the device may not be able to determine that the transfer has completed. This flag is added to libusb to allow the user send a ZLP in the end of libusb_xfer. Reviewed by: adrian Sponsored by: The FreeBSD Foundataion Differential Revision: https://reviews.freebsd.org/D51759
debug: classified in
04-filenames_plain2 by 'lib/'
libusb: Add missing default in handling option switch This makes GCC happy Fixes: https://cgit.freebsd.org/src/commit/?id=2879c818e553 ("implement libusb_set_option") Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: adrian, bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57543
debug: classified in
04-filenames_plain2 by 'lib/'
Include an extra byte for the nul-terminator, otherwise we may end up
with an out-of-bounds write.
The corresponding bug in the kernel implementation was fixed by commit
e3081f7e3e2d ("kgssapi(4): Fix string overrun in Kerberos principal construction").
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57738
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: adrian Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57770
debug: classified in
04-filenames_plain2 by 'lib/'
Generate an nlm_flag table definition for mktable from netlink/netlink.h, add a sysdecode_nlm_flag() helper to libsysdecode, and use it when decoding netlink message headers. This enables mktable to generate netlink message flag lookup tables and replaces raw hexadecimal output for recognized NLM_F_* flag values with their symbolic names. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored by: Google LLC (GSoC 2026) Pull Request: https://github.com/freebsd/freebsd-src/pull/2294
debug: classified in
04-filenames_plain2 by 'lib/'
It's okay to hard-code NBBY, as the value is somewhat unlikely to change. The pollution from sys/param.h makes it harder to import test code from NetBSD since it can introduce conflicting definitions, e.g., MIN()/MAX(). Reviewed by: ngie MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57754
debug: classified in
04-filenames_plain2 by 'lib/'
ugen20_process() treats any non-EBUSY errno returned by USB_FS_COMPLETE as device detach and returns LIBUSB20_ERROR_OTHER. This causes libusb10 to set device_is_gone and fail all subsequent transfer with LIBUSB_ERROR_NO_DEVICE. However, USB_FS_COMPLETE can also return EINVAL when a completion references an endpoint that no longer exists, for example after SET_INTERFACE or SET_CONFIG removes and recreates endpoints. This is a transient condition and does not indicate device detach. Treat EINVAL the same as EBUSY and stop draining completions. This prevents a guest selecting an isochronous streaming altsetting from permanently breaking the passed-through device. Reviewed by: bapt Event: Halifax Hackathon 202606 Location: Peggy's Cove Rock Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57542
debug: classified in
04-filenames_plain2 by 'lib/'
Data changes: 48.1: - Update RSD (Serbian Dinar) to use 2-digits for non-cash and 0-digits for cash. - Fix issue with tippi and bindi in Punjabi exemplars. - Fix parsing issue in numeric date+time patterns for zh_Hant and yue. - Fix issues with hour cycle display names for several languages. https://cldr.unicode.org/downloads/cldr-48#481-changes 48.2: - Group separator for number formatting was updated to ' in fr-CH consistent with other Swiss locales. - Some fixes to date formats including: Hv available formats were updated to match behavior in CLDR 47 due to web compatibility issues related to current JS capabilities. - Emoji annotations fixes including collisions between emoji short names. - Updated AM/PM for ko & ps to be consistent with how the wide forms are localized. https://cldr.unicode.org/downloads/cldr-48#482-changes MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57627
debug: classified in
03-filenames_plain1 by
'['share/colldef_unicode/', 'share/monetdef_unicode/',
'share/numericdef_unicode/',
'tools/tools/locale/']'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'lib/'
Reviewed by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57955
debug: classified in
04-filenames_plain2 by 'lib/'
Fix null pointer dereference with HZ8 encoding. Fix output buffer overrun in UTF-7, VIQR, ZW encodings. Approved by: so Security: FreeBSD-SA-26:49.iconv Security: CVE-2026-58081 Reviewed by: markj, kevans Differential Revision: https://reviews.freebsd.org/D57947
debug: classified in
04-filenames_plain2 by 'lib/'
wcrtomb may store up to 2 2-byte escape sequences to the state buffer in addition to the character itself. In the worst case, a 3-byte heap overflow is possible. Approved by: so Security: FreeBSD-SA-26:49.iconv Security: CVE-2026-58081 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57949
debug: classified in
04-filenames_plain2 by 'lib/'
* cd9660_rrip_slink() did not check that the lengths of individual entries do not exceed the length of the overall record. * cd9660_rrip_altname() did not check that the length of the record was at least 5 before subtracting 5 from it. Note that in both cases, a better solution would be to check the length of the data before calling the handler, or immediately upon entry of the handler, but this would require significant refactoring. MFC after: 1 week Reported by: Calif.io in collaboration with Claude and Anthropic Research Reported by: Adam Crosser, Praetorian Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56215
debug: classified in
03-filenames_plain1 by
'sys/fs/'
This patch moves the definition of the nfsd_idargs structure out of nfs.h and into a new file called nfsid.h. This is being done so that it can be included in nfs_diskless.c in a future commit. There should be no semantics change from this commit. MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs")
debug: Commit manually moved from "unknown" to "filesystems".
Compiling a LINT-NOIP kernel (assumingly also a NOINET) port and ip are set but not used in nfsrv_getclientipaddr(). Hide the variables behind #ifdef checks and do likewise for the parsing results. Admittingly the code probably wants to be rewritten one day. Found with: gcc15 tinderbox build MFC after: 3 days Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56502
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Under conditions of low memory, getblk can fail. fusefs was not handling those failures very systematically. It was always using PCATCH, which appears to have been originally copy/pasted from the NFS client code, but isn't always appropriate: * During fuse_vnode_setsize_immediate, which can be called from many different VOPs and from the vn_delayed_setsize mechanism, remove PCATCH. Some of these callers cannot tolerate allocate failure. * In fuse_inval_buf_range, don't assume that getblk will always succeed. * When calling fuse_inval_buf_range from VOP_ALLOCATE, VOP_COPY_FILE_RANGE, or VOP_WRITE (with IO_DIRECT), return EINTR if the allocation fails. * When calling fuse_inval_buf_range from VOP_DEALLOCATE, remove PCATCH. This VOP must not fail with EINTR. No new tests, because I can't force any particular getblk call to fail. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293957 Sponsored by: ConnectWise Reported by: zjk7@wp.pl MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The only use for callbacks for NFSv4.0 is delegations and delegations rarely work well for NFSv4.0 anyhow. Therefore, this patch disables callbacks for the NFSv4.0 client. This is the same behavior as occurred when the nfscbd(8) daemon was not running. This change allowed a function called nfscl_getmyip() to be removed from the kernel, which is nice since maintaining this function was bothersome, due to its use of routing, etc. MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
When the nfsd was vnet'd, the VNET macros were hidden behind macros that had the NFSD_ prefix on them. This was done because, at the time, it was thought that something other than vnet might be used for this. That has not happened and probably will not happen, so this patch replaces these obscuring macros with the regular vnet ones. There should be no semantics change caused by this commit. Discussed with: bz, glebius MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'sys/fs/'
There is no point to do it. The VNON type is good enough for fdescfs operations, and changing the type on stat(2) is arbitrary and does not serve much purpose, because we recalculate the returned file type on each stat(2) anyway. But setting the type to VLNK has undesired consequence of namei() trying VOP_READLINK() there, which might fail since it defer the calculation of path to vn_fullpath(). Submitted by: Mike <mmpestorich@gmail.com> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294768 MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Commit 71ac1ec5c9d9 disabled callbacks for the NFS client for NFSv4.0. This patch does the same for the NFSv4.0 server. The only use for callbacks for NFSv4.0 is delegations and delegations rarely work well for NFSv4.0 anyhow. Therefore, this patch disables callbacks for the NFSv4.0 server. This is the same behavior as occurs when vfs.nfsd.issue_delegations is 0. This change allowed the functions called nfsrv_getclientipaddr() and nfsrv_getipnumber() to be removed from the kernel. MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The client tells the server how many callback slots it can handle in the callback session. However, the NFSv4.1/4.2 server can only handle a maximum of NFSV4_SLOTS slots. This patch clips the client's value to that, to avoid using too high a slot# for a callback. Fortunately, I do not know of an extant client that specifies a value greater than NFSV4_SLOTS, so this patch is not really needed, as yet. Also, the client rarely uses a slot# above 0 when doing callbacks. MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
In ncl_getcookie(), a very large value for "off" for a directory can result in "pos" being set to a bogus value (including a negative one), due to truncation. When "pos" is negative, is can skip past the while (pos >= NFSNUMCOOKIES) loop and return a bogus pointer instead of NULL. This patch changes the type to u_int and also adds a sanity check for a very large "off" to ensure that a NULL pointer is returned for this case. This bug has been in the code for decades and I am not aware of any report of it causing a problem for users. Reviewed by: markj Reported by: Joshua Rogers of AISLE Research Team MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56779
debug: classified in
03-filenames_plain1 by
'sys/fs/'
This is needed for various pjdfstest tests which fail with syntax errors if pathconf _PC_NAME_MAX/_PC_PATH_MAX return -1. For NAME_MAX we can use the 9P2000.L Tstatfs call to get namelen from the host. While this could theoretically be different for nested filesystems in the shared mount it is a much better guess than just returning 255. There does not seem to be a way to get the host PATH_MAX, so we just return the conservative kernel default. Found while fixing https://github.com/CTSRD-CHERI/cheribsd/issues/2617. Reviewed by: markj, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56493
debug: classified in
03-filenames_plain1 by
'sys/fs/'
When a file is created via p9fs with restrictive permissions (like 000), the 9P TCREATE request successfully creates and natively opens the file, returning an open, writable file descriptor. Previously, p9fs would attempt a subsequent TOPEN. That TOPEN would fail with EACCES due to the restrictive mode, leaving a 0-byte file and causing operations like 'mv' to abort. We now preserve the writable descriptor returned by TCREATE so that the subsequent VOP_OPEN can use it directly, avoiding the failing TOPEN. Additionally, p9fs_compatible_mode now appropriately isolates the base access intent when matching fids, preventing extended flags from breaking the match. A test case for this behavior has been submitted to pjdfstest: https://github.com/pjd/pjdfstest/pull/87 Resolves: https://github.com/CTSRD-CHERI/cheribsd/issues/2617 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56494
debug: classified in
03-filenames_plain1 by
'sys/fs/'
ufs: support unmapped bufs for indirect blocks in bmap Use unmapped bufs for indirect block buffers in bmap, and use sf_bufs for transient mapping them when we need to read the specific pointer. [kib note: I changed the original patch to use sf_buf instead of explicit DMAP utilization, making the change MI]. Tested by: pho Reviewed by: kib MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53424
debug: classified in
03-filenames_plain1 by
'sys/ufs/'
ufs: ufs_bmap_seekdata() needs mapped buffer for scan PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295348 Reported and tested by: Alastair Hogge <agh@riseup.net> Reviewed by: mckusick Fixes: https://cgit.freebsd.org/src/commit/?id=bab04ddf1fd4 ("ufs: support unmapped bufs for indirect blocks in bmap") MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57036
debug: classified in
03-filenames_plain1 by
'sys/ufs/'
This causes recursion in VFS that is not worth handling. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275570 Reported by: Alex S <iwtcex@gmail.com> Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57043
debug: classified in
03-filenames_plain1 by
'sys/fs/'
On remount, we must accept all the same options as on initial mount. For parameters which we're unable to modify on the fly, fail only if the new value is different from the existing one. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295096 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57044
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The fuse protocol requires server to respond to LISTXATTR with a NUL-terminated string. If they don't, report an error rather than attempt to scan through uninitialized memory for a NUL. Approved by: so Security: FreeBSD-SA-26:20.fusefs Security: CVE-2026-45252 admbugs: 1039 Reported by: Joshua Rogers Sponsored by: ConnectWise
debug: classified in
03-filenames_plain1 by
'sys/fs/'
QEMU warns when msize is <= 8192 due to degraded performance. This change bumps our default msize to 128 KiB, matching the Linux Kernel v5.15 and newer default. Linux supports even larger values, but 128 KiB is a sensible default. We also add a new 'msize' mount option to allow users to override this value, and we validate it against our maximum supported MTU (currently fixed by the UMA zone size). Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56496
debug: classified in
03-filenames_plain1 by
'sys/fs/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295577 MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Long file names are using UTF-16 symbols to represent international or special characters. The implementation in FreeBSD did not support the "Supplementary Private Use Area-B" (PUA-B), which requires a surrogate pair to be represented in UTF-16 (Unicode code points beyond U+FFFF). The PUA-B is used to represent emoji characters, which are supported in file names on other common operating systems. The motivation for this change was that removable media written on another system were only partially readable on FreeBSD, since they contained emojis in file names. A test script that verifies correct operations on files names with emojis has been added to the tools/test/stress2/misc directory under the name msdos24.sh. Reported by: Fabian Keil <fk@fabiankeil.de> Reviewed by: ib Approved by: mkcusick MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D57313
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Git 1111a44301da - main - Defer the January 19, 2038 date limit in UFS1 file systems to February 7, 2106 - did so by changing the UFS1 32-bit signed timestamps to unsigned. With this change, time stamps from before January 1, 1970 went from being negative numbers to large positive numbers implying times in the future. When such a time stamp is encountered when an inode is read into memory or when it is encountered by fsck, its timestamp is replaced with the kernel's current time. Andre Albsmeier reported that he had a machine reboot after a power failure and the battery that maintained its real-time clock had died. The result was that the system booted with the time set to five years earlier (absent a real-time clock value, the boot ROM used the time that the boot ROM had last been updated). The net result was that fsck reset the time stamps of all files newer than five years old to the five year old time. Andres's original request was for a flag in the file system superblock to say that there are no timestamps from before 1970 in the file system, so there shouldn't be anything to fix because of the signed to unsigned switch. But this assumes that no one every does an rsync or extracts a tar file or restores a dump that introduces an incorrect time stamp on their system. So this approach was not taken. This change compares the system's version of the current time to the last modification time in the file system superblock. If the current time is earlier than that time then use the last modification time in the superblock as the value for the current time. There should be no files in the file system with times newer than the last modification time in the superblock. The superblock time stamp is updated in the in-memory superblock every time any change is made to anything in the file system. The superblock is written to the disk every 30 seconds, so it may be off by up to 30 seconds plus the time it sits in the disk cache waiting to be written if the system has an unclean shutdown (such as a power failure). Thus, the worst case scenario with this change is that files written in the last 30 seconds plus disk cache delay time before the crash may have their times adjusted back by up to 30 seconds plus the disk cache delay time. Requested by: Andre Albsmeier Approved by: kib Reviewed by: kib, imp, Andre Albsmeier MFC-after: 1 week Differential Revision: https://reviews.freebsd.org/D57371
debug: Commit manually moved from "unknown" to "filesystems".
Since the File 4.1 layout is only supported by some large configurations of Netapp Filers, switch the client pNFS code to attempting to use Flexible File Format first. File 4.1 Layout should still work for any servers that do no support Flexible File Layout.
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Without this patch, the NFSv4.1/4.2 pNFS server configuration did not support striping. This was mainly because the Linux client driver did not support it either. The Linux client driver for Flexible File layout does now support striping. (Linux kernel version 6.18 or newer) As such, this patch adds striping support. The configuration is currently just two new sysctls called vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe vfs.nfsd.pnfsstripecnt - # of DSs to stripe across A setting of 0 for the first sysctl and 1 for the second disables striping. A patch that allows use of a different striping configuration for each exported MDS file system is planned for the future. The pnfsdscopymr may be broken by this patch, but since no one reported that they were actually using a pNFS server configuration, I do not believe that will be a problem at this time. Until the FreeBSD NFSv4.1/4.2 client is patched to handle striped flexible file layouts, mounts to a striped pNFS configuration must be done without the "pnfs" mount option. (Linux systems with a kernel version of 6.18 or newer should be able to handle a striped pNFS configuration.) Future patches that convert the pNFS server to a "loosely coupled" configuration (which allows the use of non-FreeBSD servers as DSs) are anticipated.
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Commit 4d80d4913e79 fixed a long standing bug in the recovery code. However. glebius@ reported seeing multiple recovery cycles with this patch during an NFSv4.1/4.2 server reboot. This commit should minimize the risk of multiple recovery cycles. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294925 Reported by: Jov <amutu@amutu.com> MFC after: 2 weeks Fixes: https://cgit.freebsd.org/src/commit/?id=4d80d4913e79 ("nfs: Fix argument typo to avoid a crash")
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Commit 72e57bc26417 added support for striping to the pNFS server when using the Flexible File layout. It is configured globally via the following sysctls: vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe vfs.nfsd.pnfsstripecnt - # of DSs to stripe across This patch allows the above settings to be overridden on a per-MDS exported file system basis. With this patch, a stripeunit can optionally be specified for the MDS file system listed when one is listed after a '#' in the "-p" nfsd argument. This is done by appending "@NNN", where NNN is the stripeunit, in bytes. The current syntax implies that neither a '#' nor '@' can be in the MDS mount point's directory path. This patch does not affect current pNFS server configurations (of which there appears to be very few, anyhow).
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Notable upstream pull request merges:
#18372 eaaea55b6 Consistently encode DRR_BEGIN packed nvlist payloads with
NV_ENCODE_XDR
#18410 891e379d0 Fix failfast default and usage
#18470 a2d053329 zdb: Add some more file layout output, triggered by -v
#18472 d50f5b6d0 dsl_dir: avoid dd_lock during snapshots_changed updates
#18493 d65015938 Vdev allocation bias/class change
#18497 8fdc86675 zfs: annotate nested dd_lock in reservation sync
accounting
#18494 956deba27 zdb: detect BRT and DDT leaks during block traversal
#18499 c7cfe0805 zarcstat: detect attached L2ARC device with no data
#18503 439b802e7 sa: fix sa_add_projid lock ordering
#18508 968f4db03 zpool-attach.8: add EXAMPLES section
#18513 45dddc452 zfs.4: Fix documentation of zfs_arc_dnode_reduce_percent
#18516 8ff64005a zap: split implementation out into more files
#18520 181e1b522 Fix double free for blocks cloned after DDT prune
#18535 -multiple zstream: fix crashes when refcount tracking enabled
#18536 -multiple refcount tag fixups
#18541 a65ed7afd zpool/zfs: accept --help and -? after a subcommand
#18544 6fb72fda0 zio_ddt_write: compute have_dvas after taking dde_io_lock
#18546 -multiple zap: internal locking uplift
#18550 40a87651d zap_impl: use flex array field for mzap_phys_t.mz_chunks
#18551 -multiple zap: make the _by_dnode() op variants be the primary
implementation
#18570 112b0131b zpl_xattr: stop heap-allocating prefixed xattr names
#18578 4bc8c39b6 zed: Prefer dRAID distributed spares to regular ones
#18596 e30ab5fa4 FreeBSD: Make it possible to build openzfs.ko with
sanitizers
#18597 472ddca11 zed: Prefer spares with matching rotational and size
#18599 c90dc2808 enforce exact decompressed length for lz4, gzip, and zstd
#18603 -multiple zap: add zap_cursor_init_by_dnode; cursor unit tests;
mock dnode refcounts
#18604 59dc88602 nvpair: Check for un-terminated strings in packed nvlist
#18606 ef6f26145 When reading a vdev label skip libzfs_core_init()
#18613 0aa4088dc sharenfs: Check for invalid characters
#18615 80fb85b80 Fix the integer type in zfs_ioc_userspace_many()
#18616 e199f6d98 Fix uninitialized variable warning in vdev_prop_get()
#18617 7de42602c Extend dataset zfs_ioc_set_prop() secpolicy
#18622 5fea0c838 Parallelize metaslab_sync_done() calls
#18623 cab50d5ad Add additional verification of size fields and strings
#18630 -multiple zap: misc function removal / uplift / tests
#18633 a8ef128da Fix uninitialized variable warning in zil_parse()
Obtained from: OpenZFS
OpenZFS commit: a170134febea405c6b6f5ed51724cdcfb6d8e726
debug: classified in
05-summary-prefix by 'zfs:'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272896 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D57135
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The extra search for an FEXEC fufh shall be removed, since readdir is only supposed to be called on a directory opened with FREAD. The sole exception is NFS, which will call VOP_READDIR with directories that aren't open at all. fuse already has special code to handle that. Also remove the fuse_filehandle_get_dir() function, since it's not used anywhere else. Signed-off-by: CismonX <admin@cismon.net> Reviewed by: asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1729
debug: classified in
03-filenames_plain1 by
'sys/fs/'
When trying to delete or rename a file, fuse_vnop_lookup must check
whether its parent directory's sticky bit is set. Realistically, the
parent directory's attributes will almost always be cached. But it's
possible that they won't be, and in that case we must send a new
FUSE_GETATTR request to the server. If that request fails for some
reason, then we must fail the lookup. Prior to this change fusefs would
ignore failure of that request.
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
and Ke Xu of Tsinghua University
MFC after: 2 weeks
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57588
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Commits c5d72d2 and 3b6d4c6 broke the case where the archive/hidden/system attributes are being set false (UF_ARCHIVE, UF_HIDDEN or UF_SYSTEM bits being cleared.) and the NFS server does not support those attributes. These patches only checked for support if the archive/hidden/system attributes were non-zero. This patch fixes the problem. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296088 Tested by: Joshua Kinard <freebsd@kumba.dev> MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=c5d72d29fe0e ("nfsv4: Add support for the NFSv4 hidden and system attributes")
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Some ZFS pools do not support va_birthtime and will return EINVAL when a VOP_SETATTR() of it is attempted. The MacOS NFSv4 client sets va_birthtime (TimeCreate) in the same Setattr with ctime/mtime and other attributes after a new file is created. The EINVAL failure leaves these new files messed up (mode == 0). This patch pretends the setting of TimeCreate succeeded if ctime/mtime were also set in the same Setattr RPC, which resolves the problem for the MacOS client. If this fix is not sufficient, a new pathconf name to detect if a file system supports birthtime may be needed. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296066 Tested by: Will <freebsd.geography231@slmails.com> MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
03-filenames_plain1 by
'sys/fs/'
This code hasn't changed in a long time, so I don't know why this showed up now?
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Pass the length of a RockRidge attribute to the handler functions and validate that length in each handler. If a parsing error is detected, abort the entire parsing pass. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D57136
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Commit 72e57bc26417 added support for striping to the pNFS server configuration. This patch adds support for striping to the NFS client. For striped flexible file layouts, an extra structure must be malloc()d for each stripe, since the number of stripe servers can vary from one mirror to another. This new structure is called nfsffs and a single one of these structures is in the nfsffm structure so that the non-striped layouts can avoid the additional malloc()'s. This patch only affects NFSv4.1/4.2 mounts that use the "pnfs" mount option against servers that support the flexible file layout.
debug: classified in
03-filenames_plain1 by
'sys/fs/'
The extended attribute record includes four different timestamps: file creation, file modification, file expiration, and file effective date. Only the first two are meaningful for stat(2). The latter two (if handled) would presumably affect if a file is visible for not. Previously, the logic here was a bit contorted and made use of the effective time. It also seemed to treat the creation time as a change time timestamp. Instead, simplify the logic such that the modification time is set to either the modification time (if present), or the creation time. The access and change times are then set to the modification time. NB: This is not used if RockRidge extensions are present, and makefs does not generate the extended attributes record. Differential Revision: https://reviews.freebsd.org/D57748
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Both the Extended Attribute Record in the base ISO-9660 standard and the RockRidge timestamp extension support a file creation timestamp. Use this to populate the birthtime if present. Reviewed by: markj (earlier version) Differential Revision: https://reviews.freebsd.org/D57526
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Port OpenZFS PRs #18597 and #18578 from zed to zfsd.
When activating a spare, sort candidates before trying them:
1. Distributed dRAID spare matching the failed vdev's group (fastest
rebuild via sequential resilver)
2. Regular spares
3. Non-matching distributed spares (kernel will reject anyway)
4. Within each tier: prefer rotational match, then smallest
sufficient size
Also try all healthy spares in order rather than stopping at the
first one, and use sequential rebuild for distributed spares.
debug: classified in
05-summary-prefix by 'zfsd:'
Notable upstream pull request merges:
#18509 f16b3744d zstream: refactor common functions
#18573 -multiple Persist z_seq across znode eviction
s18611 eb0c674c2 zfs_ioctl: fix EBUSY race between quota queries and mount
#18637 77e64d86e Fix self-deadlock when setting the "allocating"/"path"
vdev property
#18645 e3082b923 freebsd: set mnt_time on the rootfs at mountroot time
#18652 50d012b2a zbookmark_compare: handle "marker" bookmarks with negative
levels
#18664 520eeeaa6 Improve performance of "zpool offline" for log devices
#18668 6b8f79877 Avoid more abd_t allocations in RAIDZ/dRAID
#18669 99ab859c3 Optimize metaslab_set_selected_txg()
#18673 97b9ba7a9 delegate: add 'send:encrypted' permission
#18687 2ea519c2a Avoid lookup overhead for nonexistent xattr directories
#18688 87593ea2b Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD
#18693 0483a8e0c Clean up embedded slog metaslab across txgs
#18695 41311c665 RAIDZ: Optimize single data column writes
#18706 37af89948 ddt_log: Fix refcount tagging for begin/commit
Obtained from: OpenZFS
OpenZFS commit: 37af899488652c55c456d3f160fb8b295db2ec70
debug: classified in
05-summary-prefix by 'zfs:'
Recent testing with a modified NFSv4.1/4.2 client that sometimes ignored CB_RECALL callbacks, identified a few problems when handling the unusual case of CB_RECALL not be performed by the client. - The csa_cachethis argument to CB_SEQUENCE was being ignored. - The CB_SEQUENCE operation would reply NFSERR_DELAY after the first CB_RECALL attempt, making retries ineffective. - The code could return NFSERR_RESOURCE, which is a NFSv4.0 specific error code. This patch fixes the above three problems. The patch only affects the NFSv4.1/4.2 client when delegations are being issued and the client somehow fails to handle a CB_RECALL callback of a delegation, which is an unusual case. MFC after: 2 weeks
debug: classified in
03-filenames_plain1 by
'sys/fs/'
Kernel stuff (other than networking, filesystems, and drivers).
The new PRIV_VMM_CREATE and DESTROY permissions should be allowed by jails, so need to be added to the list in prison_priv_check(). Then, modify vmmdev_create() to verify that the jail was created with the allow.vmm flag. This is already verified when opening /dev/vmmctl, but checking again doesn't hurt and ensures that one can't pass the allow.vmm policy by passing a vmmctl fd along a unix domain socket from outside the jail. Rename vmm_priv_check() to vmm_jail_priv_check() to make the function's purpose more clear. Reported by: novel Reviewed by: bnovkov Fixes: https://cgit.freebsd.org/src/commit/?id=d4c05edd410e ("vmm: Add privilege checks to vmmctl operations") Differential Revision: https://reviews.freebsd.org/D56119
debug: classified in
04-filenames_plain2 by 'sys/'
For instance, this is used by DRM drivers to declare the EDID property
of an GPU output connector:
sysctl -b sys.device.drmn1.card0.card0-DP-1.edid | edid-decode
...
Block 0, Base EDID:
EDID Structure Version & Revision: 1.4
Vendor & Product Identification:
Manufacturer: SAM
Model: 29814
Serial Number: 810635354 (0x3051505a)
Made in: week 15 of 2025
...
Reviewed by: bz, emaste, wulf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55176
debug: classified in
04-filenames_plain2 by 'sys/'
After reading both manual pages, our TCP_MAXUNACKTIME is fairly similar to the TCP_USER_TIMEOUT, the only considerable difference is ours is in seconds and linux's in milliseconds. Round up linux's in setsockopt(2) to a next whole second and clamp ours getter to UINT_MAX ms. Reviewed by: tuexen, glebius Differential Revision: https://reviews.freebsd.org/D56168 MFC after: 2 weeks Sponsored by: Sippy Software, Inc.
debug: classified in
04-filenames_plain2 by 'sys/'
kqueue: compare against the size in kqueue_expand This is a cosmetic change, rather than a functional one: comparing the knlistsize against the fd requires a little bit of mental gymnastics to confirm that this is fine and not doing unnecessary work in some cases. Notably, one must consider that kq_knlistsize only grows in KQEXTENT chunks, which means that concurrent threads trying to grow the kqueue to consecutive fds will usually not result in the list being replaced twice. One can also more clearly rule out classes of arithmetic problems in the final `else` branch. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56209
debug: classified in
04-filenames_plain2 by 'sys/'
kqueue: avoid a possible fork-deadlock kqueue_fork_copy() is likely to have transitioned at least one knote through a flux state, so we should check whether we need to wake anything up on the way out to avoid a possible deadlock. This was a part of D56210, but we'll close the review with the next commit. Fixes: https://cgit.freebsd.org/src/commit/?id=b11289f87123f ("kqueuex(2): add KQUEUE_CPONFORK") Reviewed by: kib, markj
debug: classified in
04-filenames_plain2 by 'sys/'
kqueue: simplify knote_fdclose() The influx logic in knote_fdclose() is a little misguided, the resulting wakeup() call should always be redundant: knote_drop_detached() will always issue a wakeup before it returns, so anything waiting on *that* knote that had entered fluxwait should have been woken up then. This is the obvious divergence from the other influx/wakeup pattern in the implementation, which will kn_influx-- and then issue the wakeup after it has processed all of the knotes it can make progress on. While we're here, the kq_knlist cannot shrink, so we can avoid that condition in the loop and avoid potentially excessive wakeups from fluxwait on kqueues that we didn't touch. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56210
debug: classified in
04-filenames_plain2 by 'sys/'
kqueue: add some kn_knlist assertions around knlist_(add|remove) We currently assert that kn_status is accurate, but there's more room for error. Neither of these are very likely, but currently we'd blow up in SLIST*() macros instead of providing more obvious diagnostics. It's perhaps only worth testing these because knlist_remove() requires getting logic across both f_attach() and f_detach() correct. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56211
debug: classified in
04-filenames_plain2 by 'sys/'
kqueue_fork_copy_knote(): zero kn_knlist for the copy before calling knlist_add() Reported by: pho, dhw Fixes: https://cgit.freebsd.org/src/commit/?id=306c9049c642da6a59a5dc088589605a9aa38b87 Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56212
debug: classified in
04-filenames_plain2 by 'sys/'
Fixes: https://cgit.freebsd.org/src/commit/?id=b538d4911004ca541507166b8ec9689d2e87d1aa MFC after: 2 weeks
debug: classified in
04-filenames_plain2 by 'sys/'
Without this patch, diskless root NFS file systems could only be mounted via NFSv3 (or NFSv2). This patch adds the basic support needed to mount a root fs via NFSv4. At this time, the NFSv4 mount will only work if the following is done on the NFS server configuration: - The root directory specified in the "V4:" line in /etc/exports must be "/". This is needed since the path to mount must be the same for NFSv3 and NFSv4. - The NFS server must be configured to do both NFSv3 and NFSv4, since the bootstrap code still uses NFSv3. - The NFSv4 server must be configured with: vfs.nfs.enable_uidtostring=1 vfs.nfsd.enable_stringtouid=1 since the NFSv4 root fs cannot be running nfsuserd(8) when it is booting. (This limitation may be removed in a future commit by hard-wiring enough id<-->name mapping entries to handle things until the nfsuserd(8) is running.) To enable the root fs to be mounted via NFSv4, it needs: - in the root file system's /boot/loader.conf boot.nfsroot.options="nfsv4" (Additional options like rsize=65536,wsize=65536 can also be specified.) - in the root file system's /etc/sysctl.conf vfs.nfs.enable_uidtostring=1 Requested by: Dan Shelton <dan.f.dhelton@gmail.com> MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
This commit adds page & bank fields to ifi2creq in preparation for adding CMIS support for 400g optics to ifconfig. The new ioctl SIOCGI2CPB is added, so that drivers can distinguish between callers asking for page/bank selection and legacy callers that simply failed to zero out all ifi2creq fields. The mlx5en(4) driver and iflib(4) driver frameork have been updated to use this new SIOCGI2CPB ioctl and support page/bank operations. A follow-on patchset will add support to ifconfig for reporting data from CMIS optics. This has been tested on Nvidia ConnectX-7 and Broadcom Thor2 (using out of tree driver) based NICs. Differential Revision: https://reviews.freebsd.org/D55912 Sponsored by: Netflix Inc. Reviewed by: kib
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `strtomem()` and `strtomem_pad()` The DRM generic code started to use `strtomem_pad()` in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55729
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Move `_RET_IP_` to <linux/instruction_pointer.h> This matches the declaration on Linux. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55730
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `_THIS_IP_` For now, the macro is not implemented and it returns 0. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55731
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add mising functions in <linux/kmsg_dump.h> The DRM generic code started to use `kmsg_dump_get_buffer()` and `kmsg_dump_rewind()` in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55732
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `CONFIG_PGTABLE_LEVELS` This is a kernel configuration constant that is expected to be defined. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55733
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `PMD_SHIFT` For now, only define it for x86 architectures. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55734
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add <linux/linux_logo.h> It only defines the `struct linux_logo` structure for now. It does not define any actual logo. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55735
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add <linux/mfd/core.h> To be exact, there was a dummy file with no content before. This commit defines `struct mfd_cell` and adds two function stubs. The function stubs are not implemented but still return success. They log a message to indicate they need to be implemented. Also, unlike Linux, <linux/mfd/core.h> includes <linux/ioport.h>. This works around the fact that we can't include <linux/ioport.h> from <linux/pci.h>, due to a conflict with the FreeBSD-native `struct resource`. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55736
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add field `flags` to `struct resource` This in the Linux version of `struct resource`, not the FreeBSD native structure. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55737
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Document why <linux/pci.h> can't include <linux/ioport.h> Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55738
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `MIN_T()` and `MAX_T()` There are the same as `MIN()` and `MAX()` except that they take a type to cast both arguments to compare. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55739
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define missing `SZ_*` below 1 kib The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55740
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add <linux/ascii85.h> This is used by the i915 DRM driver for some time to log more details about a GPU error, but the code was commented out. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56282
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define diagnostic macros like `might_resched()` or `cant_sleep()` They are no-ops on FreeBSD. While here, move the already defined `might_sleep*()` macros from <linux/wait.h> to <linux/kernel.h> where they belong. The DRM generic code started to use `might_fault()` in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56434
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `dev_err_probe*()` They differ from other `dev_*()` logging functions by returning the passed error code. The error code is also used to determine if the message should be logged in the first place and at which log level. The DRM generic code started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56435
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `__GFP_THISNODE` It is used to force the NUMA node to allocate from. This flag is unimplemented for now because we don't have an implementation of `alloc_pages_node()` yet. The DRM TTM code started to use this flag in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56436
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `sort_r()` Like Linux `sort()` and FreeBSD `qsort()`, `sort_r()` is a wrapper around FreeBSD `qsort_r()`. The i915 DRM driver started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56437
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `MINORBITS` We can't really define a proper value for this constant because minor and major are encoded in a complex way on FreeBSD which cannot be represented with a simple shift. The DRM generic code started to use it in Linux 6.12. In this context, `MINORBITS` is used to define an upper limit passed to `xa_alloc()`. Therefore it is not used to encode or decode minors. It is used as an arbitrary value. Therefore, we define the constant to 20, like on Linux. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56447
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add several `guid_*()` functions The DRM generic code and the amdgpu DRM driver started to use several of these functions in Linux 6.12. Likewise for `UUID_SIZE`. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56448
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Include <linux/uuid.h> from <linux/mod_devicetable.h> The DRM generic code started to deppend on this indirect include of <linux/uuid.h> in Linux 6.12. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56449
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `fop_flags` to `struct file_operations` ... along with the `FOP_*` flag constants. Note that this `fop_flags` field is not used on FreeBSD. It is added to make the DRM drivers compile out of the box. The DRM generic code and drivers started this in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56450
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Pass a `const void *` to `krealloc()` This matches the API on Linux. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56451
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Passing a size of zero to `krealloc()` frees the pointer This matches the API on Linux. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56452
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `struct xa_limit` support to xarray The `xa_alloc*()` functions family takes a `struct xa_limit` to describe the range of IDs the caller wants to allocate. We were using a single mask to qualify a maximum ID only. This commit changes that to use the same `struct xa_limit`. The logic did not change, except it now supports a minimum ID as well. The definition of `XA_LIMIT()` macro is adapted, as well as the definitions of `xa_limit_*` (only `xa_limit_32b` existed, the other two are added with this commit). The DRM generic code started to use this `struct xa_limit` in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56445
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `DEFINE_XARRAY*()` macros The `DEFINE_XARRAY*()` macros are used to declare a static xarray. As the structure embeds a mutex(9), we also need to declare the static mutex after the `struct xarray`. Thus the slightly awkward definition of `DEFINE_XARRAY_FLAGS()`. The DRM generic code started to use `DEFINE_XARRAY_ALLOC()` in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56446
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `copy_from_user_inatomic_nontemporal()` function In Linux 7.1, `__copy_from_user_inatomic_nocache()` was renamed to `copy_from_user_inatomic_nontemporal()`. This change was backported to several LTS branches. This includes Linux 6.12.x and the i915 DRM driver started to use it in that version. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56719
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `__ATTR_RO_MODE()` and `__ATTR_RW_MODE()` They are the same as their `__ATTR_RO()` and `_ATTR_RW()` equivalents but they take the file mode as an extra argument. We now use these new macros to redefine `__ATTR_RO()` and `__ATTR_RW()` on top of them. The amdgpu DRM driver started to use `__ATTR_RW_MODE()` in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57574
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define a bunch of constants in <acpi/video.h> `ACPI_VIDEO_NOTIFY_PROBE` was already defined. Let's define the whole set once and for all. The amdgpu DRM driver started to use `ACPI_VIDEO_DISPLAY_LCD` in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57575
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `pm_resume_via_firmware()` This function is unimplemented, always return false. While here, fix the return type of `pm_suspend_via_firmware()`: it should be a boolean, not an integer. The amdgpu DRM driver started to use `pm_resume_via_firmware()` in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57580
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add 'fd_empty()` The DRM drivers generic code started to use it in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57582
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `COUNT_ARGS()` and `CONCATENATE()` `COUNT_ARGS()` counts the number of arguments it is passed. The implementation is heavily inspired from the one of `CTR()`. `CONCATENATE()` is an alias for `__CONCAT()`. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57584
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Change `strscpy()` and `strscpy_pad()` to make their `len` argument optional The previous implementation always took the `len` but now, it is optional and defaults to the size of `dst`. The DRM drivers started to use `strscpy()` without the `len` in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57585
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `struct vfsmount` in <linux/mount.h> In the context of the DRM drivers, this is used to show GEM objects in a shmfs virtual filesystem. The new `shmem_file_setup_with_mnt()` - also introduced in this commit as an alias to `shmem_file_setup()` - takes a `struct vfsmount` as its first argument to indicate which shmfs mount should be used. For now, the structure is empty. As we don't present GEM objects in a virtual filesystem right now, we can defer the actual implementation of this structure once we have an actual use for it. The DRM generic code started to use it in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57572
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add const qualifier to `bitmap_weight()` 1st arg Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57581
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define and fill `struct cpuinfo_x86->x86_stepping` This will be used in a follow-up commit to implement `x86_match_cpu()`. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57698
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Defined more Intel vendor/family/model constants The i915 DRM driver started to use them in Linux 6.14. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57699
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add <linux/cgroup_dmem.h> In this header, we declare empty stubs for all functions, as if `CONFIG_CGROUP_DMEM` was disabled is Linux. The DRM TTM memory manager started to use this in Linux 6.14. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57702
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `ULL()` It simply appends "ULL" to its argument. The amdgpu DRM driver used it at some point in the development cycle of Linux 6.14 but the use case was dropped later. Let's still add it to linuxkpi because it will help if we need to do a git bisect in drm-kmod. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57703
debug: classified in
04-filenames_plain2 by 'sys/'
As of this commit, all changes to linuxkpi required by the DRM drivers from Linux 6.11 were committed. Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Commit 8b9775912cbc added support for an NFSv4 mounted root file system, but only if the NFSv4 configuration used id numbers in the strings. This patch adds support for the case where the NFSv4 configuration uses name<-->id mappings via nfsuserd(8) by priming the mapping cache with just enough entries so that it works until the nfsuserd(8) is running. They are listed in nfs_prime_userd[] in sys/fs/nfs/nfs_commonsubs.c. The entries in nfs_prime_userd[] are also wired into the kernel's cache for name<-->id mappings when nfsuserd(8) starts up. This is necessary, since an upcall to the nfsuserd(8) daemon for a mapping when looking up the path to the passwd/group database files (/etc) will hang the system, due to a vnode lock being held on the entry in the path which blocks nfsuserd(8) from accessing files. To enable this case, the following must be put in the NFS root file system's /boot/loader.conf: boot.nfsroot.options="nfsv4" boot.nfsroot.user_domain="<user.domain>" where <user.domain> must be the same as nfsuserd uses (usually set via the -domain flag). If boot.nfsroot.user_domain does not exist or is the empty string, ids is strings is configured. MFC after: 1 week Requested by: Dan Shelton <dan.f.shelton@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs")
debug: classified in
04-filenames_plain2 by 'sys/'
In the sb == NULL case, we are computing the size of the note using a dummy sbuf drain handler which counts bytes and discards the contents of the buffer, so the fact that "structsize" is uninitialized doesn't matter. But, the compiler may complain about this, so we might as well just initialize it unconditionally to silence the warning, as other handlers already do. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292811 MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
- When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294039 Reviewed by: kib Tested by: Peter Much <pmc@citylink.dinoex.sub.org> MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234
debug: classified in
04-filenames_plain2 by 'sys/'
linprocfs_doauxv() allocates an automatic sbuf before validating whether the requested read can be satisfied. When the computed auxv read length exceeds IOSIZE_MAX, or when the buffer length is too big, the function returns early without releasing the sbuf. Route these early exits through a shared cleanup path so the sbuf is always deleted after sbuf_new_auto() succeeds. Signed-off-by: Shunchao Hu <ankohuu@gmail.com> Reviewed by: des, spmzt, zlei, aokblast MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2118
debug: classified in
04-filenames_plain2 by 'sys/'
This is motivated by the following race in the ZFS zvol code. When a zvol is created, we create a GEOM-backed zvol, which results in a /dev/zvol/<zvol path> device file, created by GEOM::dev. If volmode=dev is specified, zvol_set_volmode_impl() will wither the GEOM, then create a device file with the same name. This sometimes fails because g_wither_geom() is asynchronous, so we end up trying to create a device file while the old one still exists. I want to fix this by adding a g_waitidle() call to zvol_os_remove_minor(). g_waitidle() is not sufficient: GEOM::dev does not destroy the device until g_dev_orphan() is called. (In fact the device destruction is asynchronous too, but the delist_dev() call is sufficient to address this race.) So, I propose modifying g_waitidle() to block until orphaned providers are processed. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258766 Reviewed by: mav, imp, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55049
debug: classified in
04-filenames_plain2 by 'sys/'
We'll subsequently just knote_free() since the knote is barely constructed, but that bypasses any logic that might release references on owned files/fops. Defer clearing those until the knote actually owns them and update the comment to draw the line more clearly. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56318
debug: classified in
04-filenames_plain2 by 'sys/'
This is purely a cosmetic change to make it a little easier on the eyes, rather than jumping back to the else branch up top. Re-flow it to use another loop on the outside and just inline the re-lock before we repeat after awaking from fluxwait. The !killkn path should maybe issue a wakeup if there's a thread in KQ_SLEEP so that userland can observe the EOF, but this isn't a practical problem today: pretty much every case of knlist_clear is tied to a file descriptor and called in the close(2) path. As a consequence, potentially affected knotes are almost always destroyed before we even get to knlist_clear(). Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56226
debug: classified in
04-filenames_plain2 by 'sys/'
This is not a functional change, but it makes it more clear upon inspection of the definition that the mapping property described is preserved. Maybe more importantly, if one ends up getting an index wrong or punching a hole in the name array unexpectedly, then it'll hopefully manifest more clearly as a (null) or nullptr deref rather than potentially just emitting the wrong namespace name. It's noted that this almost certainly invalidates its use in C++, but there aren't really any known C++ consumers of it- let's just cross that bridge if we get there. Reviewed by: kib, mckusick, rmacklem Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55323
debug: classified in
04-filenames_plain2 by 'sys/'
freebsd11_freebsd32_nstat() invoked copyout(2) when freebsd11_cvtnstat32() failed and skipped copyout on success. This is backwards. Fix this to match freebsd11_freebsd32_nlstat() and freebsd11_nstat(), and only copy the nstat32 result to userspace when conversion succeeds. Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2109
debug: classified in
04-filenames_plain2 by 'sys/'
kobj.h just needs sys/types.h (because it uses u_int, it can't use sys/_types.h). kobj.h isn't a standard thing, so we don't need to be careful about namespace pollution. Sponsored by: Netflix
debug: Commit manually moved from "unknown" to "kernel".
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
If a knote belongs to the list, there is no reason to check for the list emptiness. On the other hand, if the knote does not belong to the list, then checking for emptiness is not enough since there might be a different knote there. Reviewed bu: kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56341
debug: classified in
04-filenames_plain2 by 'sys/'
Linux /proc/partitions reports the major/minor pair, the device size in 1K blocks, and the device name. linprocfs still printed obsolete statistics columns and reported the size in bytes. Update linprocfs_dopartitions() to emit the Linux-style header and report provider sizes in 1K blocks. Signed-off-by: Shunchao Hu <ankohuu@gmail.com> Reviewed by: des MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2126 Closes: https://github.com/freebsd/freebsd-src/pull/2126
debug: classified in
04-filenames_plain2 by 'sys/'
zstd's tracing API (zstd_trace.h) declares ZSTD_trace_compress_begin()
and friends as __attribute__((weak)) externals, gated on the
ZSTD_HAVE_WEAK_SYMBOLS compile-time probe. That probe has covered
x86_64 and i386 since at least zstd 1.5.6, and was extended to aarch64
and riscv in 1.5.7.
In a static kernel image there is no dynamic linker to patch the PLT GOT
entries at runtime. On amd64 the undefined weak symbols resolve directly
to NULL, so the "!= NULL" guard in the zstd source correctly suppresses
every call through the stubs. On aarch64 and riscv the ABI requires
GOT-based indirection for external calls: the PLT stub address is
non-NULL, the guard passes, and the call lands in an uninitialized GOT
slot. Because this happens before exception handlers are in place the
machine resets silently, making the kernel unbootable after the zstd
1.5.7 import.
The upstream-supported suppression is ZSTD_NO_TRACE (zstd_internal.h),
which skips inclusion of zstd_trace.h entirely and forces ZSTD_TRACE=0.
Add it to ZSTD_C alongside the existing ZSTD_* defines, and while here
group all three -DZSTD_* flags onto a single line in alphabetical order
with ${.IMPSRC} on its own line.
Reported by: many
Tested by: lwhsu
X-MFC-with: c0d9a07101a1
debug: classified in
04-filenames_plain2 by 'sys/'
hash(9): introduce hashalloc()/hashfree() KPI This is a more extendable version than traditional hashinit(9). It allows different kinds of slot headers with optional locks. Implement traditional hashinit()/hashdestroy() on top of it. Reviewed by: pouria, gallatin Differential Revision: https://reviews.freebsd.org/D55904
debug: Commit manually moved from "unknown" to "kernel".
hash(9): fix my stupid off-by-one Fixes: https://cgit.freebsd.org/src/commit/?id=abf68d1cf02550c3c0341f5bb90be0d34f655a15
debug: classified in
04-filenames_plain2 by 'sys/'
inpcb: retire INP_DROPPED and in_pcbdrop() The inpcb flag INP_DROPPED served two purposes. It was used by TCP and subsystems running on top of TCP as a flag that marks a connection that is now in TCPS_CLOSED, but was in some other state before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED for this purpose. The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets INP_DROPPED. Use in_pcbdisconnect() instead. Second purpose of INP_DROPPED was a negative lookup mask in inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been removed from the hash. We already have had INP_INHASHLIST that marks inpcb that is in hash. Convert it into INP_UNCONNECTED with the opposite meaning. This allows to combine it with INP_FREED for the negative lookup mask. The Chelsio/ToE and kTLS changes are done with some style refactoring, like moving inp/tp assignments up and using macros for that. However, no deep thinking was taken to check if those checks are really needed, it could be that some are not. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D56186
debug: classified in
04-filenames_plain2 by 'sys/'
tcp: fix !INVARIANTS build Fixes: https://cgit.freebsd.org/src/commit/?id=40dbb06fa73cac37d57563c07e55efd0cabbd488
debug: classified in
03-filenames_plain1 by
'sys/netinet/'
debug: moved to kernel because
'Need to be grouped with
40dbb06fa73cac37d57563c07e55efd0cabbd488'
Implement Linux I2C ioctl translation in the Linux compatibility layer and wire iicbus cdevs up for in-kernel rdwr handling. Support common i2c-dev requests including SLAVE, FUNCS, and RDWR, while rejecting unsupported 10-bit and SMBus operations. Signed-off-by: YAO, Xin <mr.yaoxin@outlook.com> Reviewed by: imp, adrian, pouria Differential Revision: https://reviews.freebsd.org/D56251
debug: classified in
04-filenames_plain2 by 'sys/'
geneve creates a generic network virtualization tunnel interface for Tentant Systems over an L3 (IP/UDP) underlay network that provides a Layer 2 (ethernet) or Layer 3 service using the geneve protocol. This implementation is based on RFC8926. Reviewed by: glebius, adrian Discussed with: zlei, kp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D54172
debug: classified in
04-filenames_plain2 by 'sys/'
Added MAGIC number below and map to linsysfs in bsd_to_linux_ftype() This maps: - `linsysfs` -> `LINUX_SYSFS_MAGIC` (`0x62656572`) Signed-off-by: YAO, Xin <mr.yaoxin@outlook.com> Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/2119
debug: classified in
04-filenames_plain2 by 'sys/'
Now that a functional inpcb can not outlive its socket, just use socket's vnet pointer.
debug: classified in
04-filenames_plain2 by 'sys/'
This fixes the build of the LINT-ACPI kernel. Fixes: https://cgit.freebsd.org/src/commit/?id=4e3fdced7f78 ("qcom_gcc: migrate the MSM8916 support to qcom_gcc")
debug: classified in
04-filenames_plain2 by 'sys/'
In environments where time_t is 32 bits, including the 32-bit library build on amd64, the overflow being tested for cannot happen, and gcc complains with -Wtype-limits, causing the gcc build to fail. Work around this by ifdef'ing out the saturation code on i386. Reviewed by: imp, jfree Discussed with: markj Fixes: https://cgit.freebsd.org/src/commit/?id=e3799530b3ba ("sys/time: Add saturating sbt conversions") Differential Revision: https://reviews.freebsd.org/D56369
debug: classified in
04-filenames_plain2 by 'sys/'
"total" is the number of slots in the array, so wraparound needs to be done when "first" or "last" is greater than or equal to the number of slots. Note that no consumers of the code are currently connected to the kernel build. Reported by: Stanislav Fort <stanislav.fort@aisle.com> Reviewed by: bz, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56371
debug: classified in
04-filenames_plain2 by 'sys/'
Ensure that the .plt and .ipld sections are in the executable memory segment. MFC after: 1 week Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D56403
debug: classified in
04-filenames_plain2 by 'sys/'
John points out that this probably should have been removed in commit 472888018ce, which removed a special case where we'd set desired=0 if the target process has P_INMEM clear. It's not obvious to me that the desired=0 case can't arise by setting an RSS limit to 0, but I'm not sure why we'd try to go the extra mile in that case anyway. Reported by: jhb Reviewed by: kib MFC after: 2 weeks Fixes: https://cgit.freebsd.org/src/commit/?id=472888018ce1 ("proc: Remove kernel stack swapping support, part 6") Differential Revision: https://reviews.freebsd.org/D56140
debug: classified in
04-filenames_plain2 by 'sys/'
Remove the duplicate (incorrect) name. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294542 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56400
debug: classified in
04-filenames_plain2 by 'sys/'
kern_descrip.c: Clarify allocation and freeing of fd map in fdgrowtable() When expanding a file table, the condition for allocating a new map is NDSLOTS(nnfiles) > NDSLOTS(onfiles) whereas for freeing the old map is NDSLOTS(onfiles) > NDSLOTS(NDFILE). If a previously expanded file table were to be expanded slightly again such that the map did not need to be increased, then fdgrowtable could still free the current map. This does not happen currently as nnfiles is rounded up to a multiple of NDENTRIES at the beginning of fdgrowtable() so that every enlargement after the first enlargement will always require a larger map. Though the logic is currently correct, it is unclear and should the earlier rounding up of nnfiles be relaxed or remove, the logic would be incorrect. This patch therefore adds comments and invariants checking the size of the table and map, and updates the map free condition so that it is absolutely clear that the old map will only be deallocated if a new map has been allocated. Signed-off-by: Kristofer Peterson <kris@tranception.com> Reviewed by: kib, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/2029
debug: classified in
04-filenames_plain2 by 'sys/'
file: Fix a format string assertion Reported by: Jenkins Fixes: https://cgit.freebsd.org/src/commit/?id=e75b324c93a1 ("kern_descrip.c: Clarify allocation and freeing of fd map in fdgrowtable()")
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56365
debug: classified in
04-filenames_plain2 by 'sys/'
The Memory Tagging Extension supports both Synchronous and Asynchronous faults, called Tag Check Faults, which are configurable via SCTLR_EL1.TCF0 for userspace and SCTLR_EL1.TCF for the kernel. This commit adds support for handling synchronous tag check faults at EL0 and EL1, although these are only enabled on a per-process basis in userspace, kernel space does not enable tag check faults. A TCF in the kernel will cause a kernel panic like any other virtual memory fault, and a TCF in userspace will result in a SIGSEGV Reviewed by: kib Sponsored by: Arm Ltd Signed-off-by: Harry Moulton <harry.moulton@arm.com> Differential Revision: https://reviews.freebsd.org/D55947
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: gallatin Reported by: Claude Sonnet 4.6 Fixes: https://cgit.freebsd.org/src/commit/?id=1000cc4a0d39 ("so_splice: Disallow splicing with KTLS-enabled sockets") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56385
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D56411
debug: classified in
04-filenames_plain2 by 'sys/'
Lightly parse and preserve the attributes of the args as attributes. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D56407
debug: classified in
04-filenames_plain2 by 'sys/'
Create a script to export the parsed data as json. Include the annotations for the system call arguments, since they are helpful to downstream uses. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D56408
debug: classified in
04-filenames_plain2 by 'sys/'
linux: Support ICMP6_FILTER socket option translation Handle Linux IPPROTO_ICMPV6 socket options in the Linuxulator and map ICMP6_FILTER for both getsockopt(2) and setsockopt(2). Linux and FreeBSD use inverted bit semantics for struct icmp6_filter, so invert the filter contents before/after calling setsockopt/getsockopt. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294434 Reviewed by: pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2138
debug: classified in
04-filenames_plain2 by 'sys/'
linux: Support IPPROTO_RAW socket option translation Handle Linux IPPROTO_RAW socket options in the Linuxulator for both getsockopt(2) and setsockopt(2). Detect the socket family and remap the level to IPPROTO_IPV6 for AF_INET6, reusing the existing option translators. This fixes IPV6_CHECKSUM for IPv6 raw sockets, which Linux programs set at level IPPROTO_RAW rather than IPPROTO_IPV6. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294434 Reviewed by: pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2138
debug: classified in
04-filenames_plain2 by 'sys/'
linux: Translate IPv6 hoplimit ancillary data for recvmsg Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2138
debug: classified in
04-filenames_plain2 by 'sys/'
Provide intuitive log search keywords and increased system consistency. MFC after: 2 weeks Reported by: mav Reviewed by: 0mp, dteske OpenZFS change: d45c8d648 (Improve dmesg kernel message prefix) Differential Revision: https://reviews.freebsd.org/D55765
debug: classified in
04-filenames_plain2 by 'sys/'
This works enough to let me see the marvell switch on the MDIO bus. It uses clause 22, which ixgbe's existing MDIO code doesn't currently support, so it's implemented in a new source file. Since mdio(4) is now required, add it where appropriate to GENERIC kernels. Reviewed by: kbowling Differential Revision: https://reviews.freebsd.org/D50128
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: factor out chandef/chanctx initialization Factor out chandef and chanctx initialization from lkpi_sta_scan_to_auth(). This makes the code a lot more readable and prepares for the next steps that will re-use some of this. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: save the default channel Add a field to struct lkpi_hw to save the default channel for later reuse. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: keep chanctx on a reserved list Keep the chanctx around as we may swap them. In the future (11be) these lists likely need to be (a) limited to maximum number of chanctx possible (see struct ieee80211_iface_limit), and (b) with that also by radio. For the moment keep this simple and start with a single chanctx and build up from there when we get there. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: factor out getting and setting a chanctx Further factor out acquiring the chanctx (either set or new), as well as populating a chanctx with information. This further simplifies lkpi_sta_scan_to_auth() and gives us more reusable function blocks. Sponsored by: The FreeBSD Foundation MFC after; 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: rework lkpi_ic_set_channel()
We are called by net80211 when channel changes are happening and
we have to map this to LinuxKPI 802.11. There are multiple cases:
(1) it is a hardware scan and net80211 still changes the channel;
we do not need to;
(2) it is a software scan (the magic fallback case) in which case
we let net80211 drive the scan channel and we need to keep
a copy of the scan_chandef (see follow-up commit);
(3) no scanning but a normal channel change triggerd by net80211;
in that case we could (should?) setup the full flags right away
but deferred LinuxKPI logic currently handle this for us as not
in all cases the information was fully available from net80211
in times we would have needed it. We only do this in order
to handle the emulate chanctx cases but do not change the
channel otherwise; scan_to_auth will set the correct chanctx.
(3a) we have no (active) chanctx for that, create/set one,
(3b) we do have an (active) chanctx for this, use it but reset to
defaults.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: improve emulate chanctx implementation Now that all dependencies are implemented improve our chanctx emulation. Some drivers still rely on chandef information for channel work. In order to only do chanctx updates within mac80211 in Linux and likewise in the LinuxKPI 802.11 compat layer, emulation functions were introduced which claim to support chanctx driver operation but in reality convert these to chandef field updates and (*config) downcalls. This is relevant to several mt76 chipsets (at least 7615, 7915), and rtw88 and certain rtw89 chipsets (8851b, and the ones not supporting SCAN_OFFLOAD or BEACON_FILTER) for us. Migrate the logic out of the header and improve it. Make use of the introduced dflt_chandef and scan_chandef fields, add comparison of chandefs to see if we have to update, etc. Also add strict checks for driver settings in linuxkpi_ieee80211_alloc_hw() to make sure all preconditions are correctly met. Store the result if we are using the emulation functions in a field, so we can later check on it and also leave a note to the users if emulation is used in order to improve debugging on possible problem reports. Use the new field that we use emulation in lkpi_ic_set_channel() instead of a hand crafted check. Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=ac1d519c01ca8 ("LinuxKPI: 802.11: adjustments for v6.11..")
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add chandef tracing Add chandef tracing so we can follow what is set and unset in the chanctx emulation for drivers still needing this. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: start filling vif->cfg.ap_addr vif->cfg.ap_addr is used by various drivers now and is the BSSID for non-MLO or the AP addr for MLO configurations. If this is unset rtw89 gets cranky and certain packets are likely not going out correctly (also for iwlwifi). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: make sure dtim_period is set When going from ASSOC to RUN LinuxKPI based wireless drivers have certian expectations written in various ways. I believe mac80211 waits to see a beacon before setting the vif to assoc (or the sta to AUTHORIZED). We have some comments in lkpi_update_dtim_tsf() for that. In practice we can filter out the beacons already and know when they came in as we count them but it is hard to split up the state machine and defer the work. So we make sure that dtim_period is set to at least 1 before calling the (*vif_cfg_change) after setting assoc to true; 0 is a reserved value according to the standards. We will update it once we see a beacon and in case the value differs from 1 shortly afterwards from the recv_mgmt callback. While iwlwifi seems to have coped with our initial implementation, rtw89 may hit a DIV 0 if dtim_period is 0 depending on how well the rx path races with our unlocking in assoc_to_run. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add three more driver downcalls Add (*link_sta_rc_update), (*set_bitrate_mask), and (*sta_set_decap_offload) mac80211 driver downcalls in preparation for further work. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: implement ieee80211_start_tx_ba_session() Implement ieee80211_start_tx_ba_session() as a start for rtw8x (and select mt76 chipsets) to support more throughput. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add note about rate control support under boot -v We currently do not support rate control in LinuxKPI. As more drivers and chipsets gain suppport for higher throughput add a note under bootverbose if we hit one of these cases (currently only older iwlwifi chipsets). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: adjust tracing for action/ampdu/addba functions Adjust the pure debug tracing to no longer be under HT and add more to the other functions we are interested in, so we can follow the calls more easily. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: make *addba* work better Fill in more details for lkpi_ic_addba_request(), lkpi_ic_addba_response(), and lkpi_ic_addba_response_timeout(). Migrate the ltxq flags seen_dequeue and stopped to a bitfield and add %b support to log messages. This seemed the better approach after needing an additional stop field for BA while we have to hold packets from being transmitted. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: set flag if frame should be part of an A-MPDU In the output path where we are sending a frame to the driver mark it if it should be part of an A-MPDU based on its tid, type, and whether net80211 thinks that we are in the right state for this. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add print masks for tx status flags Add print masks for tx status flags and use them in the TX tracing in order to more easily debug TX problems. As a result it was easier to determine that some dirver like the mt7921 (or mt76) do not always zero the status bits of the tx status information (it is a union with the control bits passed on TX) and thus we get bogus values back (rather than having flags in a different place than we thought). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: set undefined link in TX control info We are not doing MLO yet so set the undefined link bit in the TX info control message in case a driver checks if the TX would be link specific. Sposnored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: improve hw_crypto key operations mt7921 would happily receive traffic (MC/BC) and decrypt it correctly when hw_crypto was used but TX would only have garbled data in frames. The problem came from the fact with keys for which we do not have an address the driver will pick the "sta" information from different places (driver view of sta or vif). In the downcall this is signalled by the sta argument being NULL as the linux keyconf has no address field. Us passing the sta for first the pairwise key and then also for the group key likely overwrote the pairwise key on the sta and allowed the MC/BC RX operations to succeed anyway (the observed behaviour). Software crypto was fully fine for mt7921 and showed no problems. Looking some other drivers: - iwlwifi/mld picks the ap_sta if the sta argument is NULL; thus it always worked with our previous logic and this went unnoticed. - rtw88 in rtw_sec_write_cam() decides whether to use the sta address or a broadcast address. - rtw89 in rtw89_cam_attach_sec_cam() picks the rtwsta_link if sta is not NULL and has follow-up logic checking on that. It is yet unclear if some of the MC problems observed on rtw8x stem from the same problem. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: force update of net80211 crypto key flags Several drivers (rtw8x, mt76) do not announce the supported ciphers suites in the wiphy instance. This means we never populate net80211 ic_cryptocaps on device creation and thus not announcing any supported hw crypto offload forcing a fallback to software crypto. However when the mac80211 (*set_key) succeeds we know we can offload crypto. At that point the net80211 key flags have IEEE80211_KEY_SWCRYPT set which we want to clear. Historically the net80211 API does not allow this though there should be no ill side effects (base on a quick code inspection). We thus have to DECONST the key argument for now. It is expected that with MFP support this will need to become a common operation and the API will need to change as we will only get the information of some details from the driver on a per-cipher case when the (*set_key) downcall returns. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: leave a comment for sta->rates (mt7615, ?) While we currently try to fill most rates places (e.g., basic_rates, supp_rates, (*set_bitrate_mask)), sta->rates are not populated. They are likely managed by the 802.11 rate control code (given no ieee80211_hw_check HAS_RATE_CONTROL), which for use would be net80211, which will require some extra code just to manage that. At least Mediatek mt76 (mt7615) driver seems to fall into the category of this need. See about that once/if we get to it. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add/improve/correct comments Adjust/add comments to clarify certain situations. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add 11g check to lkpi_ic_getradiocaps() Replace an early comment with code and add a (simplified) 11g check. We make use of the annotated bitrate flags we added (see lkpi_wiphy_band_annotate()) and check if on the 2GHz band there are any bitrates which are 11g. Upon the first one found we do set the IEEE80211_MODE_11G to announce to net80211 that the 2.4Ghz channels may operate on 11g as well. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: introduce TRACE_RATES() Add a tracing bit for tracing rates related changes introduced in followup commits. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: initalize br_mask and basic_rates for each vap During vap creating we inialize most [l]vif related variables. Add a br_mask (bit rate mask) to the lvif and setup the legacy component as it seems to be static. Given we are looping over the bands, also initialize the bss_conf basic_rates. At this point we only have all bitrates for the band or the mandatory bitrates for the band available. In order to not hint usage of possibly unsupported bit rates set it up with the manadatory bit rates only, which should get us through the mgmt frames, etc. to get to assoc state. By then we will do updates. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: make lkpi_sta_sync_from_ni() return bss_changes This is a preparatory change with no functional changes. Sponosred by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add function to update some rate related fields
Add lkpi_sta_supp_rates() which serves multiple purposes:
(a) build (and update) the supp_rates field on a sta link (deflink only
in our case still),
(b) build and update basic_rates on the vif->bss_conf and print a
warning in case we end up without any basic rate (should not happen
anymore, not even on initial startup sync),
(c) if HT or VHT are supported, then update the relevant br_mask fields
for the current band.
Deal with the various flags which trigger different updates by returning
them so the caller can act upon.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add/change rate related tracing Make use of the TRACE_RATES() macro and add various tracing events. Also adjust some events formerly under TRACEOK to TRACE_RATES(). Ignoring the tracing, no other functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: consider emulate_chanctx in lkpi_sync_chanctx_cw_from_rx_bw() Only return early if the bandwidth has not changed and we are not using emulate_chanctx or the chandef.width already matches the new bandwidth. Otherwise we have to continue to get all the values updated. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: track bandwidth/rx_nss change in lkpi_sta_sync_from_ni() In lkpi_sta_sync_from_ni() track the bandwidth and rx_nss at the beginning so at the end we can diff if they changed in order to generate the appropriate RC*CHNAGED flags for the (*link_sta_rc_update) downcall. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: adjust timing of sync_from_ni in lkpi_sta_assoc_to_run() We used to call the (*sta_state) downcall into the driver to set the sta state to ASSOC. After that we did a lot of sync operations incl. the lkpi_sta_sync_from_ni() which does a lot of rate and bandwith adjustments. This sync call needs to happen before we set the sta to assoc as drivers rely on some of this information, e.g., ht_cap and vht_cap (and equivalents for later standards) at that point. Moving this will make, e.g., mt7921 transmit at higher rates than just basic_rates. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: move hex2bin() from kernel.h to new hex.h New Linux v7.0 drivers include hex.h. Rather than adding a dummy header, migrate the kernel.h hex2bin() into hex.h, where it belongs. Care needs to be taken as the _h2b() helper function is still used by other bits in kernel.h. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D56391
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: add default_gfp() Various new allocation macros can take an optional gfp_t argument. If the argument is not given we need to set the GFP_KERNEL default. While this is only internally used and I initialy called it differently, should this spread elsewhere having the same name as in Linux will be good. Sponsored by: The FreeBSD Foundaton MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56392
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: conditionally add __flex_counter() __flex_counter() is used by overflow.h and needed for "flex allocations". It is either a void * typed 0 (NULL) (like this for _Generic checks), or uses __builtin_counted_by_ref. The latter was added to gcc and llvm fairly recently and while for gcc the __has_builtin() check suffices, clang had parts broken until recently so needs an extra check for the next major version. The fixed hash is currently not part of any tag to use, so we play it save (and hope 23 will have it). It will be a while until we will see the builting to be used but at least we will be prepared for it. See inline comments for the commit hashes and versions which added the feature. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56393
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: sync overflow.h from Linux v7.0
overflow.h was imported directly from Linux in 3208d4ad2b8320a.
Update the file to the newer version as needed for v7.0 driver updates.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Obtained from: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 (tag: v7.0)
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D56394
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: add kmalloc_obj[s], kzalloc_obj[s], and kzalloc_flex Drivers in Linux v7.0 seem to have changed to the new allocation macros using a sweep. Add the ones I encountered with wireless drivers so far. They all take an optional argument for a gfp_t, which default_gfp() deals with. The plural version "objs" takes an extra nitems argument in addition to the size. We use size_mul() to possibly detect overflows. The "flex" version uses an extra variable to track the variable sized array allocations and if supported by the compiler will use __builtin_counted_by_ref() to properly track bounds. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56395
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: implement devm_kmemdup_array() Implement devm_kmemdup_array() using devm_kmemdup() in order to prepare for Linux v7.0 based drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56396
debug: classified in
04-filenames_plain2 by 'sys/'
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge as one of the non-mechanical changes which made me look. Rather than (incorrectly) hand counting the offset from the beginning of a frame, use the offset from the beginning of struct ieee80211_mgmt. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: Add structures and functions for NAN support In Linux v7.0 iwlwifi(4) started to add support for Wi-Fi Aware(tm) also known as Neighbor Awareness Networking (NAN). Add structures and fields for this as needed so far to keep the driver compiling. net80211 has no support for it as a new mode. We may consider a dedicated header file for these parts in the future depending on how much more is to come. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
LinuxKPI: 802.11: add struct/fields and functions for v7.0 Add 802.11 struct fields and functions support for Linux v7.0 based wireless drivers (at least iwlwifi, rtw88, rtw89). While here cleanup some other bits. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj, Ricardo Branco <rbranco@suse.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56507
debug: classified in
04-filenames_plain2 by 'sys/'
Reported by: Ricardo Branco <rbranco@suse.com> Reviewed by: markj, Ricardo Branco <rbranco@suse.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56507
debug: classified in
04-filenames_plain2 by 'sys/'
- kaudit_to_bsm: Log IPv6 as well as IPv4 and unix addrs - au_to_sock_inet128: Treat ports the same way as au_to_sock_inet32() as just pushing a uint16 causes byte ordering problems on little endian. Differential Revision: https://reviews.freebsd.org/D39633 Sponsored by: Netflix Reviewed by: csjp
debug: classified in
04-filenames_plain2 by 'sys/'
The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini <npc@anthropic.com> Reviewed by: kib, kevans Fixes: https://cgit.freebsd.org/src/commit/?id=1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046
debug: classified in
04-filenames_plain2 by 'sys/'
pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini <npc@anthropic.com> Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184
debug: classified in
04-filenames_plain2 by 'sys/'
tests/posixshm: Check for hardware support in largepage_pkru MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=ca87c0b8e396 ("pkru: Fix handling of 1GB largepage mappings")
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
debug: moved to kernel because
'Need to be grouped with
ca87c0b8e396fff01d55f1985c2556934c35a950'
The epoch(9) subsystem implements per-CPU queues of object destructors which get invoked once it is safe to do so. These queues are polled via hardclock(). When a CPU is about to go idle, we reduce the hardclock frequency to 1Hz by default, to avoid unneeded wakeups. This means that if there is any garbage in these destructor queues, it won't be cleared for at least 1s (and possibly longer) even if it would otherwise be safe to do so. epoch_drain_callbacks() is used in some places to provide a barrier, ensuring that all garbage present in the destructor queues is cleaned up before returning. It's implemented by adding a fake destructor in the queues and blocking until it gets run on all CPUs. The above-described phenomenon means that it can take a long time for these calls to return, even (especially) when some CPUs are idle. This causes long delays when destroying VNET jails, for instance, as epoch_drain_callbacks() is invoked each time a network interface is destroyed. Work around this problem by not disabling the hardclock timer if there is garbage present in the destructor queues. The implementation of epoch_drain_callbacks() has other problems, but this small change on its own gives a good improvement, especially when running networking regression tests. Moreover, we should aim to invoke destructors in a timely manner, so the change is generally beneficial. Reviewed by: glebius MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56508
debug: classified in
04-filenames_plain2 by 'sys/'
Expose process reaper metadata through struct kinfo_proc so userland
can reconstruct reaper hierarchies from kern.proc.all without adding
a new procctl(2) operation.
Two pid_t fields are added by carving 8 bytes from ki_sparestrings
(46 -> 38), restoring KI_NSPARE_INT to 2 and keeping sizeof(struct
kinfo_proc) unchanged:
ki_reaper: PID of the owning reaper process
ki_reapsubtree: PID of the direct child of the reaper that roots
the subtree the process belongs to
fill_kinfo_proc_pgrp() populates both fields under proctree_lock.
kvm_proclist() is updated for crash dump consumers. The freebsd32
compat struct and freebsd32_kinfo_proc_out() are updated accordingly.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293871
Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56538
debug: Commit manually moved from "unknown" to "kernel".
linux: Support PR_GET_CHILD_SUBREAPER prctl(2) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294651 Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: kib, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2151
debug: classified in
04-filenames_plain2 by 'sys/'
linux: Fix a typo in a header comment PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294651 Reported by: Dmitry Lukhtionov <dmitryluhtionov@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=50ff71e956b6 ("linux: Support PR_GET_CHILD_SUBREAPER prctl(2)") Pull-Request: https://github.com/freebsd/freebsd-src/pull/2151
debug: classified in 01-style
by '[tT]ypo'
debug: moved to kernel because
'Need to be grouped with
50ff71e956b631b56a878bd723a9b32dfbdac60f'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294651 Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: kib, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2151
debug: classified in
04-filenames_plain2 by 'sys/'
kexec_load() + reboot is intended to be equivalent to a system reboot. However kexec_load() can load arbitrary data as the target kernel, leading to execution of arbitrary code, even though it's effectively in a new context. Rather than being equivalent to a system reboot, it's also equivalent to kldload(), which loads arbitrary code into the running kernel. Since kldload() is blocked at securelevel 1, also block kexec_load(). Reported by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=e02c57ff3 ("kern: Introduce kexec system feature (MI)") Sponsored by: Hewlett Packard Enterprise Differential Revision: https://reviews.freebsd.org/D56580
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `struct kmsg_dump_detail` This structure is used in a modified definition of `struct kmsg_dumper` field `dump` in Linux 6.12. Therefore this field has two definitions put behind the values of `LINUXKPI_VERSION`. The DRM generic code started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56433
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add more `struct folio`-related functions The i915 DRM driver started to replace the use of `struct page` by `struct folio` in its GEM shmem code in Linux 6.12. linuxkpi were missing a few more functions: `kmap_local_folio()`, `memcpy_to_folio()` and `offset_in_folio()`. They are equivalent of their `struct page` counterparts. One difference is that `kmap_local_folio()` takes an offset argument and the returned address takes this offset into account. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56438
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `fd_file()` This macro simply returns the `file` field of the `struct fd`. The DRM generic code and the amdgpu driver started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56440
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `mem_is_zero()` The DRM generic code and the i915 DRM driver started to replace the use of `memchr_inv()` by a `mem_is_zero()` in Linux 6.12. We reuse the previous use of `memchr_inv()` to implement `mem_is_zero()`. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56442
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `kmemdup_array()` It is similar to `kmemdup()` but takes a number of elements to duplicate and their size. The i915 DRM driver started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56444
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: <asm/unaligned.h> is moved to <linux/unaligned.h> in Linux 6.12 Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56454
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define a guard for the `mutex` type The amdgpu DRM driver started to use `guard(mutex)` in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56571
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `register_pm_notifier()` and `unregister_pm_notifier()` They are empty stub returning success for now, like the previously defined stubs in this header. Several constant are also defined in the process. The amdgpu DRM driver started to use them in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56572
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `atomic_read_acquire()` This function calls `raw_atomic_read_acquire()` which is also added. They are located in <linux/atomic/*.h> headers, both included from <linux/atomic.h>. The amdgpu DRM driver started to use this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56573
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `system_state` This is a global variable used to track the state of the system, like booting, running, halting and so on. This variable is based on the `enum system_states` enumeration. For now, always set `system_state` to `SYSTEM_RUNNING`. The amdgpu DRM driver started to use this in Linux 6.12.x. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56575
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `DIV_U64_ROUND_UP()` It is the same as `DIV64_U64_ROUND_UP()` but takes a 32-bit integer as the divisor. The amdgpu DRM driver started to use this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56576
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `rb_add()` It is the same as `rb_add_cached()` but it works on `struct rb_root`, not a `struc rb_root_cached`. It also does not return anything. The DRM generic code started to use this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56577
debug: classified in
04-filenames_plain2 by 'sys/'
FreeBSD has a native membarrier(2) syscall which is mostly compatible with Linux. This is a thin wrapper around kern_membarrier() that translates all available commands and flags. Also update the syscalls.master prototypes to match the Linux 5.10+ three-argument form. Pre-5.10 binaries using the two-argument form continue to work: cpu_id is only consulted for RSEQ commands, which FreeBSD does not support and which kern_membarrier() rejects with EINVAL, matching Linux semantics. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281691 Reviewed by: kib, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2147
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Move {lower,upper}_32_bits macros to <linux/wordpart.h>
... from <linux/compiler.h>.
<linux/wordpart.h> is the header defining them on Linux 6.12 (I didn't
check older versions).
<linux/wordpart.h> is also included from <linux/kernel.h>.
The DRM generic code started to depend on <linux/wordpart.h> in Linux
6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56441
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add Linux 6.12 variant of `kvrealloc()` In Linux 6.12, the API changed to be closer to `krealloc()`: * The function does not take the old size anymore * The function becomes a wrapper around `krealloc()` with a fallback mechanism. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56453
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Move `ARRAY_SIZE` to <linux/array_size.h> The DRM generic code started to import this header directly in Linux 6.12.x. Let's move the definition of `ARRAY_SIZE()` (the only thing that <linux/array_size.h> defines) to this header. Also, include <linux/array_size.h> from the same headers as Linux. This includes <linux/kernel.h>, so the change should not break anything. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56570
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `memdup_array_user()` The amdgpu DRM driver started this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56574
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Define `min_array()` and `max_array()` They are macros that return the minimum or maximum values of an array of integers. They assume that the array contains elements. The i915 DRM driver started to use `min_array()` in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56583
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Add `pci_dev_is_disconnected()` For now, it is an empty stub that always return false. On Linux, it looks at an internal error state of the device to determine if it is disconnected. The amdgpu DRM driver started this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56582
debug: classified in
04-filenames_plain2 by 'sys/'
linuxkpi: Move `GENMASK()` to <linux/bits.h> ... from <linux/bitops.h>. This matches the location on Linux. <linux/bits.h> is also included from <linux/bitops.h>. Therefore it will not break anything. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56584
debug: classified in
04-filenames_plain2 by 'sys/'
`sizeof(*ndev->name)` is `sizeof(char)`, not IFNAMSIZ, so the interface name was effectively limited to a single byte. Use `sizeof(ndev->name)` for the `char name[IFNAMSIZ]` member. Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed by: pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2111
debug: classified in
04-filenames_plain2 by 'sys/'
Add missing directories and fix alphabetical ordering Signed-off-by: Minsoo Choo <minsoo@minsoo.io> Sponsored by: FreeBSD Foundation Reviewed by: imp, mhorne, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2146
debug: classified in
04-filenames_plain2 by 'sys/'
This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also defined in this commit. It is defined as a no-op flag as it is not implemented. The DRM generic code started to use it in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56587
debug: classified in
04-filenames_plain2 by 'sys/'
It indicates to `alloc_pages()` to allocate the pages from the current NUMA domain. If it couldn't, it should not retry elsewhere and return failure. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56590
debug: classified in
04-filenames_plain2 by 'sys/'
The seq_file.rst documentation in the Linux kernel documents the iterator interface for the seq_file structure. In particular, the ppos passed to seq_read is a logical offset into a seq_file managed by the iterator interface, not an offset into the generated data. For example, if a seq_file outputs state for each node in a linked-list or array, *ppos might be used as the index of the node to output, not a byte offset. Rewrite seq_read to honor this contract which fixes a few bugs: - Treat *ppos as a logical iterator offset that is only updated by the next callback after outputting a single item via the show method. - Use a loop to permit outputting descriptions of multiple items if the user buffer is large enough. - Always invoke the stop method after terminating the loop to cleanup any state setup by start (e.g. if start allocated a buffer or obtained a lock, the stop method is called to cleanup). While here, implement support for SEQ_SKIP as documented in the Linux documentation even though it is not currently used in the tree. Reviewed by: bz Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D55899
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
This removes the need for several casts to pointer in callers. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Add explicit uintptr_t casts to the arguments to these macros so that the work both with virtual addresses (e.g. vm_offset_t) and pointers. Drop no-longer-needed casts in various invocations of DMAP_TO_PHYS. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Add a new PHYS_TO_DMAP_ADDR that still returns an address for use in places that only need an address and not a pointer. Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Suggested by: kib Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
04-filenames_plain2 by 'sys/'
Effort: CHERI upstreaming Sponsored by: AFRL, DARPA
debug: classified in
04-filenames_plain2 by 'sys/'
kern: vfs: add MAC checks for mount/unmount/update The unmount check is straightforward and only really needs the struct mount and flags used, in case a MAC policy wants to reject force-unmounts or do special handling for FSID-based unmounts. The mount check offers as much information as I think might be of interest to a MAC policy: the vnode to be mounted on, vfsconf, and applicable mount options. XNU also has a later version that just takes a struct mount for everything that VFS_MOUNT() has to offer, but my draft policy doesn't need any of that. It also doesn't really need the unmount check, but it seems reasonable to add it while I'm here. The update check similarly passes the flags/options for the operation, along with the struct mount and label. Reviewed by: kib, olce Differential Revision: https://reviews.freebsd.org/D55601
debug: classified in
04-filenames_plain2 by 'sys/'
kern: mac: sprinkle a bit of const correctness mpc_name and mpc_fullname are string literals in correct usage, so they should really be const instead. mpc_ops aren't typically const, but the framework shouldn't be doing anything to clobber it; thus, good to constify it as a reminder. Switch to using a slightly more semantically correct `void **` in the fastpath bits while we're here, since we only do arithmetic on the outer layer of pointer and compare the inner to a pointer-typed (NULL). Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D55702
debug: classified in
04-filenames_plain2 by 'sys/'
kern: mac: bump the MAC_VERSION for 16.x Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D55703
debug: classified in
04-filenames_plain2 by 'sys/'
The specificgid functionality has historically allowed only a single group to be exempt, but in practice one might want a few services to be exempt for reasons. From a security perspective, we probably don't want to encourage unrelated users to be grouped together solely for this purpose, as that creates one point of shared access that could be used for nefarious purposes. Normalize the group list as we do cr_groups to allow for linear matching rather than quadratic, we just need to account for the differences in FreeBSD 15.0+ where cr_groups is entirely supplementary groups vs. earlier versions, where cr_groups[0] is the egid and the rest is sorted. Reviewed by: csjp, des (earlier version) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D56592
debug: classified in
04-filenames_plain2 by 'sys/'
The pass(4) driver's CAMIOCOMMAND and CAMIOQUEUE ioctls accept arbitrary CCBs from userland. This device requires root to open, and thus send these commands. Previously, the only func_code filter was a blocklist check against the XPT_FC_XPT_ONLY flag. This missed several dangerous func_codes that lack that flag: - XPT_ABORT: the abort_ccb field is a raw kernel pointer from the user CCB payload. xpt_action_default() dereferences it without validation, leading to kernel crashes or worse. - XPT_SASYNC_CB: the callback and callback_arg fields come directly from the user CCB payload and get registered as a kernel async callback, allowing arbitrary kernel code execution. - Target mode CCBs (XPT_EN_LUN, XPT_TARGET_IO, etc.) fall through directly to the SIM with user-controlled payloads. Replace the XPT_FC_XPT_ONLY blocklist with an explicit allowlist of CCB function codes that are known to be safe for userland to submit: I/O operations (SCSI, ATA, NVMe, SMP, MMC), device queries, transport settings, and a handful of safe control operations (NOOP, REL_SIMQ, RESET_DEV, DEBUG). Normally, the /dev/pass* permissions only allow root to access them, so this is only a safety issue by default. Also reject CAM_DATA_PADDR and CAM_DATA_SG_PADDR, since these pass user-supplied physical addresses directly to DMA with no validation, which on systems without an IOMMU allows arbitrary host memory access. Add `options PASS_UNSAFE_PADDR` to allow the old behavior. Verified that camdd, camcontrol, smartmontools, and cdrtools use only func_codes on the allowlist (XPT_SCSI_IO, XPT_ATA_IO, XPT_NVME_IO, XPT_NVME_ADMIN, XPT_PATH_INQ, XPT_GDEV_TYPE, XPT_GET_TRAN_SETTINGS, XPT_SET_TRAN_SETTINGS, XPT_RESET_DEV, XPT_DEBUG) and none use CAM_DATA_PADDR. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293888, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293890 Assisted-By: Claude Opus 4.6 (1M context) Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D56486
debug: classified in
04-filenames_plain2 by 'sys/'
XPT_GDEVLIST in xpt_action_default has two early-return paths (list changed and index not found) that set cgdl->status but not ccb_h.status. Since xpt_action sets ccb_h.status to CAM_REQ_INPROG before dispatching, and XPT_GDEVLIST is an non-queued CCB, cam_periph_ccbwait skips the sleep loop and immediately hits the KASSERT checking that status != CAM_REQ_INPROG, causing a panic. Set ccb_h.status = CAM_REQ_CMP at the top of the code rather than the bottom. Any future error paths will be right (since this command can't fail at the command level, just in the status of the data level). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293899 Assisted-By: Claude Opus 4.6 (1M context) Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D56487
debug: classified in
04-filenames_plain2 by 'sys/'
Create a tunable for the maxinum number of 'high power' commands to schedule, kern.cam.max_high_power. Default remains at 4. Differential Revision: https://reviews.freebsd.org/D56462
debug: classified in
04-filenames_plain2 by 'sys/'
It turns out interface ioctls are defined not just in sockio.h, but are spread among many files. When I added SIOCGI2CPB at the bottom of the file, the next number (160) collided with an ioctl (IPSECGREQID) that I was unaware of in another file. Fix this by moving to a number that is unclaimed. Fixes: https://cgit.freebsd.org/src/commit/?id=cf1f21572897 (net: Add SIOCGI2CPB ioctl & add page/bank fields to ifi2creq) Reported by: dhw Reviewed by: imp
debug: classified in
04-filenames_plain2 by 'sys/'
kgss: remove KGSS_VNET_* macros family The original idea was that something else than VNET(9) might be used for kgss in jails, but that is very unlikely to happen. Mechanical change done with sed+grep. No functional change. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56560
debug: classified in
04-filenames_plain2 by 'sys/'
kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks These RPC methods correctly acquire the kgss_gssd_handle later with call to kgss_gssd_client(). Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56561
debug: classified in
04-filenames_plain2 by 'sys/'
kgss: de-virtualize kgss_gssd_handle The RPC client is more of a class rather than an instance. RPCs from different VNETs are served by the same client. This makes the kgss layer fully transparent to VIMAGE and not even required to be aware of it. It is responsibility of the rpcsec_gss module to have curvnet set on the calling thread when doing RPC calls via kgssapi. This change should enable proper operation of an NFS server with gssd(8) in a VIMAGE jail. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294501 Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56562
debug: classified in
04-filenames_plain2 by 'sys/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'sys/'
The inotify flags are copied from the lower vnode into the nullfs vnode so that the INOTIFY() macro will invoke VOP_INOTIFY on the nullfs vnode; this is then bypassed to the lower vnode. However, when a nullfs vnode is reclaimed we should clear these flags, as the vnode is now doomed and no longer forwards VOPs to the lower vnode. Add regression tests. Remove a test in vn_inotify_revoke() which is no longer needed after this change. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292495 Reviewed by: kib Reported by: Jed Laundry <jlaundry@jlaundry.com> Fixes: https://cgit.freebsd.org/src/commit/?id=f1f230439fa4 ("vfs: Initial revision of inotify") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56639
debug: classified in
04-filenames_plain2 by 'sys/'
MFC after: 1 week Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Add following sys/fs entries to linprocfs(4): * proc/sys/fs/file-max * proc/sys/fs/file-nr * proc/sys/fs/nr_open * proc/sys/fs/overflowuid * proc/sys/fs/overflowgid * proc/sys/fs/suid_dumpable * proc/sys/fs/protected_hardlinks Also, add /proc/sys/kernel/threads-max Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294713 Reviewed by: markj, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2159
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: imp, jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56536
debug: classified in
04-filenames_plain2 by 'sys/'
SA_UNSUPPORTED was introduced in Linux 5.11 to probe support for other flags such as SA_EXPOSE_TAGBITS, introduced at the same time. Ignore both. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289285 Reviewed by: pouria, kib Pull-Request: https://github.com/freebsd/freebsd-src/pull/2163
debug: classified in
04-filenames_plain2 by 'sys/'
The buggy version allowed userspace to overflow the copy into adjacent execve KVA regions, which enables, among other things, injecting environment variables into privileged processes. Approved by: so Security: FreeBSD-SA-26:13.exec Security: CVE-2026-7270 Reported by: Ryan Austin of Calif.io Reviewed by: brooks, kib Fixes: https://cgit.freebsd.org/src/commit/?id=f373437a01a3 ("Add helper functions to copy strings into struct image_args.") Differential Revision: https://reviews.freebsd.org/D56665
debug: classified in
04-filenames_plain2 by 'sys/'
When under heavy load or churn, inline ktls offload NICs may run out of hardware resources described by ktls send tags. Rather than waiting for connections to pass through the time_wait state, reclaim the ktls send tags early, at entry to time_wait. By preventing potentially tens or hundreds of thousands of sessions from holding send tags in time_wait, this allows more ktls sessions to be offloaded to hardware. Reviewed by: glebius, kib, nickbanks_netflix.com, rrs, tuexen Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56610
debug: classified in
04-filenames_plain2 by 'sys/'
debug: classified in
04-filenames_plain2 by 'sys/'
preload: add "show preload" DDB command This is the DDB equivalent of the debug.dump_modinfo sysctl which outputs pretty-printed bootloader metadata. Move sbuf_db_printf_drain to subr_prf.c and expose it for general use. Reviewed By: jmg Differential Revision: https://reviews.freebsd.org/D53763
debug: classified in
04-filenames_plain2 by 'sys/'
ddb.4: add 'show preload' entry For the recently added command. Fixes: https://cgit.freebsd.org/src/commit/?id=b683fd0b3206 ("preload: add "show preload" DDB command")
debug: classified in
02-filenames_wildcards by
'.*\.[1-9]'
debug: moved to kernel because
'Need to be grouped with
b683fd0b3206b35214f7f87805246e5c74552942'
They use another set of constants and macros in <asm/intel-family.h>. All these macros are defined regardless of the architecture, even though they are specific to x86. Perhaps we should restrict them using #ifdefs. The amdgpu DRM driver started to used `VFM_MODEL()` and the `INTEL_*LAKE*` constants in Linux 6.12.x. Reviewed by: bz, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56585
debug: classified in
04-filenames_plain2 by 'sys/'
This macro will return non-zero if there are threads waiting for this lock; otherwise, it will return zero. The function assumes (but does not assert) that the caller already holds the lock and that it is interested in other threads waiting for it to release the lock. The motivation to add this is the implementation of `rwsem_is_contended()` in linuxkpi. This Linux function indicates the same thing to the caller: if other threads are waiting for this semaphore. The amdgpu DRM driver started to use `rwsem_is_contended()` in Linux 6.12. Reviewed by: bz, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56443
debug: classified in
04-filenames_plain2 by 'sys/'
As of this commit, all changes to linuxkpi required by the DRM drivers from Linux 6.12.84 were committed. Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
in cases there is no page pressure or when the user lost patience waiting for very large allocation. Other case is already handled by vm_wait_intr(). Reported by: "Lizzie from Eden Emulator project" Reviewed by: adrian, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56725
debug: classified in
04-filenames_plain2 by 'sys/'
These system calls exist to decouple the Linux filesystem credentials from the effective credentials, avoiding signal exposure during privilege transitions. The signal permission model that motivated this was revised in Linux 2.0, making these syscalls obsolete for new applications. Implement both syscalls as no-ops that return the current effective UID/GID as the previous filesystem UID/GID. Linux returns the previous filesystem UID/GID for these syscalls with no error indication. Same for the equivalent setfsuid16() & setfsgid16() system calls. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294879 Reviewed by: kib, pouria Pull-Request: https://github.com/freebsd/freebsd-src/pull/2175
debug: classified in
04-filenames_plain2 by 'sys/'
D40479 changed namei() so that an absolute symlink target encountered during an ABI-root lookup restarts from the native root. This helps the native fallback case, but it also makes successful lookups inside an ABI root escape that root while following absolute symlinks. Only switch absolute symlink lookup to the native root after namei() is already in the restarted/native fallback pass. Do not mark the lookup as restarted merely because an absolute symlink was encountered while still resolving inside the ABI root. This preserves the intended native fallback behavior while keeping absolute symlinks within a successfully resolved ABI-root path in the ABI namespace. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289739 Reviewed by: kib Fixes: https://cgit.freebsd.org/src/commit/?id=cea7c564c70a ("namei: Reset the lookup to ...") Pull-Request: https://github.com/freebsd/freebsd-src/pull/2166
debug: classified in
04-filenames_plain2 by 'sys/'
Various places in CTL assume that initiator IDs are not larger than CTL_MAX_INIT_PER_PORT. Other IDs such as lun IDs are validated in places such as ctl_scsiio_precheck, but initiator IDs submitted by userland were not previously validated. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291059 Reported by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56628
debug: classified in
04-filenames_plain2 by 'sys/'
Without this patch, all upcalls to the gssd daemon are done in vnet0 (outside of any vnet jail). This does not work well, because a user principal's credential cache can be within the jail (/tmp/krb5cc_NNN in the jail's namespace). This patch modifies the client so that RPCs done from within vnet jails does an upcall to a gssd daemon running within the vnet jail. It required that the cache of uid->credential shorthands in the rpcsec_gss be vnet'd. The situation is still less than ideal and sec=krb5[ip] mounts that are visible within vnet jails is still not something I would recommend, but it can work ok with this patch. Vnet'ng the NFS client so that mounts can be done within vnet jails is probably more useful, but that will require additional work. Discussed with: glebius MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'sys/'
for MacOSX partial compatibility, defined as O_PATH | O_NOFOLLOW. fstat(2) and freadlink(3) works on the resulting file descriptors, but reads on the regular file do not. More complete but more hackish version was developed but deemed too hackish. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56365
debug: classified in
04-filenames_plain2 by 'sys/'
Only call buf_flush() if there are some dirty buffers belonging to the vnode we are allocating the buffer for. Otherwise the bd dirty queue scan cannot find anything and it makes no sense to spend CPU doing it.
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision:
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision:
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
to indicate non-empty vnode knote list. Use it instead of VN_KNLIST_EMPTY() and guard note activations with it. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
When the krpc was vnet'd, the VNET macros were hidden behind macros that had the KRPC_ prefix on them. This was done because, at the time, it was thought that something other than vnet might be used for this. That has not happened and probably will not happen, so this patch replaces these obscuring macros with the regular vnet ones. There should be no semantics change caused by this commit. Discussed with: bz, glebius MFC after: 1 month
debug: classified in
04-filenames_plain2 by 'sys/'
Add a regression test. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294014 Reported by: diizzy Reviewed by: glebius MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=d15792780760 ("unix: new implementation of unix/stream & unix/seqpacket") Differential Revision: https://reviews.freebsd.org/D56764
debug: classified in
04-filenames_plain2 by 'sys/'
This helps ensure that overflows will trigger a panic instead of silently corrupting adjacent buffers, as happened in SA-26:13.exec. Extend kmap_alloc_wait() to support allocation of guard pages on both sides of a KVA allocation. Modify the exec_map setup accordingly. Add the "vm.exec_map_guard_pages" tunable to provide control over the guard page allocations. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56711
debug: classified in
04-filenames_plain2 by 'sys/'
This fixes an "unused variable" warning when building DRM drivers. Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56780
debug: classified in
04-filenames_plain2 by 'sys/'
nfs_pub is used only in vfs_export.c. Reviewed by: kib, rmacklem Differential Revision: https://reviews.freebsd.org/D56777
debug: classified in
04-filenames_plain2 by 'sys/'
Writing to /proc/$pid/regs can also be leveraged to mess with memory. Only allow a trusted process to do so. Sponsored by: Hewlett Packard Enterprise Development LP. Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D56763
debug: classified in
04-filenames_plain2 by 'sys/'
eventhandler: Fix a race when pruning eventhandlers By default, eventhandler_deregister() blocks until it reaches some point where no threads are invoking the event. At this point, it knows that 1) no threads are currently executing the handler, 2) some thread has freed the eventhandler structure by virtue of having called eventhandler_prune_list(), so it is safe to return. Suppose a thread is trying to deregister an event handler. A different thread prunes it, and wakes up the first thread. Before the first thread runs, a third thread grabs the event handler lock, and starts executing handlers. The first thread observes el_runcount > 0, and goes back to sleep. The third thread sees no event handlers to prune, and doesn't wake up the first thread, which sleeps forever. This change fixes the race and tries to make eventhandler_invoke() more efficient: keep a count of the number of dead list entries and only prune the list if there is at least one dead entry. Also, in eventhandler_deregister(), we only need to sleep if some dead entries are present, rather than sleeping whenever some thread is running handlers. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56767
debug: classified in
04-filenames_plain2 by 'sys/'
eventhandler: Fix the NODEBUG build Reported by: Michael Butler <imb@protected-networks.net> Fixes: https://cgit.freebsd.org/src/commit/?id=735b16d490ae ("eventhandler: Fix a race when pruning eventhandlers")
debug: classified in
04-filenames_plain2 by 'sys/'
The __maybe_unused attribute should be used for variables which may or may not be used, such as when their only use is in an assertion. This attribute is functionally identical to __unused, suppressing compiler warnings for particular variable if it remains unused. Reviewed by: Minsoo Choo <minsoo@minsoo.io>, imp Differential Revision: https://reviews.freebsd.org/D56517
debug: classified in
04-filenames_plain2 by 'sys/'
Inspired by discussion in https://github.com/freebsd/freebsd-src/pull/2016 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56624
debug: classified in
04-filenames_plain2 by 'sys/'
Blocking allocation is safe in all of the current callers of kobj_init (most of them do a M_WAITOK malloc of the structure passed as the first argument to kobj_init just before calling it). kobj_init doesn't return an error code but instead panics if the nested malloc in kobj_class_compile1 fails, so using M_WAITOK here is more robust. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56625
debug: classified in
04-filenames_plain2 by 'sys/'
Just put the priv_check calls in the code. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56864
debug: classified in
04-filenames_plain2 by 'sys/'
This ensures this header can be included without an explicit or implicit sys/types.h include first. This causes issues building SPEC2017 which includes sys/rtprio.h and then we get an error due to missing u_char definition. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52041
debug: classified in
05-summary-prefix by 'sys:'
Previously, the UMA zones required for 9P requests (p9fs_buf_zone, p9fs_req_zone, etc.) were initialized and destroyed in the virtio_p9fs transport module. This caused issues when unloading the core p9fs module. This change moves p9_init_zones() and p9_destroy_zones() into p9fs_init() and p9fs_uninit() inside p9fs_vfsops.c so that they are correctly bound to the VFS filesystem module lifecycle via vfs_modevent, aligning p9fs with standard FreeBSD VFS semantics. Found while fixing https://github.com/CTSRD-CHERI/cheribsd/issues/2617. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56492
debug: classified in
04-filenames_plain2 by 'sys/'
Only call buf_flush() if there are some dirty buffers belonging to the vnode we are allocating the buffer for. Otherwise the bd dirty queue scan cannot find anything and it makes no sense to spend CPU doing it. Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56863
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56863
debug: classified in
04-filenames_plain2 by 'sys/'
Noted by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Previously the cr_pid field would be incorrectly copied to userland, due to a size mismatch between the structure as defined in 32-bit vs 64-bit builds. Fix it by converting the structure before copying it to userland. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294833 Sponsored by: ConnectWise MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D56675
debug: classified in
04-filenames_plain2 by 'sys/'
Suggested by: kib Reviewed by: imp, kib Discussed with: emaste, jrtc27 Differential Revision: https://reviews.freebsd.org/D56783
debug: classified in
04-filenames_plain2 by 'sys/'
Suggested by: kib Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D56401
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56892
debug: classified in
04-filenames_plain2 by 'sys/'
for MacOSX partial compatibility, defined as O_PATH | O_NOFOLLOW. fstat(2) and freadlink(3) works on the resulting file descriptors, but reads on the regular file do not. More complete but more hackish version was developed but deemed too hackish. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D56365
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
to indicate non-empty vnode knote list. Use it instead of VN_KNLIST_EMPTY() and guard note activations with it. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
The source sweep is not going to happen. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in
04-filenames_plain2 by 'sys/'
There are situations where nothing from sys/cdefs.h is needed except for the declaration braces. More, the other facilities from sys/cdefs.h might unnecessarly pollute the namespace. Reviewed by: markj, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56889
debug: Commit manually moved from "unknown" to "kernel".
Mark assembly files as not requiring executable stacks. This still leaves linux32_vdso.so without a .note.GNU-stack section in the gcc build for now. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D56894
debug: classified in
04-filenames_plain2 by 'sys/'
Make sleep type names clearer and more consistent, and allow space for something like "os_hibernate" once that gets added to FreeBSD. Reviewed by: jaeyoon, olce, markj Approved by: jaeyoon, olce, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56920
debug: classified in
04-filenames_plain2 by 'sys/'
Just so it isn't so long. Changing now before the API freezes, after discussion with olce@. While here, improve the wording in the comments for power transitions and sleep types a bit. Reviewed by: olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56953
debug: classified in
04-filenames_plain2 by 'sys/'
Unprotected allocations are intended to be accessible outside of the current VM on systems such as Arm CCA. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56518
debug: classified in
04-filenames_plain2 by 'sys/'
In Arm CCA we need to find all memory to protect it. This needs to find all memory, ignoring any excluded memory to protect it from the host. Add physmem_all that reads all physical memory regions. Co-developed-by: Andrew Turner <andrew@> (writing tests & commit message) Sponsored by: Arm Ltd
debug: classified in
04-filenames_plain2 by 'sys/'
When in a realm: - Mappings with mode VM_MEMATTR_DEVICE and VM_MEMATTR_DEVICE_NP are unprotected - Imported busdma buffers in protected memory are always bounced - If EARLY_PRINTK is in use, the UART physical address must be in the unprotected address space Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56599
debug: classified in
04-filenames_plain2 by 'sys/'
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56976
debug: classified in
04-filenames_plain2 by 'sys/'
Add a microsecond conversion helper to complement the existing bintime2ns(). The body mirrors bintime2ns(). This will be used by an upcoming eventlog(9) framework as well as the TCP code in upcoming changes. Approved by: gallatin, tuexen Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56972
debug: classified in
04-filenames_plain2 by 'sys/'
It is required at least for NBBY. MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
The _*.h headers are for structure definitions and should avoid dependencies on other headers. This convention is violated by using __BEGIN_DECLS/__END_DECLS. Move the declarations to cpuset.h, I see no reason they can't be there. Reviewed by: olce, brooks, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56856
debug: classified in
04-filenames_plain2 by 'sys/'
When igmp_v3_merge_state_changes() is iterating over state-change packets, there is a case where it'll free a queued packet but will fail to remove it from the queue. Fix that. Reported by: Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai Reviewed by: pouria, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56947
debug: classified in
04-filenames_plain2 by 'sys/'
Create new /dev/power node with super simple ioctl for initiating sleep state transitions. This is meant as a generic interface to replace the ACPI- and APM-specific interfaces. This allows for non-ACPI states to be entered, such as suspend-to-idle when setting kern.power.suspend=suspend_to_idle. Reviewed by: markj, olce Approved by: markj, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55508
debug: classified in
04-filenames_plain2 by 'sys/'
Reduce bufqueue lock contention by delaying the BUF_UNLOCK to after dropping the bufqueue lock. Still do the early BUF_UNLOCK if we actually have to bd_flush. Reviewed by: kib, markj Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D56948
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kib, olce Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D56949
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kib, olce Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D56951
debug: classified in
04-filenames_plain2 by 'sys/'
The flag indicates that the modifying ptrace op was issued, and clearing it after transparent attach is needed to not leak the flag to later operations, since it is cleared on the syscall enter. But clearing it there unconditionally is too strong. The clearing should be only done for attach situation. Reported by: Alex S <iwtcex@gmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=99976934274de6fa19f049a0b6eac10856710f96 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56928
debug: classified in
04-filenames_plain2 by 'sys/'
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU VRAM ranges as write-combining. Depending on the system, this address range may fall outside of FreeBSD's constructed DMAP. We cannot use pmap_change_attr() in this case. When INVARIANTS is enabled, this results in the following: panic: physical address 0x880000000 not covered by the DMAP Add a guard against triggering the KASSERT in PHYS_TO_DMAP(). This limitation in our implementation of arch_io_reserve_memtype_wc() is already known in drm-kmod's amdgpu_bo_init(), and errors are ignored there (see "BSDFIXME"). This change is only to eliminate the preventable assertion failure within this scheme. Tested by: kevans Reviewed by: kib, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56971
debug: classified in
04-filenames_plain2 by 'sys/'
subr_uio.c: Remove a KASSERT() for large NFS server I/O When the NFS server is set to allow an I/O size greater than 1Mbyte (not allowed in FreeBSD's main yet), a KASSERT() in allocuio() can fail when: zfs_freebsd_write()->zfs_write()->zfs_uiocopy() ->cloneuio()->allocuio() is called for a large NFS server write. Since the userland API callers to allocuio() already check that the size does not exceed UIO_MAXIOV, there does not seem to be a need to a KASSERT() here. Removing the KASSERT() allows NFS server writes of greater than 1Mbyte to work, once the NFS code is patched to allow them. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57005
debug: classified in
04-filenames_plain2 by 'sys/'
nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes Without this patch, the maximum setting for vfs.nfsd.srvmaxio was 1Mbyte. This patch increases that to 4Mbytes. The same as for any setting above 128Kbytes, settings up to 4Mbytes require that kern.ipc.maxsockbuf be increased. (A message generated after setting vfs.nfsd.srvmaxio via the /etc/rc.conf variable nfs_server_maxio will indicate the minimum setting, which will be somewhat greater than four times the setting of vfs.nfsd.srvmaxio.) Requested by: Cedric Blancher <cedric.blancher@gmail.com> MFC after: 2 weeks Fixes: https://cgit.freebsd.org/src/commit/?id=13d3bd165e22 ("subr_uio.c: Remove a KASSERT() for large NFS server I/O")
debug: classified in
03-filenames_plain1 by
'sys/fs/'
debug: moved to kernel because
'Need to be grouped with
13d3bd165e225eec9af91b6e3361c2482931f95b'
- Avoid including sys/proc.h in linux_vdso_gtod.c. It's not needed, but the implicit inclusion of sys/param.h via sys/ucred.h->bsm/audit.h was bringing in some required definitions. - Include a couple of required headers: sys/time.h (for struct bintime), and limits.h (for INT_MAX). - Move some helpers from linux.h, which depend on sys/param.h for NODEV, to the one CU where they're actually used. No functional change intended. Reviewed by: imp, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56982
debug: classified in
04-filenames_plain2 by 'sys/'
No functional change intended. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57014
debug: classified in
04-filenames_plain2 by 'sys/'
Due to net80211 keeping values in 0.5dBm relative to the noise floor an int8_t is not good enough to prevent a double wrap around, which means the reported rssi values can be wrong (see D50928 or likely a commit in the future for more information). In order to address the problem and not break the userspace API, start by defining a type within the kernel and use that. In a next step we will then update the int8_t to int16_t to avoid the problem up to the ioctl code. This will then allow us to work on the the user space API indepedently (see PR 293016 for possible impact outside the base system). No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57021
debug: classified in
04-filenames_plain2 by 'sys/'
Mark assembly files as not requiring executable stacks. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56946
debug: classified in
04-filenames_plain2 by 'sys/'
ZFS needs to take internal sleepable lock in its implementation of VOP_GETATTR(). Due to this, kq must be unlocked around calls to the vfs filter methods. Fixes: https://cgit.freebsd.org/src/commit/?id=1d5e4020e36e ("vnode: add VIRF_KNOTE flag") Reported and tested by: des Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
For Linux binaries, sopt->sopt_td may be null. And there's also no need to check it, since struct l_ucred has the same layout on 32-bit systems as on 64-bit ones. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295333 Reported by: Miguel Gomes <miguel.dias.gomes@protonmail.com> Fixes: https://cgit.freebsd.org/src/commit/?id=1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode") MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57032
debug: classified in
04-filenames_plain2 by 'sys/'
Reported by: bz Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: bz Fixes: https://cgit.freebsd.org/src/commit/?id=c41d83548b6c ("LinuxKPI: pci.h add more defines and functions") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57066
debug: classified in
04-filenames_plain2 by 'sys/'
sys: Use is_pci_device instead of direct comparisons to devclasses Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56997
debug: classified in
04-filenames_plain2 by 'sys/'
vnic: Add missing #include Reported by: bz, olivier Fixes: https://cgit.freebsd.org/src/commit/?id=6dc813301a17 ("sys: Use is_pci_device instead of direct comparisons to devclasses") Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/dev/'
arm64/iommu: Add a missing close parenthesis Fixes: https://cgit.freebsd.org/src/commit/?id=6dc813301a17 ("sys: Use is_pci_device instead of direct comparisons to devclasses") Sponsored by: Chelsio Communications
debug: classified in
03-filenames_plain1 by
'sys/arm64/'
debug: moved to kernel because
'Need to be grouped with
6dc813301a173e2e1993c3064df162e6218c1231'
These calls are used for buddy pages at least in drm's ttm_pool, which leads to a panic when we invoke lowmem handlers and drm tries to shrink the pool. Cope with numpages > 1 by traversing the contiguous pages and executing the adjustment there, as well, as suggested by markj@. Previous versions have tried to use the corresponding `set_memory_*()` functions, but it is believed that not updating `md.pat_mode` breaks subsequent userspace mappings in ways that may result in things like screen tearing or other artifacts when running i915kms. This stabilized my amdgpu laptop running two VMs, chromium and a concurrent buildworld. Reviewed by: bz, markj Differential Revision: https://reviews.freebsd.org/D57004
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
The new KPI is only used in <asm/set_memory.h>, but it's provided in linux_page.c. The latter only includes the former indirectly by way of <linux/io.h>, and that's only conditionally included outside of 32-bit ARM there. All of our archs have the necessary pmap_page_set_memattr(), so just move the declaration into <linux/page.h> instead of trying to reason about the usability of <asm/set_memory.h> directly in linux_page.c. Reported by: jenkins (via ivy)
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kib (previous version), olce Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D56950
debug: classified in
04-filenames_plain2 by 'sys/'
It was a placeholder for the access control for process-shared umtx memory, which is not needed. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57122
debug: classified in
04-filenames_plain2 by 'sys/'
After commit 853cd8723494 it became invalid for kinst_invop() to return 0: dtrace_invop_start() would convert this to a sentinel value indicating that it did not consume the breakpoint, and so we'd just call kdb_trap() to handle it. Change kinst_invop() to return NOP_INSTR after handling a matching breakpoint. NOP_INSTR is handled by advancing the ELR, so we have to compensate by subtracting INSTR_SIZE before returning. Reviewed by: christos MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=853cd8723494 ("arm64: Clean up usage of the dtrace invop handler") Differential Revision: https://reviews.freebsd.org/D56987
debug: classified in
04-filenames_plain2 by 'sys/'
"ldr <reg>, <literal>" loads a value from a literal memory address into a register. It's PC-relative and so cannot be directly implemented using the trampoline mechanism. Unfortunately, on arm64 it can't easily be emulated either since the return-to-EL1 handler does not restore callee-saved registers, so like adr/adrp, we simply don't handle it. These instructions are fairly rare in an arm64 kernel. While here, refactor the code so that all instruction decoding is done in one place: introduce an enum type which characterizes the instruction type, add a helper to map instructions to enum values, and store the corresponding enum value in the probe description. Reviewed by: christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56988
debug: classified in
04-filenames_plain2 by 'sys/'
Otherwise they are left on a freed list after procdesc_free() is called. This can be exploited to elevate privileges. Remove the PDF_SELECTED micro-optimization. doselwakeup() is a no-op if no one ever called selrecord() on the file description, so I see no reason to complicate the code to avoid the call. Add some regression tests. Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251 Reported by: 75Acol, Lexpl0it, fcgboy, and robinzeng2015 Reviewed by: kib, oshogbo Fixes: https://cgit.freebsd.org/src/commit/?id=cfb5f7686588 ("Add experimental support for process descriptors") Differential Revision: https://reviews.freebsd.org/D56887
debug: classified in
04-filenames_plain2 by 'sys/'
Otherwise they may be left on a freed selinfo list after the corresponding jaildesc struct is freed. This can be exploited to elevate privileges. Remove the JDF_SELECTED micro-optimization. doselwakeup() is a no-op if no one ever called selrecord() on the file description, so I see no reason to complicate the code to avoid the call. Add some regression tests. Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251 Fixes: https://cgit.freebsd.org/src/commit/?id=66d8ffe3046d ("jaildesc: add kevent support") Reviewed by: kib, jamie Differential Revision: https://reviews.freebsd.org/D56945
debug: classified in
04-filenames_plain2 by 'sys/'
- Fix an off-by-one in the system call number check. A value of SYS_MAXSYSCALL was permitted. - Validate the system call number after we've dealt with syscall(2)/__syscall(2), since they pass the syscall number as an argument. - When the syscall number is for syscall(2) or __syscall(2), we must make sure that nargs > 0 to avoid an underflow when shifting arguments down. Add regression tests. Approved by: so Security: FreeBSD-SA-26:21.ptrace Security: CVE-2026-45253 Fixes: https://cgit.freebsd.org/src/commit/?id=140ceb5d956b ("ptrace(2): add PT_SC_REMOTE remote syscall request") Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D56978
debug: classified in
04-filenames_plain2 by 'sys/'
It is not enough to check vp1 == vp2 to detect lock recursion, since vnodes might share the locks. This might happen for e.g. stacked filesystems (nullfs and other), and for FFS snapshots. Switch from checking vnode equiality to check v_vnlock equiality, and recheck the condition after vnode relock since reclamation or otner parallel operation might change the vnode locks under us. Return a value (not really an error) indicating the case that vnodes share the lock, to simplify the unlock in caller. Reviewed by: jah, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57035
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: jah, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57035
debug: classified in
04-filenames_plain2 by 'sys/'
Reported by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=e9a5eb0e5e44 ("vop_read_pgcache_post(): report inotify IN_ACCESS same as for vop_read_post()") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
When updating the names of the sleep types in 95b4436e989d ("power:
Rename sleep types"), I forgot to update the lengths of the buffers they
went into.
Reported by: mhorne
Fixes: https://cgit.freebsd.org/src/commit/?id=95b4436e989d ("power: Rename sleep types")
Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
kernel: Enable -fstack-protector-strong by default This extends stack canary use to all functions which define arrays on the stack, not just those which operate on byte buffers. This option would have made it harder to exploit SA-26:18.setcred and SA-26:08.rpcsec_gss. The change bloats the amd64 kernel text by about 350KB and increases the number of covered functions from ~1500 to ~9000 (within the kernel itself, i.e., not counting kernel modules). Reviewed by: olce, olivier, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56870
debug: classified in
04-filenames_plain2 by 'sys/'
vmm/arm64: Compile vmm_nvhe.c without SSP This file implements a set of EL2 hypercall handlers and is used to switch between guests and the host kernel when VHE is not in use. There is no SSP runtime available there. Reported by: Jenkins Fixes: https://cgit.freebsd.org/src/commit/?id=8deebce931fa ("kernel: Enable -fstack-protector-strong by default")
debug: classified in
04-filenames_plain2 by 'sys/'
When using SW KTLS, we must account for the headers in sf_iodone() in terms of either freeing or enqueuing them for TLS work. Not doing so can lead to a situation where we enqueue only the payload, and not the header, for encryption. Rather than leaking the header, the socket is left "hung" with the header marked M_NOTREADY. Sponsored by: Netflix Reviewed by: glebius, kib Differential Revision: https://reviews.freebsd.org/D57134 MFC After: 14 days
debug: classified in
04-filenames_plain2 by 'sys/'
When we no longer need a channel context and put it back on the reserved list, zero it for all but the vif so that we get the same state as if it was freshly allocated. Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=e62c92c0a5cf, https://cgit.freebsd.org/src/commit/?id=88cb1e17f471 MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
Add support for automatic suspend/resume as we know it for wireless. The problem is that the PCI driver which would normally gets the code is the LinuxKPI PCI framework/Linux wireless driver, which we cannot ammend or generally add extra suspend/resume code to. A further problem is that with growing support, the LinuxKPI 802.11 (mac80211) layer also is involved in suspend/resume for WoWLAN (not yet supported) meaning that we need to hook the suspend/resume framework into that as well. Unlike Linux we do not have a general suspend/resume "hook" we can hang into and we need to tie this one to the hardware so cannot indepedently (after the driver one) run it. The solution for FreeBSD, in order to not mangle the Linux native drivers and get extra maintanace overhead, is to add a bus child which inherits the general framework and thus is 2 lines + #includes for each driver extra to add to. The general suspend/resume framework lives in LinuxKPI (linuxkpi_80211_pm) and imitates the normal suspend/resume path overloading it (there is a slight code/logic duplication from the PCI code). Given we are passed the LinuxKPI p(ci)dev, we can go and peel out the net80211 ic from the native bsddev and that way get access to the wireless stack. We then call into LinuxKPI 802.11 in order to do the suspend/resume dance there, and, if needed also call the official suspend/resume routine from the device driver after (reverse for resume). If any in this fails, suspend will be blocked as we will return the error (no different to any native driver could do). The LinuxKPI 802.11 suspend/resume code has the initial code for doing a WoWLAN suspend (one could change the sysctl) but other bits like access to ifnet flags etc. has to be sorted out before we can go and support that. The default code path calles into net80211 to clear everything like native wireless drivers do. The one thing we need to do in addition is to remove the vif devices from the firmware and restore them prior to net80211 resume. We also check for a possible HW SCAN to still be runinng on resume and warn as that may cause problems though the scan should be stopped before suspend (we may still get a callback). You can easily see these problems if you suspend/resume without stopping the wlan. Enable the PM framework for iwlwifi in the module Makefile to be able to use all this; others can follow as tested. In case anyone has problems with this, they can change the sysctl back to 0 until we can figure out any further problems. The linuxkpi_wlan.4 man page got adjusted to document this. Sponsored by: The FreeBSD Foundation Tested on: Dell XPS 13 (AX200), Lenovo TP X270 (AX210) MFC after: 3 days PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263632
debug: classified in
04-filenames_plain2 by 'sys/'
Create a function to check if the BAR retry limit has been reached. Use this in if_ath_tx instead of a hard-coded value. I've been meaning to do this for a long time. Differential Revision: https://reviews.freebsd.org/D57055
debug: classified in
04-filenames_plain2 by 'sys/'
This is copied from the check in kern_kill. Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57244
debug: classified in
04-filenames_plain2 by 'sys/'
Allocating large buffers with M_ZERO adds unnecessary overhead since the data is immediately overwritten. This change embeds the tc and rc p9_buffer structs directly into p9_req_t so we only zero the small metadata headers. The actual data payload is allocated with M_NOWAIT. Embedding the metadata headers by value also allows the p9fs_buf_zone UMA items to be sized exactly to P9FS_MTU, ensuring they are nicely aligned. This also adds proper error handling to p9_get_request() to handle UMA allocation failures. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56495
debug: classified in
04-filenames_plain2 by 'sys/'
We use the explicit "suspend-to-idle" name now. Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
This function returns a pointer to the top of the kstack. Reviewed by: kib, andrew (arm changes) Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in
04-filenames_plain2 by 'sys/'
Previously this was using CAM_PRIORITY_NONE which tripped over the assertion added in b4b166b8c46b8. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076 Reported by: Ken J. Thomson <thomsonk@yandex.com> Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56995
debug: classified in
04-filenames_plain2 by 'sys/'
The MD function with MI interface to provide a way to read arbitrary (canonical) KVA. amd64 only for now. Reviewed by: markj Tested by: aokblast Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49566
debug: classified in
04-filenames_plain2 by 'sys/'
This fixes LTP open13, which expects O_PATH mmap() to fail with EBADF, but FreeBSD returned EACCES. Signed-off-by: YAO, Xin <mr.yaoxin@outlook.com> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295571 Reviewed by: kib Pull-Request: https://github.com/freebsd/freebsd-src/pull/2233
debug: classified in
04-filenames_plain2 by 'sys/'
* Migrate the k->wk_key and k->wk_keylen access to the new crypto methods in net80211 * don't use ic_miclen, use the tx/rx mic len methods * don't use wk_txmic and wk_rxmic, use the tx/rx mic data methods This is in preparation to support GTK/IGTK keys and > 128 bit keys. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54485
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57294
debug: classified in
04-filenames_plain2 by 'sys/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295629 Reviewed by: markj Tested by: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57294
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Executable paths feature (GSoC 2025's final state)
By design, mac_do(4) only authorizes credentials change requests if they
are issued by a process spawned from '/usr/bin/mdo'. The executable
paths feature introduces some flexibility by allowing to change that
path, thus allowing another executable to make requests, and to use
multiple such paths (up to 8 in the current implementation). Its
purpose is to enable thin jails scenarios where mdo(1) may not be at its
canonical path ('/usr/bin/mdo') and to allow experimenting with other
userland programs leveraging setcred(2).
Configuration of executable paths is per-jail and intentionally works
completely similarly with rules. It is accessible from within a jail
through the 'security.mac.do.exec_paths' sysctl knob and from outside
a jail through the 'mac.do.exec_paths' jail parameter.
This commit groups the verbatim changes of the following commits that
Kushagra Srivastava, our GSoC 2025 student, created in his GitHub
repository (https://github.com/thesynthax/freebsd-src), branch
'task/exec-paths-refactor':
mac_do(4): Complete refactor of allowed executable paths feature
mac_do(4): Fixed changing security.mac.do.* knobs in inheritance mode
mac_do(4): Debugging rules and exec_paths leak on destroy
mac_do(4): Deep copy rules
mac_do(4): Fixed leak
mac_do(4): fixed various bugs, structs inlined, leaks remain
mac_do(4): MAC/do working in jail, leaks decreased
mac_do(4): MAC/do fixed, works in host and jails, leaks removed
mac_do(4): style
Frozen log for these commits:
https://github.com/OlCe2/freebsd-src/compare/main...14fdc49fb29265fac5d0daf95a13d0dce325c951.
The corresponding pull request is at:
https://github.com/OlCe2/freebsd-src/pull/2.
The GSoC's final state of this code still has a number of problems that
are fixed in subsequent commits. It is however committed separately to
clearly delineate Kushagra's work.
Reviewed by: olce (amendments to come, see above)
MFC after: 1 month
Relnotes: yes
Sponsored by: Google LLC (GSoC 2025)
Sponsored by: The FreeBSD Foundation (review, commit)
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Make it style(9) compliant again Fix too long lines, declarations not at head of block, improper indentation and superfluous whitespace coming from the previous commit introducing the configurable executable paths feature. While here, fix some older improper comment formatting. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=6c3def74e2de ("MAC/do: Support multiple users and groups as single rule's targets") Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in 01-style
by '[sS]tyle'
debug: moved to kernel because
'Need to be grouped with
9818224174c41a434028446fb6fa5516a6291755'
Add Kushagra to account for the commit adding the "executable paths" feature. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Fix recently-introduced comments Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Expand "conf" to "configuration" in a panic message on INVARIANTS No functional change. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: check_proc(): Remove a superfluous 'if' No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Document and assert when parse error objects must be built The invariant is that parse_*() functions must create a parse error object and return it through their 'parse_error' argument if and only if they return an error code (non-zero). Add assertions checking this invariant in various places, and in particular in the new parse_exec_paths(), to be future proof. Change the contract of parse_and_set_conf() so that the caller is required to pass a NULL '*parse_error'. Remove useless resetting of '*parse_error' to NULL. While here, remove a test that is always true thanks to this invariant and that was recently introduced with the "executable paths" feature. No functional change intended. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Executable paths: Accept an empty string This effectively allows to disable mac_do(4) by setting the executable paths to an empty string, realizing a symmetry with rules to be leveraged in subsequent commits. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Rename size constants/variables to clear confusion with string lengths These constants represent buffer sizes in bytes, not string lengths. While here, move MAX in EXEC_PATHS_MAXLEN at start, like the other constants. While here, fix the prefix of the old MAC_RULE_STRING_LEN accordingly. No functional change. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=8aac90f18aef ("mac_do: add a new MAC/do policy and mdo(1) utility") Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: find_conf(): Turn an MPASS() into a KASSERT() Turn the pre-existing comment into an assertion message, with an update following the introduction of the "executable paths" feature. Explain in a comment why this situation cannot happen. Without INVARIANTS, such a situation would cause an immediate panic() (NULL is dereferenced in the next iteration of the loop), so leave the check under INVARIANTS only. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Move hold_conf() and drop_conf() earlier This is in preparation for using hold_conf() in find_conf(). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: find_conf(): Return configuration with a true reference In addition to the applicable configuration, find_conf() was returning a pointer to the actual jail holding the configuration object, with that jail's mutex locked in order to ensure liveness of the returned configuration (if we wouldn't, a concurrent thread modifying the jail's configuration could destroy this configuration object underneath us). But: 1. Ensuring configuration stability by owning the holding jail's mutex requires callers to either keep that mutex locked for a longer period of time than just accessing the corresponding 'struct prison' (in general, bad for concurrency with other operations involving jails) or to perform an additional dance to acquire a real reference in case the jail's mutex, for some reason (in general, LORs or acquiring a sleepable lock) must be dropped before use. 2. Most code does not actually need to know which jail holds the applicable configuration but for unlocking the jail's mutex. Having to deal with the jail holding the configuration can cause confusion about which jail (the current one, or the one holding the configuration) must be used (and actually did in the very initial version of MAC/do, which had a serious flaw as a consequence). So, do not keep a lock on the holding jail. Instead, ensure configuration stability by always acquiring a true reference from the start and passing it to the caller. Those callers not doing the dance mentioned above now need to free it when finished (but this need replaces the one to unlock the prison). Additionally, only return the holding jail if explicitly requested by the caller. mac_do_jail_get() is currently the only caller that needs it, in order to be able to reliably report if the configuration is inherited. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Fix releasing a nonexistent reference on configuration parsing error On parsing error, parse_and_set_conf(), introduced with the recent "executable paths" feature, has been calling drop_conf() on the being-built configuration. However, that configuration structure is allocated through alloc_conf(), which does not grab a reference. Calling drop_conf() on it, which releases a reference, is thus erroneous, and causes the underlying counter to saturate, translating into a memory leak. To fix this bug, make alloc_conf() grab a reference on the newly-created 'struct conf', and rename it to new_conf() to be more in line with what it does. Keep set_conf() as is, i.e., grabbing an additional reference on behalf of the jail that is going to hold the configuration. Consequently, make sure that callers of alloc_conf() unconditionally drop the reference acquired by the latter before returning (i.e., even if set_conf() has been called). While here, since hold_conf() is always used to obtain additional references on a configuration (new_conf() does not use it, instead directly setting the use count), add an assertion that it is never used on a configuration that has no references at all (which indicates that the configuration has been destroyed). These changes generally simplify the lifecycle of configurations, reducing the probability of re-introducing reference mismatches (at the expense of slightly more reference counting operations, but performance does not matter here). Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Constify clone_rules() and clone_exec_paths()'s source argument Defensive programming. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Move static assertions on constants close to their definitions And document more clearly their purpose. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Remove superfluous configuration initialization Configuration objects would be initialized (zeroed, and some STAILQ_INIT() called) multiple times. Make sure they are so only once, and add assertions to check that this is actually the case for functions that expect it. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: clone_rules(): Readability improvements, constification Constify in order to let the compiler check that source and destination arguments are passed in the proper order in the different calls. No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: parse_and_set_conf(): Obey empty parameters; Add doc parse_and_set_conf() is meant to be used in all situations when there is a need to set or modify some jail's MAC/do configuration. This entails passing the information of whether some parameter was explicitly specified. For example, an administrator setting/modifying jail parameters may not specify executable paths but only rules, in which case the executable paths value is copied from the currently-applicable configuration. The sysctl(8) knobs case always leverages this feature, since setting a knob changes one parameter at a time. Currently, a NULL or empty string argument is treated as a non-specified parameter. This causes a bug where disabling MAC/do in a jail does not actually work because, to this end, parse_and_set_conf() is passed an empty string which it then interprets as a request to copy the currently applicable configuration's value, which may well not be empty. Fix this problem by only treating NULL as a marker for a non-specified parameter, in accordance with the original design for this function. While here, write some documentation to explain the interface. While here, remove the original herald comment for parse_and_set_rules(), which was inadvertently pushed apart from the replacing parse_and_set_conf(). Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: parse_and_set_conf(): Require the model configuration This change is a prerequisite for the next change in caller mac_do_jail_set(), which for semantic correctness needs to rely on a stable model configuration. The two other callers already call find_conf() to retrieve the applicable configuration, so for these a second call to find_conf() can be saved. However, this does not fix (actually, makes slightly worse) an atomicity problem when multiple threads concurrently change some jail's configuration (or the configuration inherited by a jail), which has existed since the introduction of executable paths due to being able to change only rules or executable paths independently (and the possibility of not specifying them and having them copied from the currently applicable configuration). Before tackling it in later commits, we first focus on fixing the semantics of configuration changes in the very next patches. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Fix obsolete wording in a comment ("ascendant" => "ancestor")
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Constify is_null_or_empty() Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Fix the recent logic to set jail parameters, make it more tolerant
The logic introduced in the initial commit for the "executable paths"
feature did not match the specification we discussed in that specifying
an empty value (for rules or executable paths) on "mac.do" being "new"
would be treated as an absence of value and trigger a copy from the
currently applicable configuration, instead of being an override that
deactivates mac_do(4) in the jail. Fix that by distinguishing both
cases.
More generally, a non-explicitly specified parameter is set to the same
value it has in the currently applicable configuration (that of the
closest ancestor jail that has one; 'prison0' (the host) always has
one), with an exception in the disable case.
On disable (explicit: "mac.do" to "disable", implicit: no parameters
passed, or at least one is empty), now accept parameters with
a non-empty value as long as at least one of them is empty (which alone
is enough to disable mac_do(4)). If no parameters are passed, both are
copied from the currently applicable configuration; if none of them is
empty, then the rules are emptied to effectively disable mac_do(4) (see
the inline comment as to why this was chosen).
On explicit enable ("mac.do" to "enable"), allow not specifying any of
the rules and executable paths, in which case both are copied from the
currently applicable configuration (consistently with what is done when
only one is missing). Note that, as mentioned above, not specifying any
of them by default still resolves to disabling mac_do(4) (i.e., on no
explicit "mac.do" parameter).
On (explicit) inheritance, allow specifying non-empty parameters,
provided they match the values we are going to inherit. This enables
re-applying jail parameters' reported values verbatim to the current
jail (idempotence) or, e.g., to some sibling jail.
(While here, make some existing code easier to read by leveraging
is_null_or_empty().)
Reviewed by: bapt
Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Configuration: Fix default values: Remove jail creation method mac_do_jail_create() would create a default configuration on the just-created jail, erroneously causing mac_do_jail_set() to then retrieve it and use it as a model when determining the default values for not-specified parameters, instead of using the configuration applicable to the parent jail. Setting a default configuration in mac_do_jail_create() had been done as a kind of defensive measure to prevent a created jail not to have a configuration (effectively making it inherit from an ancestor jail, which is a security hazard except if explicitly requested). However, this measure was never really effective (osd_jail_call(PR_METHOD_CREATE) in kern_jail_set() calls the PR_PETHOD_CREATE methods in an unspecified order, and stops at the first error), so we are forced to rely in any case on the fact that an error in a PR_METHOD_CREATE or PR_METHOD_SET method leads to stopping the jail creation process (which is the case today; see kern_jail_set()). Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Fix reporting of "mac.do" post-"executable paths" In mac_do_jail_get(), computation of 'jsys' had not been updated to take into account executable paths. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Visually separate some file sections With additional empty lines. No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Allocate only one default configuration When mac_do(4) is loaded, all jails get the same default configuration (disabled, with only one allowed executable path: '/usr/bin/mdo'). Share it between all jails instead of creating a separate copy for each. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Comment to explain the main invariant for configurations Once visible, configuration structures must *never* change. Spell that out in a comment to help future readers/contributors understand the design. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Sequential consistency for configuration retrieval Since the inception of mac_do(4), find_conf(), used to retrieve the applicable configuration, has been weakly consistent with respect to concurrent modifications to configuration inheritance that influence its result (and it has been sequentially consistent with respect to other configuration modifications, which the initial executable paths feature and introduction of implicit parameters broke and which will be fixed in a subsequent commit). Indeed, find_conf() climbs the jail tree to find an applicable configuration, which is not an atomic operation. It examines the current jail's configuration pointer for each browsed jail, which does not prevent concurrent modifications of the configuration pointer for jails below or above it. Modifications above the current jail are not a problem, since if climbing needs to continue (i.e., the current jail inherits), these modifications will be seen if performed before that check (and may or may not be seen if performed after that check). However, modifications below the current jail impair sequential consistency, because they could be done before other modifications at the current jail or higher up, and the latter could still be picked up by the rest of the climb, effectively ignoring that the former should have blocked the climb earlier, making them look as if they had happened after for the climbing thread. As a concrete example of this situation, let's examine a scenario where some jail A is the parent of some jail B, and B inherits its configuration from A. An administrator may want to relax the rules only for jail A but not B. To this end, he first copies the current rules on B over to A and then relaxes the rules on A. He can intuitively and reasonably expect that changing B's rules first will prevent A's relaxed rules to leak to threads in B. Unfortunately, that is not the case: As explained in the previous paragraph, there can be a time window where threads from B can still pick up A's new configuration just after it has been installed. This arguably makes changing inheritance in mac_do(4) in a fully secure fashion almost impossible. If preserving fine-grained locking of prisons, we could prevent this problem by having find_conf(), once it has climbed to a non-NULL pointer (actual, non-inherited configuration), do another climb to check that it can reach the same configuration on the same jail again. If the new climb gives another pointer or jail, it could make it the new candidate and do a climb check again until the situation stabilizes. A climb check detects whether changes in jails below that of the candidate configuration object happened, catching in particular such changes that happened before changes to the candidate object. However, that process alone would still be subject to ABA problems, and we would additionally need to tag each prison with some modification timestamp (global, or local but necessitating allocating memory during the check) to fix them. In the end, we considered this direction to be unnecessarily complex, given that configuration changes are to be rare events and most uses will just be configuration determination. Consequently, switch protecting jail configurations with a single read-mostly lock. While here, adapt set_conf() to accept NULL as the new configuration object, and have remove_conf() call it, which removes duplicated code. While here, add a comment explaining why we do not need to take any more locks when climbing the jail tree. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Support for atomically modifying configurations As mentioned in previous commits "MAC/do: parse_and_set_conf(): Require the model configuration" and "MAC/do: Sequential consistency for configuration retrieval", the introduction of the "executable path" feature, more fundamentally, the fact that there is now more than one per-jail parameter and that parameters can be independently modified or copied, causes an atomicity problem in case of concurrent accesses to of a jail's applicable configuration. Partially modifying a configuration is indeed akin to a read-modify-write operation, where the read is either to the current or an inherited configuration. More precisely, once pointed to by a jail, a configuration object is immutable, and changing the jail's configuration means making the jail point to another configuration object. To change a jail's configuration, a new configuration object is thus built, and if only some parameters have been explicitly specified, those that have not been are set by copying the corresponding values from an existing configuration object (in case of partial modification of the existing configuration, from the original configuration object that is going to be replaced; in case of breakage of inheritance or at jail creation, from the applicable configuration object, which is on an ancestor jail). This process is not immune to concurrent modifications because nothing prevents changes of configurations between reading existing values and setting the new configuration. Thus, some other thread could change the value of a parameter after a copy of it has been made into the new object but before that copy is actually installed, which effectively will erase the other thread's modification. To avoid this, we introduce support for serializing configuration changes on a given jail. To this end, we move the jail climbing process from find_conf() into find_conf_locked(), and make the former call the latter in a read-locked section. Similarly, we isolate setting a configuration in the new set_conf_locked() function, and make set_conf() call it inside a write-locked section. The new *_unlocked() variants make it possible to prevent any configuration access between determining and reading an applicable configuration, computing from it a new configuration object and finally setting it, by holding a write lock over the whole process (there is a trade-off here, as read-mostly locks cannot be upgraded), effectively making it atomic and realizing full sequential consistency of configuration changes. Also, the 'mac_do_rm' global read-mostly lock is made sleepable so that it can be write-locked over sysctl_handle*() functions or memory allocations (eases implementation, at the expense of a potential loss of concurrency which is most probably irrelevant). No functional change (intended) at this point. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Serialize installing/modifying some jail's configuration See the immediately preceding commit for explanations on what this is fixing. When setting 'mac.do' to 'inherit' on a jail with 'mac.do.rules' and 'mac.do.exec_paths' also specified in the same call, ensure that the check that these passed parameters are the same as those to be inherited is atomic with respect to enabling the inheritance (i.e., removing the jail's 'struct conf' object). (See previous commit "MAC/do: Fix the recent logic to set jail parameters, make it more tolerant" as for why this check exists.) Because we currently only modify a single configuration object per transaction, we introduce the parse_and_commit_conf() wrapper around parse_and_set_conf() to remove duplicated code that would ensue from calling the latter directly, namely, releasing the 'mac_do_rwl' lock and freeing the old configuration object (if any). Taking the 'mac_do_rwl' lock for writing as a way to freeze all accesses to mac_do(4) configurations was deemed too thin an operation to be worth wrapping. Reviewed by: bapt (older version) Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Do not skip blanks when parsing executable paths The kind of tolerance we apply to parsing rules, whose format we have defined, cannot be applied to paths since blank characters are allowed there. There is still the limitation that no escape character is currently supported, and so it is not possible to configure a path having a ':' character. Reviewed by: bapt Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
MAC/do: Update copyright Update years for the Foundation. While here, remove the initial '/*-' which has been useless for a long time. While here, add a missing space on bapt@'s copyright line (approved by him). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
04-filenames_plain2 by 'sys/'
Some third party software expects these to not conflict. As the MTE support isn't fully in the tree, and these values aren't in a release we can renumber them without any backwards compatibility issues. Sponsored by: Arm Ltd
debug: classified in
04-filenames_plain2 by 'sys/'
It is akin to nanosleep(2) and does not access global namespaces. It should be permitted in capability mode. Reviewed by: vangyzen Fixes: https://cgit.freebsd.org/src/commit/?id=3f8455b0905a ("Add clock_nanosleep()") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57343
debug: classified in
04-filenames_plain2 by 'sys/'
that are accepted in the activated image or interpreter. Requested by: jhb Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57328
debug: classified in
04-filenames_plain2 by 'sys/'
Implement dummy support for PR_SET_VMA with PR_SET_VMA_ANON_NAME in prctl(2). This prevents applications from receiving EINVAL when attempting to name anonymous memory regions.
debug: classified in
04-filenames_plain2 by 'sys/'
Shortly before I committed the works from a year ago, jhb added a
function ("is_pci_device") so that the check against the devclass
does not have to be coded in every driver. Use this instead in main
(and stable/15 in case the works get MFCed).
At the same time this fixes the check (the old one was wrong) as we
attach to the LinuxKPI 802.11 driver, e.g., iwlwifi and thus we need
to check the parent of the parent and not just the parent to be
of the devclass "pci" in the identify bus function. The was the
first error. The second was (and this is why it worked) that we
checked for == instead of != and so the wrong check became true again.
Discussed with: jhb
Fixes: https://cgit.freebsd.org/src/commit/?id=11d69a4558de ("LinuxKPI: 802.11: add support for s/r")
MFC after: 3 days
X-MFC after: ffcf5e356644 ("pci: Add is_pci_device helper function")
Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Our idr implementation is using a mtx lock which in the past has already caused problems (613723bac219c). In order to make it easier to tackle the problem start by factoring out all the operations related to the idr->lock into macros as we have often done in other parts of code as well. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: wulf, emaste Differential Revision: https://reviews.freebsd.org/D55392
debug: classified in
04-filenames_plain2 by 'sys/'
The driver implements the ntsync interface as specified in the Linux 7.0-rc3 document Documentation/userspace-api/ntsync.rst. Only the documentation and the userspace tests (Linux' tools/testing/selftests/drivers/ntsync/ntsync.c) were used for reference. When the documentation contradicted the tests, tests behavior was implemented. One quirk is that Linux API needs to return an error from ioctl() and to copyout the modified ioctl() argument. Our generic ioctl() is not flexible enough to implement this, so the ntsync_ioctl_copyout() hack allows to copyout the ioctl parameter directly from the ioctl method, instead of relying on the ioctl infra. The FreeBSD port of the tests, that can be compiled both on FreeBSD and Linux, is available at https://github.com/kostikbel/freebsd-ntsync-test. The Linux binary compiled with the Linux test harness, cannot be run under linuxolator due to unimplemented syscalls, but the shims in freebsd-ntsync-test can be compiled on Linux and resulting Linux/glibc binary run on linuxolator to test linux compat. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57038
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57038
debug: classified in
04-filenames_plain2 by 'sys/'
parse_rules() has been calling toast_rules() in case of a parse error in order to deallocate the 'struct rule' objects it has constructed up to that point. toast_rules() would take a pointer to a full 'struct rules' object, and besides freeing all 'struct rule' referenced by it, would also free the holding 'struct rules' itself. With the introduction of the "executable paths" feature, and the embedding of 'struct rules' into 'struct conf', meaning that the lifecycle for 'struct rules' was no longer independent, toast_rules() was changed not to free the passed 'struct rules' (as it was a field of a 'struct conf' object). Unfortunately, this change was not completed with a reinitialization of the rules list head, so the 'struct conf' object would continue to reference just-freed rules, which then would be freed a second time on destruction of that container. So, make toast_rules() re-initialize the rules list in 'struct rules', which it logically has been having to do since not freeing the enclosing 'struct rules'. This alone is enough to fix the bug, but let's use the occasion to change the contract of parse_rules() and bring its herald comment up-to-date: On error, parse_rules() now simply leaves already constructed 'struct rule' objects in 'conf'. The latter is eventually destroyed and the rule objects reclaimed at that point. Add a test trying to set an invalid rules configuration with the first rule being valid and the second being invalid, which triggers the bug (and an immediate panic() on an INVARIANTS kernel). Reported by: impost0r(ret2plt) <impostor@ret2p.lt> Reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)") Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57345
debug: classified in
04-filenames_plain2 by 'sys/'
We implement all of the currently-defined Linux inotify mask bits and flags, with the same values as Linux. Return EINVAL for unknown bits, as Linux does. This also moves the translation inline into linux_inotify_add_watch. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57387
debug: classified in
04-filenames_plain2 by 'sys/'
Implement NT_PRFPREG and NT_X86_XSTATE for PTRACE_GETREGSET on amd64. Chrome's crashpad handler uses these to collect floating-point and extended CPU register state for crash dumps. Other architectures retain the previous EINVAL stub behavior. Signed-off-by: Ricardo Branco <rbranco@suse.de> PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289285 Reviewed by: kib Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
debug: classified in
04-filenames_plain2 by 'sys/'
Prevent LINUX_SI_TKILL from inadvertently falling through to LINUX_SI_QUEUE, which incorrectly overwrote si_code with SI_QUEUE instead of SI_LWP.
debug: classified in
04-filenames_plain2 by 'sys/'
bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets path specification. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57370
debug: classified in
04-filenames_plain2 by 'sys/'
uipc_usrreq: revert addition of EMPTYPATH for bindat(2) The caller wants the parent vnode, which cannot be provided for emptypath lookups. Reported and reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=12c590a9abd7 ("bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets") Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57448
debug: classified in
04-filenames_plain2 by 'sys/'
amd64: complete thunderbolt KERNCONF integration This completes the work so the driver can be integrated into KERNCONFs properly on amd64. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D55573
debug: classified in
04-filenames_plain2 by 'sys/'
thunderbolt: Fix INVARIANTS compilation The problem is that THUNDERBOLT_DEBUG triggers the use of some variables, but it is independent of INVARIANTS and the variables it uses were tagged with '__diagused'. Fix this by using '__maybe_unused' in those places. Fixes: https://cgit.freebsd.org/src/commit/?id=183633079178 ("thunderbolt: make code -Wunused clean") Fixes: https://cgit.freebsd.org/src/commit/?id=886164895f3f ("amd64: complete thunderbolt KERNCONF integration") Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'sys/dev/'
debug: moved to kernel because
'Need to be grouped with
886164895f3f4805dc11171ac7980acaccf6ec77'
i386's genassym.c needs to define some assembly symbols holding the size
of NFS structures to support NFS_ROOT while booting with a nfs_diskless
structure. For this, it needs to include a few NFS headers, which
require definitions from <sys/mount.h> (fhandle_t, vfs_init_t), which
was removed by commit 72ab129799a2 ("x86: remove sys/mount.h from
genassym.c").
Since recently, <sys/mount.h> has been including <sys/vnode.h>, so needs
"vnode_if.h" to have been generated for the compilation of 'genassym.o'
not to fail. Make sure this is the case (for all architectures for
simplicity) by tweaking the rule for 'genassym.o' in
'sys/conf/kern.post.mk', leaving a comment there so that it can be
removed when i386 is dropped (or if the above-mentioned dependency is
broken).
Fixes: https://cgit.freebsd.org/src/commit/?id=72ab129799a2 ("x86: remove sys/mount.h from genassym.c")
Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Include <linux/types.h> for `false`. This is needed by amdgpu somewhere between Linux 6.12 and 6.15. Reviewed by: Minsoo Choo <minsoo@minsoo.io>, bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57415
debug: classified in
04-filenames_plain2 by 'sys/'
See the commit log for the why. MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
No functional change. MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
This will be used by amdgpu as of Linux 6.13. Reviewed by: bz Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
The `ksiginfo_t` flag `KSI_TRAP` is set both for exceptions and when copying between userspace and the kernel fails. In the latter case, the exception syndrome register as captured in `struct trapframe` won't be valid. That means we can't use `KSI_TRAP` to determine whether `tf_esr` is valid. This motivates the addition of a new flag, here called `KSI_EXCEPT`, for specifically identifying signals caused by exceptions. It is added to `ksi_flags` via `trapsignal`. Signed-off-by: Alex Arslan <ararslan@comcast.net> Reported by: andrew Pull Request: https://github.com/freebsd/freebsd-src/pull/2053
debug: classified in
04-filenames_plain2 by 'sys/'
It was previously not possible to poll() or select() on the trigger device, which made implementing proper signal handling in auditd difficult. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, markj Differential Revision: https://reviews.freebsd.org/D57457
debug: classified in
04-filenames_plain2 by 'sys/'
This reduces the size of a trigger entry from 24 bytes to 16 (or from 12 bytes to 8 on 32-bit) with no additional complexity. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, emaste Differential Revision: https://reviews.freebsd.org/D57464
debug: classified in
04-filenames_plain2 by 'sys/'
The vn_start_write() call there is already interruptible. Check for user signals before restarting due to ERELOOKUP, or after failed vn_start_write(). Note that vn_start_write(V_XSLEEP | V_PCATCH) does not check for signals if not sleeping. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295826 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57453
debug: classified in
04-filenames_plain2 by 'sys/'
Check for tdvp being vp_crossmp. This cannot happen for the normal rename cases, but could if the target path specified by the syscall points to the nullfs mount over the regular file. In this case namei() cannot step over crossmp, and keep it in ni_dvp. Since crossmp VOP_GETWRITEMOUNT() returns NULL mp, we retry the locking dance since the belief is that NULL return is transient. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295826 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57453
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: bz Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle") Fixes: https://cgit.freebsd.org/src/commit/?id=c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak") Differential Revision: https://reviews.freebsd.org/D57477
debug: classified in
04-filenames_plain2 by 'sys/'
Support for swapping out kernel stacks was removed, so the PHOLD has no purpose. (And even before that, it's not clear why a swapout here would have been problematic.) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57486
debug: classified in
04-filenames_plain2 by 'sys/'
Requested and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57491
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57487
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57487
debug: classified in
04-filenames_plain2 by 'sys/'
Althought non-compliant, there are binaries which have the phdrs placed unaligned in the image. Since we have the code to allocate memory for off-page phdrs, the same code path can be used to handle unaligned phdrs. Relax the requirement for both the activated image and interpreter. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295629 Reviewed by: emaste, markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57498
debug: classified in
04-filenames_plain2 by 'sys/'
The remote syscall is executed in the context where debugger owns a p_lock hold on the target. Due to this, exit1() waiting for p_lock going to zero, never happen. Postpone the exit1() call to ast then, saving the provided rval and signo in the struct proc. Mark the async-exiting proc with the new p_flag P_ASYNC_EXIT. While p_xexit can be reused, p_xsig can be only set by actual exit1(), otherwise it breaks the ptrace mechanism. Allocate a dedicated p_asig for it. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57482
debug: classified in
04-filenames_plain2 by 'sys/'
The Linux getsockopt did not check the size of the provided buffer when copying out the value, leading to buffer overflows (e.g., for TCP_INFO). Fix is to use the smaller of the option value size and the provided buffer. MFC after: 1 month Relnotes: yes Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D55881
debug: classified in
04-filenames_plain2 by 'sys/'
The IEEE80211_KEYBUF_SIZE and IEEE80211_MICBUF_SIZE are sprinkled throughout the net80211 stack, ioctl API and drivers. This makes it challenging to (eventually) up IEEE80211_KEYBUF_SIZE to support 256 / 384 bit encryption as, well, it'll break every single driver and the ioctl API in doing so. So as part of this, let's start to separate out the current key/mic buffer size from what drivers and the ioctl layer are using. Drivers especially shouldn't be using these definitions as their key sizes are hardware / firmware API limits, not net80211 limits. Ideally drivers would define their own key buffer / mic buffer sizes and only copy in keys up to that length (and fail keys that are too large) but the current net80211 API isn't there yet. This doesn't yet change what defines / buffer sizes are used in the ioctl layer. I'm going to plan out some subsequent work to separate out those defines and ioctl APIs so they maintain using the 128 bit key/mic buffer sizes and will copy them in/out of any larger net80211 key buffer size in the future. Differential Revision: https://reviews.freebsd.org/D54593
debug: classified in
04-filenames_plain2 by 'sys/'
tty: Add sysctl knob to globally disable TIOCSTI Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57233
debug: classified in
04-filenames_plain2 by 'sys/'
vt: Rename sysctl to security.bsd.allow_tiocsti This is consistent with allow_read_dir and allow_ptrace. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293485 Fixes: https://cgit.freebsd.org/src/commit/?id=c289291a6736 ("tty: Add sysctl knob to globally disable TIOCSTI") Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Approved by: so Security: FreeBSD-SA-26:25.thr Security: CVE-2026-45256 Reported by: Igor Gabriel Sousa e Souza Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: emaste, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57237
debug: classified in
04-filenames_plain2 by 'sys/'
Normally, data processed on the KTLS receive path is contained in anonymous mbufs that can be modified in place. Either the data originates in receive buffers from a NIC driver, or for loopback connections the data is anonymous-backed mbufs created when writing to a socket. One potential source of non-anonymous mbufs are mbufs created by sendfile(2) which borrow the pages of the underlying file, either via M_EXTPG or EXT_SFBUF that are sent over a loopback connection. For a well-formed loopback TLS session, the sender should only use sendfile(2) if KTLS is enabled. If TLS is fully handled in userspace, the sender must use write(2) or send(2) which allocate anonymous mbufs. If KTLS transmit is enabled, then sendfile(2) on a loopback connection will always use crypto via OCF and will allocate anonymous pages to hold the encrypted data. However, if sendfile(2) is used to send file-backed data directly over a loopback connection where KTLS is not enabled on the sender side, the KTLS receive path can modify the file-backed pages in place overwriting the file's data. One potential fix would be to replace non-anonymous mbufs in a received TLS record with anonymous mbufs (e.g. via m_dup()) before passing the record to OCF. However, there is no legitimate use case for using sendfile(2) over a loopback TLS connection without using KTLS on the sender side, so instead simply fail decryption requests and close the connection if non-anonymous mbufs are encountered in the RX decryption path. Add a test for this that verifies that the original data backing the file descriptor used as the source for sendfile() is unchanged after being processed. Approved by: so Security: FreeBSD-SA-26:26.ktls Security: CVE-2026-45257 Co-authored-by: Drew Gallatin <gallatin@FreeBSD.org> Sponsored by: Chelsio Communications Sponsored by: Netflix
debug: classified in
04-filenames_plain2 by 'sys/'
The runtime linker in glibc relies on the AT_SECURE auxv entry to know whether the executable is set-ugid, if so then various dangerous functionality such as LD_PRELOAD is disabled. The check added in commit 669414e4fb74 failed to take into account the fact that during execve, P_SUGID may not yet be set for a set-ugid process. Correct the test. Approved by: so Security: FreeBSD-SA-26:30.linux Security: CVE-2026-49413 Reported by: Minseong Kim Fixes: https://cgit.freebsd.org/src/commit/?id=669414e4fb74 ("Implement AT_SECURE properly.") Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57350
debug: classified in
04-filenames_plain2 by 'sys/'
Otherwise an unprivileged user can disable randomization of the base address for PIEs even if they are setugid. Add a regression test. Approved by: so Security: FreeBSD-SA-26:32.elf Security: CVE-2026-49414 Reported by: David Berard Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57397
debug: classified in
04-filenames_plain2 by 'sys/'
This restores existing error code for connect(2) over unix domain socket when the empty string is specified as socket address. Reported by: eduardo Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57509
debug: classified in
04-filenames_plain2 by 'sys/'
proc: add tree ref count Owning the reference prevents reuse of the struct proc. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57492
debug: classified in
04-filenames_plain2 by 'sys/'
kern_fork: guard against NULL newproc on the failure path Reported and tested by: pho Fixes: https://cgit.freebsd.org/src/commit/?id=85a65e393092 ("proc: add tree ref count") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Recalculate it to iterate over the right set of processes. Prevent reaper' struct proc reuse by holding the tree ref on it. Since our reference is taken under the proctree lock and we know that the process is reaper, it cannot go away. The process hold count (p_lock) cannot be used there because p_lock intent is prevent exit, but reaper owns its reap-children until reaped itself, i.e. even a zombie reaper is still on duty. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57492
debug: classified in
04-filenames_plain2 by 'sys/'
Reported by: Yuxiang Yang, et al <yangyx22 at mails.tsinghua.edu.cn> Discussed with: markj MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
Implement the getsockopt for TCP_INFO by mapping FreeBSD's version to what Linux expects. MFC after: 1 month Relnotes: yes Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55882
debug: classified in
04-filenames_plain2 by 'sys/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295965 Reported and tested by: mandree Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57513
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: imp,emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1659
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57525
debug: classified in
04-filenames_plain2 by 'sys/'
Eliminate panic when re-setting a paused failpoint to pause (address of feq_mtx changes whilst in mtx_sleep, triggering assertion when reacquiring mtx). Reviewed by: rlibby Pull Request: https://github.com/freebsd/freebsd-src/pull/2267
debug: classified in
04-filenames_plain2 by 'sys/'
MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Specifically, do not let vtryrecycle() to recycle a used vnode. It is possible for a vnode to be vref-ed or vuse-ed lockless after it is held by vhold_recycle_free(). Then, since vtryrecycle() does not recheck the hold count, we might end up freeing vused vnode. Since vget_finish() increments v_usecount after obtaining the vnode lock, we would observe the hold reference anyway when the parallel vget() is blocked waiting on the vnode lock. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281749 Reported and tested by: Steve Peurifoy <ssw01@mathistry.net>, Vladimir Grebenshchikov <vova@zote.me> Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57305
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56912
debug: classified in
04-filenames_plain2 by 'sys/'
Use the avaliable space to introduce vnode-locked flag v_v2flag. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56912
debug: classified in
04-filenames_plain2 by 'sys/'
The semantic of the flag has the natural march to the code scope that is protected by the vnode lock. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56912
debug: classified in
04-filenames_plain2 by 'sys/'
With 2cf15144daf7e we added a kernel buffer for parsing input copying the user buffer into that. The problem is that we only copy exactly as many bytes as the user supplied. printf 1 would have a write_size of 1, while echo 1 would have a write_size of 2 (1\n). But in order to check and parse we need a terminating '\0'. Overallocate the kernel buffer by 1 and make sure it is always '\0' terminated. Remove the check that the string needs to be of different length than the write_size as this will always fail unless the user passes in, e.g., "1\02\n\0" somehow in which case we won't bother as kstrto*ll() will not only handle the '\n' but also stop at '\0' and should be fine or it will fail and we will error. In theory we could use a static buffer here as well as we know a maximum possible length of digits plus \n and \0 and take a min of that buffer length and write_size and then error on a small buffer but given this is an optional debug interface, do not bother with any alloc (size). Fixes: https://cgit.freebsd.org/src/commit/?id=2cf15144daf7e ("lindebugfs: Pass user buffer pointers ..") Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57522
debug: classified in
04-filenames_plain2 by 'sys/'
In case the fill function fails do not report (read/write) but the actual operation only given we can easily determine it. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell, emaste Differential Revision: https://reviews.freebsd.org/D57523
debug: classified in
04-filenames_plain2 by 'sys/'
In the ddb show callout function try to resolve the symbol of the callout function to improve debugging. In my case I went through various callouts from show ktr to check what they were and this saved me opening lldb/gdb next to it (and still having the old kernel as the panic to debug was upon reboot). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D57521
debug: classified in
04-filenames_plain2 by 'sys/'
Add lock assertions and "might_sleep" annotations to various mac80211 operation downcalls into the driver. Make sure the code to these is all covered by locks--pushing more wiphy lock into the code--or lock assertions as well. Split up parts of the MC code up into an unlocked and locked version to avoid recurive locking. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
04-filenames_plain2 by 'sys/'
Address a failure in linker_load_module (sys/kern/kern_linker.c) to verify that an already-loaded module matches the version requirement, which caused the method to return the error (EEXIST). This was then propagated back up to kldload, which incorrectly printed that the module had already been loaded. Add a lookup to modlist_lookup2 to distinguish between the two cases: - A module is already loaded that is of the correct version, so the error EEXIST should be returned - An already-loaded module is of the incorrect version, so the error ENOEXEC is returned (changed from ENOENT) Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57002
debug: Commit manually moved from "unknown" to "kernel".
Add a KERNEL_VERSION() macro which normally would be in linux/version.h. On Linux that file is auto-generated and we are supporting more than one Linux version in LinuxKPI anyway so any further defines in there would likely be wrong. Adding the macro helps to support (vendor/out of tree) drivers more easily which are supporting multiple Linux versions. MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D57590
debug: classified in
04-filenames_plain2 by 'sys/'
Add sg_init_marker() which is needed by mt76 drivers USB attachment. Sponosored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D57594
debug: classified in
04-filenames_plain2 by 'sys/'
The upcall_sockets tree owns a ref on any resident socket. When a socket is removed after a TLS handshake failure, rpctls_rpc_failed() thus calls soclose(). rpctls_server() does not acquire an extra ref to compensate for this. So, if the upcall fails, e.g., because rpc.tlsservd is not running, we'll call soclose() to drop the reference, but this effectively releases the xprt layer's reference. Fix the problem by explicitly acquiring a socket reference when adding a socket to the upcall tree. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289734 Reviewed by: rmacklem, glebius MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57555
debug: classified in
04-filenames_plain2 by 'sys/'
This patch moves "struct netexport" into a separate netexport.h file and refcounts the structure, plus adds a few fields that will be used in a future NFS server commit. The patch also includes some helper functions for handling the netextport structure: vfs_netexport_alloc(), vfs_netexport_acquire(), vfs_netexport_release() and vfs_netexport_reset(). Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D57553
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: imp, kib (in D57002) Sponsored by: The FreeBSD Foundation
debug: classified in
05-summary-prefix by 'sys:'
Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57413
debug: classified in
04-filenames_plain2 by 'sys/'
The definition of the EXTERR_CATEGORY symbol in the .c file is needed for the script to regenerate identical context of gen/exterr_cat_filenames.h. Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
For all the socket options that have a fixed type, add the type of the socket option arg to the comment. Most of them already had this, but a few did not. The ones that don't have a tag use a variable length data structure of some kind, and are beyond the scope of this commit. Slightly expand the syntax to allow a comma separated list for those sockopts that have multiple fixed-length versions. Sponsored by: Netflix Reviewed by: pouria, peter.lei_ieee.org, tuexen Differential Revision: https://reviews.freebsd.org/D57545
debug: classified in
04-filenames_plain2 by 'sys/'
According to the IB spec active_speed size should be u16 and not u8 as before. Changing it to allow further extensions in offered speeds. Linux commit: 376ceb31ff87 RDMA: Fix link active_speed size Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> MFC after: 1 week Sponsored by: NVIDIA Networking Differential revision: https://reviews.freebsd.org/D57084
debug: classified in
04-filenames_plain2 by 'sys/'
Add new IBTA speed XDR, supporting signaling rate of 200Gb. Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> MFC after: 1 week Sponsored by: NVIDIA Networking Differential revision: https://reviews.freebsd.org/D57085
debug: classified in
04-filenames_plain2 by 'sys/'
SYSCTL_XXX with CTLFLAG_RDTUN and without CTLFLAG_NOFETCH should not be used for values that are needed before SI_SUB_KLD. Otherwise they are tuned after they are needed. Set CTLFLAG_RDTUN | CTLFLAG_NOFETCH for the debug.witness.witness_count and debug.witness.skipspin sysctls and add separate tunables for them, which run at SI_SUB_TUNABLES time, i.e., in time for witness_startup. Reviewed by: kib, markj Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D57613
debug: classified in
04-filenames_plain2 by 'sys/'
Add tunable debug.witness.lock_order_data_count to allow adjusting the number of witness lock order data entries (stacks) without recompiling the kernel. This may help to display stacks when a lock order reversal is reported but the number of entries is exhausted before recording the first lock order, by allowing the user to reboot with an adjusted tunable and try again. Tunable debug.witness.lock_order_hash_size is also provided to allow the hash table load factor to be managed, though that is not required. Also tweak witness_lock_order_add to avoid computing a hash when it won't be needed because the lock order data entries are exhausted. Reviewed by: kib, markj Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D57600
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D56519
debug: classified in
04-filenames_plain2 by 'sys/'
With exception to sockopt functionality, implement the so_options flag in unix(4) itself. The general argument for the flag is that SCM_RIGHTS can be used maliciously for, e.g., a DoS that the receiving side can't avoid if it is expecting other control messages. This option gives the receiver a way to disable SCM_RIGHTS on the sender-side, surfacing an EPERM to them instead. This seems to match the semantics that Linux offers. If an SCM_RIGHTS was already sent before we disabled SO_PASSRIGHTS, then a subsequent recvmsg(2) will silently discard any in-flight files. This has the downside of punting a file with the potential to hang over to the deferred-close task, but perhaps usage of the option would discourage folks from attempting to take advantage of that possibility anyways. Various manpages updated to describe the new behavior. The ru_msgsnd accounting here might need to be re-evaluated: some error paths will increment it while others will not, and it isn't really clearly labelled. At some point in the operation enough work has been done that one could consider it enough resources to count, but it's not obvious that it should work this way. This change doesn't attempt to address that. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D57423
debug: classified in
04-filenames_plain2 by 'sys/'
This is a little different than the others in that it's not valid for anything but unix(4) sockets. New cases were added that jump into the more standard case out of a light preference for not taking advantage of case FALLTHROUGH with the additional logic- it doesn't scale very well for new cases added that might be slightly special, so we might as well just add the labels up-front. Reviewed by: glebius, markj Differential Revision: https://reviews.freebsd.org/D57424
debug: classified in
04-filenames_plain2 by 'sys/'
We have a native version now, plumb it through to the Linuxolator. Reviewed by: glebius, markj Differential Revision: https://reviews.freebsd.org/D57427
debug: classified in
04-filenames_plain2 by 'sys/'
so2rele was introduced in 1000cc4a0d3 and it was necessary there, but the cleanup in a837d1fe49e0255 rendered it redundant if our own KASSERT is to be believed: we've asserted that `so2->so_splice_back == sp` and `sp` has been dereferenced above, so there's no condition left where we shouldn't release the socket reference at the end. Indeed, the change in so_splice() to NULL out sp->dst removes that possible state of a partially constructed splice: if sp->dst is set, it has been ref'd. Reviewed by: gallatin, markj Differential Revision: https://reviews.freebsd.org/D57558
debug: classified in
04-filenames_plain2 by 'sys/'
jail_attach lets modules do attachment-specific work by calling osd_jail_call(PR_METHOD_ATTACH). If one of the modules returns an error, the call needs to be repeated with the thread's current prison, so possible earlier modules and undo any changes they may have made. MFC after: 5 days
debug: classified in
04-filenames_plain2 by 'sys/'
Use a value that do_execve will ignore since there's nothing there to do.
With this we can set the 'indirect' flag on rtld, to prevent direct execution
being used to bypass the 'indirect' flag on python3:
root@vuefi:~ # /libexec/ld-elf32.so.1 /usr/bin/python3 -c 'print("pwned")'
pwned
root@vuefi:~ # veriexec -z enforce
root@vuefi:~ # /libexec/ld-elf32.so.1 /usr/bin/python3 -c 'print("pwned")'
/libexec/ld-elf32.so.1: Operation not permitted.
root@vuefi:~ #
load_file seems missnamed since it is only used by load_interp
so rename it to load_interp_file.
Reviewed by: imp
Sponsored by: Hewlett Packard Enterprise Development LP
Differential Revision: https://reviews.freebsd.org/D57649
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Add atomics C23 feature test macro Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Restrict ATOMIC_VAR_INIT for C23 conformance Omit `ATOMIC_VAR_INIT` when targeting C23, where it has been removed. Retain it for earlier C standards and for C++ (as it still remains in C++23, albeit marked as deprecated since C17 and C++20.) Also separate `atomic_init` definitions from `ATOMIC_VAR_INIT` to avoid coupling with a deprecated initialisation mechanism. No functional change intended for `atomic_init`; this is purely a conformance and cleanup adjustment. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Add missing kill_dependency macro Add `kill_dependency` as specified by C11 §7.17.3.1. The macro is required to break dependency chains in expressions without affecting the value. No functional impact beyond providing the required, value-preserving definition. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Reorganise memory_order enumeration constants Place the `memory_order` enumeration constants alongside the corresponding typedef under the §7.17.3 heading. The previous layout separated the fallback constant definitions from the enum, which could obscure their relationship. These fallbacks exist only to provide values when the compiler does not supply the builtins. The removed comment encoded implementation-specific assumptions about compiler-provided definitions and implied a relationship between Clang/GCC macros and fallback values. In practice, the fallback definitions exist solely to ensure the enumerators are defined when compiler intrinsics are absent, and do not depend on any particular numeric mapping. No functional change; this is a mere structural and clarity improvement. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Reorder atomic operations to match ISO C standard Reorder definitions of specified generic operations on atomic types so they follow the sequence in ISO/IEC 9899:2024 §7.17.7: 1. `atomic_store` 2. `atomic_load` 3. `atomic_exchange` 4. `atomic_compare_exchange` 5. `atomic_fetch` This aligns the header layout with the standard, making it easier to cross-check against the normative text and maintain consistency with the rest of the header. The behaviour of the macros remains unchanged; this is purely a reorganisation and documentation improvement. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Enforce lock-free atomic_flag and C23-safe initialisation
Select the `atomic_flag` backing type according to the C standard
requirements that `atomic_flag` operations be lock-free.
C11 §7.17.1.5 defines `atomic_flag` as:
> a structure type representing a lock-free, primitive atomic flag
and §7.17.8.2 further requires:
> Operations on an object of type atomic_flag shall be lock free
Therefore:
- Prefer `atomic_bool` when `ATOMIC_BOOL_LOCK_FREE == 2`
- Fall back to `atomic_uchar` when `ATOMIC_CHAR_LOCK_FREE == 2`
- Trigger a translation failure if neither type is lock-free
Adjust `ATOMIC_FLAG_INIT` for C23 initialisation rules:
- Use `{ ATOMIC_VAR_INIT(0) }` in pre-C23 modes
- Use `{ 0 }` in C23 and later
Preserve `atomic_flag_test_and_set_explicit()` semantics by
normalising the exchanged value with `!= 0`, ensuring consistent
boolean results regardless of whether the underlying
representation is `atomic_bool` or `atomic_uchar`.
Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Fix atomic_init for GCC atomic objects Add a dedicated `__GNUC_ATOMICS` path that initialises via `atomic_store_explicit(obj, value, memory_order_relaxed)`. This ensures the required initialisation semantics without assuming any particular object representation. Previously, `atomic_init` on GCC fell through to the legacy `__val` member path intended only for old struct-backed atomic objects. For current atomic objects, this caused the following compilation error: > error: request for member '__val' in something not a structure or union As a result, valid code such as `atomic_init(&x, 1)` failed to compile when using GCC. This fix restores compatibility with standard-conforming callers while other code paths remain unchanged. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Fix GCC pointer semantics for atomic_fetch_add/sub Correct the GCC implementation of `atomic_fetch_add_explicit()` and `atomic_fetch_sub_explicit()` for atomic pointer types. The previous implementation passed the operand directly to the builtins. For pointer objects, this could result in raw byte-wise address arithmetic rather than the required C atomic pointer semantics, where the operand is interpreted as a `ptrdiff_t` element count. As a result, operations such as `atomic_fetch_sub_explicit(&p, 2, ...)` could produce an incorrect post-operation pointer value. Fix this by applying pointer scaling in the GCC path before invoking the builtin, mirroring the existing legacy fallback implementation. Pointer operands are now scaled by the size of the pointed-to type, while integer atomic behaviour remains unchanged. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
04-filenames_plain2 by 'sys/'
libc: Fix ATOMIC_VAR_INIT visibility Fixes: https://cgit.freebsd.org/src/commit/?id=28cecfe27964 ("libc: Restrict ATOMIC_VAR_INIT for C23 conformance") Reviewed by: fuz, imp Differential Revision: https://reviews.freebsd.org/D57724
debug: classified in
04-filenames_plain2 by 'sys/'
Quote from https://pubs.opengroup.org/onlinepubs/7908799/xbd/locale.html: "graph": Define characters to be classified as printable characters, not including the space character. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57578
debug: classified in
04-filenames_plain2 by 'sys/'
The current format seems to be a little confusing, and the version of it for index 0 was broken by the below-referenced commit. Break our UNUSED macros out into one per unused bit to enumerate the entirety of the space and make it easier to claim an unused one. Fixes: https://cgit.freebsd.org/src/commit/?id=b165e9e3ea4e327fc ("Add fchroot(2)") Reviewed by: oshogbo (previous version), kib, markj Differential Revision: https://reviews.freebsd.org/D57505
debug: classified in
04-filenames_plain2 by 'sys/'
pNFSd: Add a directory of newly created files for the pNFSd When an NFSv4.1/4.2 server is configured as a pNFS server, new file creation (via Open/Create from an NFS client) is slow, due to the fact that the NFS server (MDS) must do RPCs against the DS(s). This patch precreates files in a directory called ".pnfshide/numfiles", so that the NFS server can just rename them for the Open/Create. A kernel process called a "replenisher" creates more files in ".pnfshide/numfiles" as required. (At this point, the MDS must still do Setattr RPC(s) on the DS(s), but that will change when the pNFS server is converted to the loosely coupled configuration. This patch only affects the pNFS server and only if the directory .pnfshide/numfiles exists in the exported file system. Reviewed by: kib Discussed with: markj Differential Revision: https://reviews.freebsd.org/D57554
debug: classified in
04-filenames_plain2 by 'sys/'
nfs_nfsdport.c: Do unnecessary initializations to quiet gcc Fixes: https://cgit.freebsd.org/src/commit/?id=d8e8f9251975 ("pNFSd: Add a directory of newly created files for the pNFSd")
debug: classified in
03-filenames_plain1 by
'sys/fs/'
nfs_nfsdport.c: One more unnecessary initialization for gcc Fixes: https://cgit.freebsd.org/src/commit/?id=d8e8f9251975 ("pNFSd: Add a directory of newly created files for the pNFSd")
debug: classified in
03-filenames_plain1 by
'sys/fs/'
debug: moved to kernel because
'Need to be grouped with
d8e8f9251975b68fe9c73e39074e0f211ec2145e'
These have turned out to be too noisy, so put them behind bootverbose Event: BSDCan 2026 (noticed during UFS demo) Sponsored by: Netflix MFC After: 2 weeks
debug: classified in
04-filenames_plain2 by 'sys/'
execve_block(): a mechanism for mutual exclusion with execve() on the process A consumer of execve_block(9) is synchorized with the execution of execve(2) family of syscalls, ensuring that execve_block region is mutually exclusive with the execve processing. Either execve_block() or execve() would sleep until other finishes. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_exec.c: explicitly include sys/limits.h for UINT_MAX While there, remove unneeded manual inclusion of sys/cdefs.h. Fixes: https://cgit.freebsd.org/src/commit/?id=e1a84b7708c2 ("execve_block(): a mechanism for mutual exclusion with execve() on the process") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Provide proc_vmspace_ref() to safely obtain the reference to the target process vmspace, optionally - requiring that the target cannot execve(2) and thus cannot change its vmspace until vmspace in unreferenced - requiring the check of permissions of the caller after the vmspace reference is obtained, since the process lock might have been dropped in the process. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: ensure stability of the vmspace we read the strings from Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vmmap Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vm_layout Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: make kern.proc.osrel atomic Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: disallow execve around sysctl kern.proc.kstacks Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: htts://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
kern_proc.c: disallow execve around sysctl kern.proc.rlimit Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: htts://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: htts://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
to ensure stability of the process uid/gids during the p_cansee()/p_candebug()-protected regions. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57497
debug: classified in
04-filenames_plain2 by 'sys/'
Add a uiomove_step() for the central set of switch statements which choose between userspace and kernel and if data is going to or from the iovec. Refactor uiomove_fromphys loops to unconditionally free per-iteration resources and drop gotos. While here, switch from bcopy to memcpy. Reviewed by: kib Suggested by: emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57688
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: kib, emaste Suggested by: emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57689
debug: classified in
04-filenames_plain2 by 'sys/'
After the conversion to using netlink, the kgssapi had no way of knowing if the gssd daemon was running. As such, a boot where the kgssapi is loaded, but the gssd is not enabled would hang the nfsd for a very long time. (Many timeouts at 300sec each.) This patch adds a Null RPC upcall with a 200msec timeout to check to see if the gssd is running. If the gssd is not running, the nfsd starts up (without Kerberos support) with only a 200msec delay.) Also, move the svc_svc_nl_create() and svc_reg() calls in gssd.c to before the daemon() call, so they are guaranteed to have been done before the nfsd(8) daemon is started by the rc scripts. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295714 Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57455
debug: Commit manually moved from "unknown" to "kernel".
OFED: Use prandom_u32() to reduce diff with upstream Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Implement ib_process_cq_direct This is largely pulled from the original Linux commit to add cq.c. Note that irq_poll is still not supported, but polling should now be possible whereas it wasn't really before. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Obtained from: Linux commit 14d3a3b2498edadec344cb11e60e66091f5daf63 Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Use vmalloc() and vzalloc() in various places This contains changes from the following Linux commits: 10313cbb9220 IPoIB: Allocate priv->tx_ring with vmalloc() b1404069f644 IPoIB/cm: Use vmalloc() to allocate rx_rings 948579cd8c6e RDMA: Use vzalloc() to replace vmalloc()+memset(0) Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Obtained from: Linux commit 3874397c0bdec3c21ce071711cd105165179b8eb Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Obtained from: Linux commit 00085f1efa387a8ce100e3734920f7639c80caa3 Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
We sometimes store sensitive things in the kenv that get zapped, but we really shouldn't rely on that zapping to actually happen. Most unprivileged processes don't really need to read from the kernel environment in the first place, so add a knob that allows it to be disabled. Note that we consider jailed root to be unprivileged from this perspective; they have their own meta/env concepts and we should encourage users to take advantage of those for passing information to jails. "Hey we should do something about that": dch Reviewed by: imp, ziaee, zlei (all slightly previous version) Differential Revision: https://reviews.freebsd.org/D57697
debug: classified in
04-filenames_plain2 by 'sys/'
This avoids having to list POWER_STYPE_COUNT, which is semantically not an allowed value, in 'switch' statements along with POWER_STYPE_UNKNOWN. No functional change (intended). Reviewed by: obiwac Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
debug: classified in
04-filenames_plain2 by 'sys/'
sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio For i386, remove now unused label. Remove unneeded initialization of the 'save' local. Reviewed bu: brooks Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57726
debug: classified in
04-filenames_plain2 by 'sys/'
uiomove_fault(): initialize save with ~0 when no flags are cleared Reported by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=4c4195700249 ("sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio") Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
Move the attribute constants to <linux/dma-mapping.h> to match upstream. Reviewed by: bz, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57749
debug: classified in
04-filenames_plain2 by 'sys/'
Change a '__unused' to '__diagused', which is more precise for that use. No functional change. MFC after: 1 week Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
MFC after: 1 week Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
instead of trying to hack around it with LINUX_IOCTL_MIN_PTR. Since linux file ioctl methods expect the user address in the data argument, this should work for all ioctls, including the variable-length cases like ibcore. Only do it for the FreeBSD ABI, where we know how to reliably access the original syscall arguments. Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, markj Discussed with: zishun.yi.dev@gmail.com Sponsored by: NVidia networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57612
debug: classified in
04-filenames_plain2 by 'sys/'
This reflects the actual functionality of the VOP. While there, add the explicit struct timespec argument for the VOP allowing the caller to set specific atime, not just request an update for it. Requested by: rmacklem Reviewed by: rmacklem Discussed with: jah Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57681
debug: classified in
04-filenames_plain2 by 'sys/'
- Updated QAT infrastructure FW version/AE mask/num_banks fields to facilitate integration of future QAT products. - Exposed service as sym;asym instead of cy for gen4 - Enhanced cpaGetInstances() for accurate instance retrieval - Added 57-bit virtual address support to lac_lock_free_stack - Minor bug fixes and improvements Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com> Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D57746
debug: classified in
04-filenames_plain2 by 'sys/'
Nothing calls it, and the existing virtio transport doesn't implement it. No functional change intended. MFC after: 1 week
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Use _ib_modify_qp to implement ib_modify_qp This was missed when merging in ib_modify_qp_with_udata() previously. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Fixes: https://cgit.freebsd.org/src/commit/?id=b633e08c705f ("ibcore: Kernel space update based on Linux 5.7-rc1.") Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.10 This contains changes from the following Linux commits: 850d8fd76507 IB/mlx4: Handle IPv4 header when demultiplexing MAD a0b3455fcb2d IB/core: Remove debug prints after allocation failure 74226649f42d IB/ipoib: Remove and fix debug prints after allocation failure 870b28524552 IB/mthca: Remove debug prints after allocation failure aa6aae38f7fb IB/core: Release allocated memory in cache setup failure f73a1dbc45a5 infiniband: remove WARN that is not kernel bug 5f24410408fd rdma_cm: add rdma_consumer_reject_data helper function 5042a73d3e9d rdma_cm: add rdma_is_consumer_reject() helper function d3f4aadd614c RDMA/core: Add the function ib_mtu_int_to_enum Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.11 This contains changes from the following Linux commits: 55efcfcd7776 RDMA/core: Fix incorrect structure packing for booleans aaaca121c7cf RDMA/core: add port state cache 9e2c3f1c7f3e RDMA/core: export ib_get_cached_port_state 93b1f29de71f RDMA/cma: resolve to first active ib port d43dbacfc063 IB/core: Change the type of an ib_dma_alloc_coherent() argument 6532c380bf40 IB/core: Remove ib_dma_*map_single_attrs() 0bbb3b7496ea IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it f57e8ca50e23 IB/mad: Add port_num to error message 828f6fa65ce7 IB/umem: Release pid in error and ODP flow 19b752a19dce IB/cma: Allow port reuse for rdma_id 21d6454a392d RDMA/core: create struct ib_port_cache 25bf14d6f589 IB/core: Add implicit MR flag d9d0674c0f8a IB/umem: Indicate that process is being terminated d07d1d70ce1a IB/umem: Update on demand page (ODP) support a748d60df32e IB/mlx4: Take source GID by index from HW GID table 89052d784bc9 IB/cma: Add default RoCE TOS to CMA configfs 6df6b4a9ce43 IB/cma: Destination and source addr families must match On FreeBSD, the default RoCE TOS setting is available as per-port sysctls similar to the existing default RoCE mode sysctls. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.12 Most of the changes involve renaming InfiBand address handles (AH) to RDMA address handles including renaming various types and functions. Address handles now also include type-specific fields and a set of wrapper accessor functions for getting and setting fields. For some of the type and function renames, drivers in sys/dev had to be updated directly (typically via sed). This contains changes from the following Linux commits: f039f44fc331 IB/core: Add support for draining IB_POLL_DIRECT completion queues fedd9e1f7582 IB/cq: Don't process more than the given budget 403cd12e2cf7 IB/umem: Add contiguous ODP support 0008b84ea9af IB/umem: Add support to huge ODP 3e7e1193e28a IB: Replace ib_umem page_size by page_shift cb8637660ae8 IB/SA: Move functions update_sm_ah() and ib_sa_event() 680562b56939 IB/SA: Remove unwanted braces dbb6c91fd8e0 IB/SA: Add braces when using sizeof f96a31871449 IB/SA: Fix lines longer than 80 columns 94d595c56077 IB/core: Add rdma_cap_opa_ah to expose opa address handles ee1c60b1bff8 IB/SA: Modify SA to implicitly cache Class Port info aa4656d9a429 IB/core: Move opa_class_port_info definition to header file 2196f2716292 IB/SA: Add support to query opa classport info. 64b4646eaf3d IB/core: Define 'opa' rdma_ah_attr type 44c58487d51a IB/core: Define 'ib' and 'roce' rdma_ah_attr types d8966fcd4c25 IB/core: Use rdma_ah_attr accessor functions 2224c47ace23 IB/core: Add accessor functions for rdma_ah_attr fields 365231593409 IB/core: Rename ib_destroy_ah to rdma_destroy_ah bfbfd661c9ea IB/core: Rename ib_query_ah to rdma_query_ah 67b985b6c755 IB/core: Rename ib_modify_ah to rdma_modify_ah 0a18cfe4f6d7 IB/core: Rename ib_create_ah to rdma_create_ah 766b7f6cf0c0 IB/mthca: Rename to_ib_ah_attr to to_rdma_ah_attr 38349389fece IB/mlx5: Rename to_ib_ah_attr to to_rdma_ah_attr 71d53ab47ee6 IB/mlx4: Rename to_ib_ah_attr to to_rdma_ah_attr 90898850ec4e IB/core: Rename struct ib_ah_attr to rdma_ah_attr 4ba66093bdc6 IB/core: Check for global flag when using ah_attr cf0b9395d084 IB/core: Add braces when using sizeof cfd519358f50 IB/IPoIB: Remove 'else' when the 'if' has a return. 82ffc226483c IB/CM: Add braces when using sizeof dfa834e1d97e IB/SA: Introduce path record specific types c2f8fc4ec440 IB/SA: Rename ib_sa_path_rec to sa_path_rec 9fdca4da4d8c IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields 4c33bd1926cc IB/SA: Add support to query OPA path records 57520751445b IB/SA: Add OPA path record type 87f0faadc685 IB/SA: Add OPA addr header eed7624552ca RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled f937d93a9122 RDMA/uverbs: Declare local function static and add brackets to sizeof d3957b86a406 RDMA/SA: Fix kernel panic in CMA request handler flow The IPoIB portions of ee1c60b1bff8 were already present in FreeBSD from an earlier sync with OFED. Likewise, the ib_uverbs_cmd.c changes from 4ba66093bdc6 were also already present. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.13 This contains changes from the following Linux commits: 28b5b3a23ba6 RDMA/core: Document confusing code 5fff41e1f89d IB/core: Fix race condition in resolving IP to MAC b1a89257f28e IB/umem: update to new mmu_notifier semantic Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.14 This contains changes from the following Linux commits: 1cb2fc0db764 IB/mad: Change slid in RMPP recv from 16 to 32 bits 7e93e2cb835c IB/IPoIB: Increase local_lid to 32 bits d541e45500bd IB/core: Convert ah_attr from OPA to IB when copying to user 6b3c0e6e6d5a IB/CM: Create appropriate path records when handling CM request e92aa00a5189 IB/CM: Add OPA Path record support to CM 7db20ecd1d97 IB/core: Change wc.slid from 16 to 32 bits db58540b021a IB/core: Change port_attr.sm_lid from 16 to 32 bits 582faf3150f5 IB/core: Change port_attr.lid size from 16 to 32 bits ac3a949fb2ff IB/CM: Set appropriate slid and dlid when handling CM request 06f8174a9782 IB/core: Protect sysfs entry on ib_unregister_device 62ede7779904 Add OPA extended LID support 13c19222889d IB/rdmavt, hfi1, qib: Modify check_ah() to account for extended LIDs d98bb7f7e6fa IB/hfi1: Determine 9B/16B L2 header type based on Address handle dcc9881e6767 RDMA/(core, ulp): Convert register/unregister event handler to be void f808c13fd373 lib/interval_tree: fast overlap detection Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.15 This contains changes from the following Linux commits: c0b64f58e8d4 RDMA/cma: Avoid triggering undefined behavior c0348eb06968 IB: Let ib_core resolve destination mac address 5a3dc3237243 IB/cm: Fix memory corruption in handling CM request fec99ededf6b RDMA/umem: Avoid partial declaration of non-static function 19b57c6c4499 IB/core: Convert OPA AH to IB for Extended LIDs only e08ce2e82b2f RDMA/core: Make function rdma_copy_addr return void 4190b4e96954 RDMA/core: Rename kernel modify_cq to better describe its usage Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.16
This contains changes from the following Linux commits:
c5c4e40e90b5 IB/CM: Change sgid to IB GID when handling CM request
54a6d63f14bd IB/mlx4: Potential buffer overflow in _mlx4_set_path()
56d0a7d9a0f0 IB/core: Depend on IPv6 stack to resolve link local address for RoCEv2
1060f8653414 IB/{core/cm}: Fix generating a return AH for RoCEE
981b5a2384b7 RDMA/cma: Introduce and use helper functions to init work
c42388053758 RDMA/cma: Avoid setting path record type twice
4367ec7fe2dd RDMA/cma: Simplify netdev check
151ed9d70097 IB/core: Refactor to avoid unnecessary check on GID lookup miss
b0dd0d335364 IB/core: Avoid unnecessary type cast
86937fcd6ed2 RDMA/core: Avoid redundant memcpy in rdma_addr_find_l2_eth_by_grh
1c43d5d308f0 IB/core: Avoid exporting module internal ib_find_gid_by_filter()
dbb12562f7c2 IB/{core, ipoib}: Simplify ib_find_gid to search only for IB link layer
f6bdb14267ba IB/{core, umad, cm}: Rename ib_init_ah_from_wc to ib_init_ah_attr_from_wc
4ad6a0245ec8 IB/{core, cm, cma, ipoib}: Rename ib_init_ah_from_path to ib_init_ah_attr_from_path
33f93e1ebcf5 IB/cm: Fix sleeping while spin lock is held
16c72e402867 IB/cm: Refactor to avoid setting path record software only fields
af808ece5ce9 IB/SA: Check dlid before SA agent queries for ClassPortInfo
8d20a1f0ecd5 RDMA/cma: Fix rdma_cm raw IB path setting for RoCE
fe75889f2794 RDMA/{cma, ucma}: Simplify and rename rdma_set_ib_paths
9327c7afdce3 RDMA/cma: Provide a function to set RoCE path record L2 parameters
89838118a515 RDMA/cma: Fix rdma_cm path querying for RoCE
cd2a6e7d384b IB/core: Fix ib_wc structure size to remain in 64 bytes boundary
f2290d6d522d IB/core: Attempt DMAC resolution for only RoCE
a6532e713966 RDMA/core: Clarify rdma_ah_find_type
246d8b184c10 IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct
aaebd377c0e9 IB/core: postpone WR initialization during queue drain
15cbc5197693 RDMA/core: Simplify rdma_addr_get_sgid() to not support RoCE
7a2f64ee4a95 RDMA/ucma: Use rdma cm API to query GID
411460ac50b0 RDMA/cma: Introduce API to read GIDs for multiple transports
2493a57bc10f RDMA/cma: Refactor to access multiple fields of rdma_dev_addr
00db63c128dd RDMA/cma: Check existence of netdevice during port validation
925f7ea7a6ba RDMA/cm: Fix access to uninitialized variable
87daac68f77a IB/core: Map iWarp AH type to undefined in rdma_ah_find_type
87915bf82eea RDMA/verbs: Return proper error code for not supported system call
d3b9e8ad425c RDMA/core: Reduce poll batch for direct cq polling
Parts of 1060f8653414 were already merged into FreeBSD. Cosmetic
changes made in rdma_addr_find_l2_eth_by_grh while merging this change
were just to reduce the diff with Linux to ease merging future
changes.
The merge of 56d0a7d9a0f0 differs slightly from the Linux commit as
FreeBSD was missing the original changes to check for link-local
addresses in ib_resolve_eth_dmac.
The merge of 2493a57bc10f is mostly a cosmetic change to reduce diffs
with upstream as local changes in FreeBSD passed the dev_addr as the
last argument instead of the dev_type and if_index already.
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.17
This contains changes from the following Linux commits:
a3b641af72ba RDMA/CM: move rdma_id_private to cma_priv.h
6612b4983f7e IB/core: Fix comments of GID query functions
b26c4a1138df IB/{core, ipoib}: Simplify ib_find_gid() for unused ndev
5ac08a341303 IB/cma: Use rdma_protocol_roce() and remove cma_protocol_roce_dev_port()
a9c06aeba997 IB/core: Remove rdma_resolve_ip_route() as exported symbol
a22af59ea9a5 IB/cm: Add and use a helper function to add cm_id's to the port list
cb12a8e2fa5f IB/cm: Introduce and use helper function to get cm_port from path
0a5141593567 IB/core: Refactor ib_init_ah_attr_from_path() for RoCE
e41a7c41947d IB/core: Move rdma_addr_find_l2_eth_by_grh to core_priv.h
98f1f4e0ed26 IB/core: Refer to RoCE port property instead of GID table property
114cc9c4b182 IB/cma: Resolve route only while receiving CM requests
9137108cc3d6 RDMA/rdma_cm: Fix use after free race with process_one_req
190fb9c4d130 IB/core: Refer to RoCE port property to decide building cache
22d24f75a193 IB/core: Search GID only for IB link layer
4ab7cb4bf362 IB/core: Refer to RoCE port property instead of GID table property
3401857ea347 IB/core: Generate GID change event regardless of RoCE GID table property
218b9e3eb8b5 RDMA/cma: Move rdma_cm_state to cma_priv.h
8435168d50e6 RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device
72e1ff0fb7e0 RDMA/core: Update query_gid documentation for HCA drivers
0e1f9b924471 RDMA/providers: Simplify query_gid callback of RoCE providers
598ff6bae689 IB/core: Refactor GID modify code for RoCE
f35faa4ba956 IB/core: Simplify ib_query_gid to always refer to cache
14169e333e71 IB/providers: Avoid zero GID check for RoCE
414448d249d8 RDMA: Use ib_gid_attr during GID modification
ee6548d1d98d RDMA/rdma_cm: Delete rdma_addr_client
44e75052bc2a RDMA/rdma_cm: Make rdma_addr_cancel into a fence
e19c0d237873 RDMA/rdma_cm: Remove process_req and timer sorting
a66ed149b0da IB/core: Don't allow default GID addition at non reseved slots
dc5640f294e4 IB/core: Fix deleting default GIDs when changing mac adddress
22c01ee4b8a8 IB/core: Fix to avoid deleting IPv6 look alike default GIDs
9aa169213d11 RDMA/cma: Do not query GID during QP state transition to RTR
aec05afe641b IB/core: Remove redundant return
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.18 This contains changes from the following Linux commits: e822ff213fe6 IB/cm: Store and restore ah_attr during CM message processing 0e225dcb7681 IB/cm: Store and restore ah_attr during LAP msg processing a5c57d327272 IB/cm: Avoid AV ah_attr overwriting during LAP message handling 724631a9c6e9 IB/core: Introduce and use rdma_gid_table() 25e62655c793 IB/core: Reduce the places that use zgid 08bb558ac11a IB/core: Make testing MR flags for writability a static inline function Commit 0e225dcb7681 was partially merged previously as cm_init_av_for_lap() already existed in FreeBSD matching the version from the Linux commit. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Malloc API cleanups from Linux 4.18 This contains changes from the following Linux commits: acafe7e30216 treewide: Use struct_size() for kmalloc()-family fad953ce0b22 treewide: Use array_size() in vzalloc() 6396bb221514 treewide: kzalloc() -> kcalloc() 6da2ec56059c treewide: kmalloc() -> kmalloc_array() Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.19
Many of these changes deal with shifting from fetcing SGID attributes
via an index in drivers to including references to SGID attributes in
other structures passed to driver callbacks which can be used directly
avoiding the need for fetching attributes via lookup functions. I had
to fixup the ROCE GID management code directly as the version in
FreeBSD is very different from Linux.
I also tweaked the change from commit
475c8de7bf2dc86d9806709a04e9c8f524d4ec32 to use a goto to reduce diffs
with upstream to minimize conflicts when merging upstream changes.
This contains changes from the following Linux commits:
a1a4caeebac9 IB/core: Do not set the gid type when reserving default entries
1c36cf912ad1 IB/core: Store default GID property per-table instead of per-entry
1dfce2945771 IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid
83f6f8d29dd3 IB/core: Make rdma_find_gid_by_filter support all protocols
c3d71b69a75c IB/core: Provide rdma_ versions of the gid cache API
77e786fcbe2e IB/core: Replace ib_query_gid with rdma_get_gid_attr
bf399c2cadfa IB/core: Introduce GID attribute get, put and hold APIs
f4df9a7c34d8 RDMA: Use GID from the ib_gid_attr during the add_gid() callback
b150c3862d21 IB/core: Introduce GID entry reference counts
47ec38666210 RDMA: Convert drivers to use sgid_attr instead of sgid_index
d97099fe53ed IB{cm, core}: Introduce and use ah_attr copy, move, replace APIs
947c99ecfcb4 IB/core: Tidy ib_resolve_eth_dmac
8d9ec9addd6c IB/core: Add a sgid_attr pointer to struct rdma_ah_attr
89af969a6653 RDMA: Convert drivers to use the AH's sgid_attr in post_wr paths
1a1f460ff151 RDMA: Hold the sgid_attr inside the struct ib_ah/qp
7492052a186b IB/mlx4: Use GID attribute from ah attribute
59d40813328f IB/core: Free GID table entry during GID deletion
881456789248 RDMA/cma: Consider net namespace while leaving multicast group
4ed13a5f2d60 IB/cm: Keep track of the sgid_attr that created the cm id
aa74f4878d61 IB: Make init_ah_attr_grh_fields set sgid_attr
f685c19529f0 IB: Make ib_init_ah_from_mcmember set sgid_attr
b7403217656d IB: Make ib_init_ah_attr_from_wc set sgid_attr
ea8c2d8f6014 RDMA/core: Remove unused ib cache functions
a8872d53e9b7 IB/cm: Use sgid_attr from the AV
398391071f25 IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *'
815d456ef21a IB/cm: Pass the sgid_attr through various events
4eefd62c17a9 include/rdma/opa_addr.h: Fix an endianness issue
f8c2d2280cf6 RDMA/core: Remove set-but-not-used variables
28e39894ed4f RDMA/core: Remove ib_find_cached_gid() and ib_find_cached_gid_by_port()
07e7056aff6c IB/core: Simplify check for RoCE route resolve
40ddacf2dda9 RDMA/umem: Don't hold mmap_sem for too long
1215cb7c88ec RDMA/umem: Refactor exit paths in ib_umem_get
c012691508f5 IB/cm: Remove cma_multicast->igmp_joined
4b4671a0f269 IB/IPoIB: Simplify ib_post_(send|recv|srq_recv)() calls
1fec77bf8fcd RDMA/core: Simplify ib_post_(send|recv|srq_recv)() calls
bb039a870c05 IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument
643d213a9a03 RDMA/cma: Do not ignore net namespace for unbound cm_id
d274e45ce1ed RDMA/cma: Consider netdevice for RoCE ports
cee104334c98 IB/core: Introduce and use sgid_attr in CM requests
7150c3d5544b RDMA/core: Remove {create,destroy}_ah from mandatory verbs
854633165164 RDMA/core: Prefix _ib to IB/RoCE specific functions
7582df826734 RDMA/core: Avoid holding lock while initializing fields on stack
79d684f02647 RDMA/core: Simplify gid type check in cma_acquire_dev()
ca3a8ace2b12 RDMA/core: Return bool instead of int
05e0b86c413d RDMA/cma: Get rid of 1 bit boolean
e7ff98aefc9e RDMA/cma: Constify path record, ib_cm_event, listen_id pointers
2df7dba855e1 RDMA/core: Constify dst_addr argument
219d2e9dfda9 RDMA/cma: Simplify rdma_resolve_addr() error flow
26e551c5aec5 RDMA: Fix return code check in rdma_set_cq_moderation
58796e67d5d5 IB/ucm: Initialize sgid request GID attribute pointer
dd81b2c8a333 IB/core: Change filter function return type from int to bool
93065ac753e4 mm, oom: distinguish blockable mode for mmu notifiers
0d23ba6034b9 RDMA/ucma: check fd type in ucma_migrate_id()
Part of cee104334c98 was previously merged into FreeBSD. Namely, SGID
index fields had been added to the two param structures instead and
roce_get_net_dev_by_cm_event was implemented using SGID indices.
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Various changes from Linux 4.20
This contains changes from the following Linux commits:
627212c9d49b RDMA/core: Replace open-coded variant of get_device
adee9f3f3bbb RDMA/core: Depend on device_add() to add device attributes
954a8e3aea87 RDMA/cma: Protect cma dev list with lock
722c7b2bfead RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()
f9d08f1e1939 RDMA/core: Rate limit MAD error messages
e1f540c3ed0e RDMA/core: Define client_data_lock as rwlock instead of spinlock
2d65f49ff961 RDMA/core: Use simpler spin lock irq API from blocking context
4512acd0d34c RDMA/core: Remove context entries from list while unregistering device
f7b65d9bf2db RDMA/core: Use simplified list_for_each
93688ddbe1da RDMA/core: No need to protect kfree with spin lock and semaphore
50704e039ab1 RDMA/umem: Restore lockdep check while downgrading lock
eb93c82ed8c7 RDMA/core: Document QP @event_handler function
4269024639f6 RDMA/core: Document CM @event_handler function
77addc524473 RDMA/core: Rename rdma_copy_addr to rdma_copy_src_l2_addr
a362ea1d9e1a RDMA/core: Introduce and use rdma_set_src_addr() between IPv4 and IPv6
89c5691cdd95 RDMA/core: Let protocol specific function typecast sockaddr structure
caf1e3ae9fa6 RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu
c31d4b2ddf07 RDMA/core: Protect against changing dst->dev during destination resolve
0e9d2c19bff1 RDMA/core: Consider net ns of gid attribute for RoCE
d6b1764a8c5a RDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute
6aaecd385685 RDMA/core: Simplify roce_resolve_route_from_path()
0965cc953a23 RDMA/core: Properly return the error code of rdma_set_src_addr_rcu
d4b4dd1b9706 RDMA/umem: Do not use current->tgid to track the mm_struct
c9990ab39b6e RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm
597ecc5a0954 RDMA/umem: Get rid of struct ib_umem.odp_data
41b4deeaa123 RDMA/umem: Make ib_umem_odp into a sub structure of ib_umem
b5231b019d76 RDMA/umem: Use ib_umem_odp in all function signatures connected to ODP
56ac9dd9177c RDMA/umem: Avoid synchronize_srcu in the ODP MR destruction path
be7a57b41ad8 RDMA/umem: Handle a half-complete start/end sequence
ca748c39ea3f RDMA/umem: Get rid of per_mm->notifier_count
f27a0d50a4bc RDMA/umem: Use umem->owning_mm inside ODP
Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: A few channges from Linux 5.0 The main point of these changes is the last commit adding a couple of helper functions used in ROCE drivers. This contains changes from the following Linux commits: a70c07397fd8 RDMA: Introduce and use GID attr helper to read RoCE L2 fields 8f9748602491 IB/cm: Reduce dependency on gid attribute ndev check adb4a57a7a1d RDMA/cma: Use rdma_read_gid_attr_ndev_rcu to access netdev b4fb4cc5ba83 RDMA/cma: Fix unbalanced cm_id reference count during address resolve d5665a21250e RDMA/core: Add hash functions to calculate RoCEv2 flowlabel and UDP source port Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
OFED: Calculate UDP source port based on flow label or lqpn/rqpn Calculate and set UDP source port based on the flow label. If flow label is not defined in GRH then calculate it based on lqpn/rqpn. Tested by: Wafa Hamzah <wafah@nvidia.com> (mlx5_ib) Tested by: John Baldwin <jhb@FreeBSD.org> (iw_cxgbe) Obtained from: Linux commit 18451db82ef7f943c60a7fce685f16172bda5106 Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
Event: Halifax Hackathon 202606 Location: jrm@'s dining room Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57275
debug: classified in
04-filenames_plain2 by 'sys/'
It's relatively simple, but we'll do it a couple of times; pull it out into a macro. Reviewed by: imp (previous version), jamie Differential Revision: https://reviews.freebsd.org/D48074
debug: classified in
04-filenames_plain2 by 'sys/'
This both lets us quickly identify a slot that's been deallocated while debugging, and forces us to take a fault if something tries to call one of the methods anyways somehow with osd_destructors[slot - 1] == NULL. Reviewed by: imp, jamie Differential Revision: https://reviews.freebsd.org/D48075
debug: classified in
04-filenames_plain2 by 'sys/'
jail_attach_jd passed PD_DEREF to do_jail_attach, assuming it would take care of freeing the held prison. This is not true, as do_jail_attach immediately cleared that flag, leaving the jail stock in dying state when it is later removed. Reported by: markj Reviewed by: markj MFC after: 3 days Differential Revision: <https://reviews.freebsd.org/D57674>
debug: classified in
04-filenames_plain2 by 'sys/'
Since 'preempt_thresh' is set to PRI_MIN_KERN by default, and comparison of the considered thread's priority with that threshold is done with '<=', PRI_MIN_KERN threads actually can preempt other threads, contrary to other non-interrupt kernel ones (between PRI_MIN_KERN + 1 and PRI_MAX_KERN). So, replace the comparison operator '<=' by '<'. The alternative would be to change the default value, but changing the comparison instead has the benefit to be consistent with the 0 setting (which forbids preemption entirely), since allowing only threads with priority 0 to preempt becomes possible. Consequently, we also change the default value for the FULL_PREEMPTION option by adding 1 to PRI_MAX_IDLE (in practice, that does not make any difference in the current setting, since no preemption will happen if the new priority value is not strictly lower than the current one, and PRI_MAX_IDLE is PRI_MAX, the highest possible priority). Reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=ae7a6b38d53f ("ULE 3.0: Fine grain scheduler locking and affinity improvements. (...)") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: jrm@'s dining room Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57828
debug: classified in
04-filenames_plain2 by 'sys/'
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from C23 and C++17 so prefer it to the homegrown __result_use_check and put it in the right place so it is correct when expanded to [[nodiscard]]. Reviewed by: markj, emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D57882
debug: classified in
04-filenames_plain2 by 'sys/'
Should have been removed when that line was moved from 'files.arm' to 'files'. Fixes: https://cgit.freebsd.org/src/commit/?id=14e1a2cd295d ("Move ofw_cpu file to the main files conf file.") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Seat 36K in AC667, over Maine near Canadian border Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'sys/'
Reviewed by: jah, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57824
debug: classified in
04-filenames_plain2 by 'sys/'
These provenance-preserving functions are to be used when copying objects that are expected to contain pointers. Data buffers which do not contain pointers should be copied by the traditional copyin/copyout functions which *do not* preserve pointer provenance (on CHERI they clear validity tags). NOTE: Going forward, this requires changes when adding new syscalls or ioctl that take pointers to objects containing pointers. Fortunately, the vast majority (>90%) of copyin and copyout statements do not copy pointers and require no change. Failure to make the chance will have no effect on non-CHERI architectures. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: DARPA, AFRL, Innovate UK Differential Revision: https://reviews.freebsd.org/D57663
debug: classified in
04-filenames_plain2 by 'sys/'
CHERI: declare fueptr and suptr These should replace fueword and suword when manipulating pointers in memory. On CHERI targets they will be implemented using capability aware instructions and otherwise they are defined to fueword and suword. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57664
debug: Commit manually moved from "unknown" to "kernel".
Harden witness against reasonable tunable settings causing boot panics or scribblers. For now, don't bother to harden this completely. Panics are still achievable by setting the tunables to negative or very large values. The recent change to respect the setting of debug.witness.witness_count (08180f1b613b) exposed that there are no guard rails on that setting, setting it to large but plausible values can cause integer overflow or cause attempted use of memory beyond what is actually available. Add some guard rails, fall back to default configuration if the tuned values are too large, and fall back to a minimum memory allocation if even the defaults are too large. Also don't allow witness to use over half of the memory segment, as there are other early allocators after witness too. Reported by: asomers Reviewed by: kib, markj (previous version) Fixes: https://cgit.freebsd.org/src/commit/?id=08180f1b613b ("witness: actually set read-only tunables in time for witness_startup") Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D57793
debug: classified in
04-filenames_plain2 by 'sys/'
Unmanaged device pager objects maintain a linked list of pages that were returned from the fault handler. Initially, such pages are valid, but msync(MS_INVALIDATE) can mark them invalid (and clean). They are not removed from page tables (since they are unmanaged), but a subsequent mlock() call can trigger a page fault that is handled by the pager. dev_pager_getpages() then re-inserts the page into the linked list even though it's already present there. This patch fixes the problem by removing the linked list. OBJ_PG_DTOR is set, so vm_object_terminate_pages() does nothing, and dev_pager_dealloc() instead handles cleanup of the object. Add a regression test case which triggers a queue.h assertion failure in unpatched kernels. Note, in stable branches we should avoid changing the layout of struct vm_object. Approved by: so Security: FreeBSD-SA-26:37.vm Security: CVE-2026-49418 Reported by: slidybat Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57743
debug: classified in
04-filenames_plain2 by 'sys/'
The unlinkat(2) and funlinkat(2) system calls were ignoring AT_RESOLVE_BENEATH. Also pass pathseg through instead of assuming it's UIO_USERSPACE. Add some tests which make sure that AT_RESOLVE_BENEATH is handled properly by various system calls. Approved by: so Security: FreeBSD-SA-26:42.unlinkat Security: CVE-2026-49421 Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57790
debug: classified in
04-filenames_plain2 by 'sys/'
posixshm: Disallow fspacectl() on largepage objects As with truncation, the operation isn't supported, but nothing prevented it. Add a regression test. Approved by: so Security: FreeBSD-SA-26:44.posixshm Security: CVE-2026-49428 Reported by: Chris Jarrett-Davies <chrisjd@openai.com> Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57830
debug: classified in
04-filenames_plain2 by 'sys/'
posixshm: Disallow truncation of largepage objects We correctly handled ftruncate(), but not open(O_TRUNC). Add a regression test. Approved by: so Security: FreeBSD-SA-26:44.posixshm Security: CVE-2026-49428 Reported by: Chris Jarrett-Davies <chrisjd@openai.com> Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57831
debug: classified in
04-filenames_plain2 by 'sys/'
posixshm: Fix handling of sendfile() with largepage objects sendfile(2) can transmit POSIX shared memory objects. Typically it will look up and wire each page before sending it to a socket; once transmission is complete, the page is unwired and typically released back into the page queues. sendfile() has an advisory flag, SF_NOCACHE, which means, "try to free the page once transmission is complete." This is implemented in vm_page_release(), which expects to operate on managed pages. Pages belonging a largepage object are de-facto wired not explicitly so. Thus, vm_page_release() will unwire and, having found no additional references, free the page. Because mappings of largepage objects are unmanaged, userspace can still access the now freed page. Fix the problem by explicitly wiring largepage pages. Make the VM object destructor responsible for unwiring and freeing them. Add a regression test. Approved by: so Security: FreeBSD-SA-26:44.posixshm Security: CVE-2026-49427 Reported by: Chris Jarrett-Davies <chrisjd@openai.com> Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57832
debug: classified in
04-filenames_plain2 by 'sys/'
`error` here is the return value of syscall_thread_enter() rather than the syscall itself, so the committed audit records do not reflect reality. This is less harmful than them recording an error when the operation actually succeeded, but it could still possibly be used to throw off IDS techniques with things like bsmtrace. Approved by: so Security: FreeBSD-SA-26:45.audit Security: CVE-2026-49426 Reviewed by: des, kib, markj, csjp Differential Revision: https://reviews.freebsd.org/D57847
debug: classified in
04-filenames_plain2 by 'sys/'
If an mbuf in the chain was skipped because it only contained bytes
from the header, the iovec index ('i') was incremented even though the
entry was not populated. Only increment 'i' when an iovec entry is
consumed.
Add a new type of KTLS receive test which writes a single TLS record
via two separate write(2) calls over a TCP_NODELAY socket to trigger
a split in the mbuf chain in the kernel. Test various split locations
including after the "plain" TLS header (5 bytes), after the full TLS
header, in the middle of the data payload, just before the start of
the trailer, and in the middle of the trailer. These tests are also
run against all supported ciphers, not just CBC. The 'header' test
for CBC ciphersuites was able to trigger the bug.
Approved by: so
Security: FreeBSD-SA-26:46.ktls
Security: CVE-2026-49423
Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
If an mbuf's length in the chain for an encrypted TLS record exactly matches the remaining length of header bytes to skip, skip the mbuf entirely rather than adding a zero-length iovec entry. Sponsored by: Chelsio Communications
debug: classified in
04-filenames_plain2 by 'sys/'
Attempting to handle the error gracefully can easily result in missing
SIGSYS, so this was made to always succeed in
39024a89146 ("syscalls: fix missing SIGSYS for several ENOSYS errors")
and returns the nosys entry on failure.
Drop the pretense of returning an error and clean up a few dead error
paths.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D57848
debug: classified in
04-filenames_plain2 by 'sys/'
This fixes the build when WITHOUT_CROSS_COMPILER is set. Reported by: fuz, vishwin Fixes: https://cgit.freebsd.org/src/commit/?id=17494c6e6b7d ("build: Boostrap LLVM_BINUTILS for cross-tools") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56219
debug: classified in
03-filenames_plain1 by
'share/mk/'
These were modified to avoid triggering a libucl bug which is now fixed. MFC after: 1 week Reviewed by: ivy, kevans Differential Revision: https://reviews.freebsd.org/D52824
debug: classified in
02-filenames_wildcards by
'release/.*'
Gate libsamplerate behind MK_CUSE and MK_SOUND, like virtual_oss. Nothing else uses this library, so there's no point building it if we aren't building virtual_oss. This avoids building a useless FreeBSD-sound package containing only this library when WITHOUT_SOUND is set. MFC after: 1 week Reviewed by: christos, emaste Differential Revision: https://reviews.freebsd.org/D56164 Sponsored by: https://www.patreon.com/bsdivy
debug: classified in
02-filenames_wildcards by
'.*Makefile'
When WITHOUT_AUDIT is set, nothing is built that uses this library, so don't build the library. This avoids building the FreeBSD-audit package when WITHOUT_AUDIT is set. MFC after: never Reviewed by: csjp, imp, emaste Differential Revision: https://reviews.freebsd.org/D56157 Sponsored by: https://www.patreon.com/bsdivy
debug: classified in
02-filenames_wildcards by
'.*Makefile'
WITHOUT_BZIP2_SUPPORT only affects a single binary, gzip(1); it doesn't remove bzip2 support from other bits (e.g., libarchive) and there are no similar options for gzip, xz or zstd. WITHOUT_BZIP2 has not done anything at all since it was first added in 2007. MFC after: never Discussed on: arch@ Reviewed by: imp, des, adrian, delphij, emaste Differential Revision: https://reviews.freebsd.org/D56148 Sponsored by: https://www.patreon.com/bsdivy
debug: Commit manually moved from "unknown" to "build".
In libucl 0.9.3, macros and includes are disabled by default when creating a new UCL parser. This breaks the package build, which relies on includes. Fix this by explicitly passing zero flags to ucl.parser(). MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=abda442d92fd ("contrib/libucl: Import libucl 0.9.3") Reviewed by: kevans, bapt Reported by: freebsd@walstatt-de.de Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56266
debug: classified in
02-filenames_wildcards by
'release/.*'
debug: classified in
03-filenames_plain1 by
'share/mk/'
flua: Always build as a bootstrap tool We want to use flua from the source tree (not the host) during package build, firstly to protect us from breaking changes in lua or libucl, and secondly to allow (in future) cross-building of packages from Linux or macOS. Since we don't know if the user will be building packages during the bootstrap phase, and because flua is fairly small and generally useful, build it as a bootstrap tool unconditionally. MFC after: 2 weeks Reviewed by: kevans, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56270
debug: classified in
02-filenames_wildcards by
'.*Makefile'
tools/build/Makefile: Always add md4.h to SYSINCS Since libmd was added to the bootstrap, building main on stable/14 fails because of an incompatibility in its old md4.h. Fix this by always including md4.h in the bootstrap headers, instead of only doing so when building on a non-FreeBSD host. Fixes: https://cgit.freebsd.org/src/commit/?id=50de0bf50512 ("flua: Always build as a bootstrap tool") Reported by: olce Reviewed by: olce, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56327
debug: classified in
02-filenames_wildcards by
'.*Makefile'
To avoid breaking the build due to incompatible changes in flua or lua libraries on the host, use the bootstrap flua for the package build. MFC after: 2 weeks Reviewed by: kevans, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56271
debug: classified in
02-filenames_wildcards by '['.*Makefile',
'release/.*']'
MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=8dfeba04eb36 ("Update to a June 8th snapshot of (un)vis form NetBSD.") Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D56260
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This also adds the aarch64 symbols, exporting them. Reported and tested by: fluffy Reviewed by: emaste Fixes: https://cgit.freebsd.org/src/commit/?id=3a01e1e1a50cb9a9594aac2148dc920a6b295428 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56283
debug: classified in
02-filenames_wildcards by
'.*Makefile'
MFC after: 1 day (the security issues warrant a quick backport). MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: des
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Add missing header file (openssl/ml_kem.h) of OpenSSL 3.5 Reviewed by: fluffy, ngie Approved by: ngie (maintainer) Differential Revision: https://reviews.freebsd.org/D56291
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: ziaee, adrian Differential Revision: https://reviews.freebsd.org/D55182
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Oracle's previous support is no longer available to the project. Repeated attempts to find a sponsor within Oracle's cloud business have not been successful. The last published official images are from 15.0-RELEASE. https://marketplace.oracle.com/app/freebsd-release Relnotes: yes Sponsored by: SkunkWerks, GmbH Differential Revision: https://reviews.freebsd.org/D56360 MFC after: 3 days
debug: classified in
02-filenames_wildcards by '['.*Makefile',
'release/.*']'
The FreeBSD-clang package contains a 32-bit shared object at /usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so This is expected, since clang uses this object when compiling for i386 targets with asan enabled. What is not expected is that the FreeBSD-clang package currently depends on 32-bit libc packages due to pkg's shared library analysis, making it impossible to install pkgbase on x86_64 without any lib32 packages. This commit leverages a new pkg feature implemented in [1], but could be landed before a pkg version including that feature is released without any ill effects. Unknown keys in package manifests are ignored. [1]: https://github.com/freebsd/pkg/pull/2594 Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54792
debug: classified in
02-filenames_wildcards by
'release/.*'
Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54793
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Signed-off-by: Martin Filla <freebsd@sysctl.cz> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2086
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This keyboard was implemented but wasn't actually installed to the system. Fixes: https://cgit.freebsd.org/src/commit/?id=9357c694e8dca627c25b15529e8435b2ab3dd48b MFC after: 1 day Relnotes: yes
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This keyboard was implemented but wasn't actually installed to the system. Fixes: https://cgit.freebsd.org/src/commit/?id=a049678039e40bdf523230852f78887a12435def Discussed with: imp MFC after: 1 day Relnotes: yes
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Rather than manually including the include directory for LinuxKPI use the provided macro. Before there was no -I for the dummy directory and as files synced from Linux under a permissive license may include them the build would fail. overflow.h will include linux/const.h which only exists as a dummy header at this point on FreeBSD. Sponsored by: The FreeBSD Foundation Fixes: https://cgit.freebsd.org/src/commit/?id=35b53f8c989f6 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D56424
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This is required for LLVM 22's ld.lld to avoid a build error: ld.lld: error: section '.text' address (0x38000) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.rodata' address (0x3b308) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.data' address (0x3b610) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.bss' address (0x3f618) is smaller than image base (0x10000000); specify --image-base Use 0x38000 for the image base, which is the address of the lowest (and only) LOAD segment in the file. Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56459
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Add the new file for nan in the mld subdriver. Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Add optional support for the new cfr (channel frequency response) file/option. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Handle the file changes and the extra wifi7/ subdirectory. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Sort the options in each of the sections alphabetically. Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'share/mk/'
161f8edc651c7 ("bsd.mkopt.mk: Prepare a list of all build options")
restructured things and now we should simply strip the leading double
underbar. This fixes the oddity noticed in
4ed20e0236dd0 ("kshim/usb: Add build option."), where WITH_CASPER made
a surprise appearance.
This is a part of D56558, but not the meat of the change.
Reviewed by: emaste, imp
debug: classified in
03-filenames_plain1 by
'tools/build/'
pkgconf: import into the base system This introduces the following option: * MK_PKGCONF: determines if pkgconf and bomtool should be built The objective is to allow the creation of SBOM information while building FreeBSD's src tree. The build system cannot rely on the presence of bomtool (and eventually also spdxtool) in the build environment, except for having it as part of the src tree directly. The framework implementing the generation of SBOM files is under review in D56474. This will also help simplifying the build, with the introduction of another framework relying on the availability of pkgconf. Sponsored by: Alpha-Omega, The FreeBSD Foundation Reviewed by: bapt, philip Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D56404
debug: Commit manually moved from "unknown" to "build".
packages: Register pkgconf This should fix the creation of the new packages introduced by the import of pkgconf into the base system. Fixes: https://cgit.freebsd.org/src/commit/?id=b8352da33f34 ("pkgconf: import into the base system") PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294724 Reviewed by: ivy, ngie Approved by: ngie Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D56589
debug: classified in
02-filenames_wildcards by
'release/.*'
libpkgconf: Fix paths
${LOCALBASE:U} evaluates to exactly the same thing as ${LOCALBASE}.
Presumably what was meant was ${LOCALBASE:U/usr/local}.
Fixes: https://cgit.freebsd.org/src/commit/?id=b8352da33f34 ("pkgconf: import into the base system")
Reviewed by: khorben
Differential Revision: https://reviews.freebsd.org/D56642
debug: classified in
05-summary-prefix by 'lib.*:'
depends-cleanup: Fix typos in comment Fixes: https://cgit.freebsd.org/src/commit/?id=4dd97955e68d ("libpkgconf: Fix paths")
debug: classified in 01-style
by '[tT]ypo'
debug: moved to build because
'Need to be grouped with
4dd97955e68df02b26d59e4e7c9a8167947a5164'
Fixes: https://cgit.freebsd.org/src/commit/?id=0ddaa4c86d68 ("arm64: Add arm64 SVE tests") Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*Makefile'
`PIC_FLAG` should be used strictly for `-fPIC`, `-fpic`, etc, options. `SHARED_CFLAGS` is the more appropriate place to this flag to be set. Requested by: jrtc27 MFC after: 3 days MFC with: 3797fe720a
debug: classified in
02-filenames_wildcards by
'.*Makefile'
MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=d03c82c28da86 ("release: add optional OCI images")
debug: classified in
03-filenames_plain1 by
'tools/build/'
- Update sources to match current installed files list. This involved adding and removing some example files. - Sort the list alphabetically so it'll be easier to spot future updates. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'tools/build/'
- Remove the generated files (`file1`). - Remove the top-level example `Kyuafile`. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'tools/build/'
Nobody will test it as long as it's not tied into the top-level target, and we don't really have a good reason not to cut over to it since it does produce identical results. Switch over but do not remove the old sh implementation yet, just in case. Note that this replacement is driven by a significant speedup from how the new version is designed: tha lua version actually tries to parallelize its data collection efforts to speed up generation. Reviewed by: imp (previous version), emaste Differential Revision: https://reviews.freebsd.org/D56558
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Instead of driving the world package build from Makefile.inc1, use a subdir build where each package has a subdirectory under packages/ using the new <bsd.pkg.mk>. Convert some metadata that was previously in the UCL files (e.g. sets and dependencies) to Makefile variables. Build the packages under objdir (not repodir), and use the new stagepackages target to copy them to repodir when creating the repository. Determine an explicit list of packages to build in packages/Makefile based on enabled src.conf options, and add logic to abort the build if we attempt to build an empty package. This inverts the previous logic in Makefile.inc1 which would simply skip empty packages. There are a few advantages to doing it this way: * The package build works more like the rest of the build system, so it's more accessible to developers. * We can customise the packages we build based on src.conf options, e.g. skipping a package entirely, or adjusting its dependencies based on what it actually requires. * We have a specific list of packages that we want to build, and an unexpectedly missing package results in a build error, instead of silently producing a broken repository. * It's possible to build (and in the future, install) an individual package without having to rebuild the entire repository. This doesn't apply to the dtb, kernel-* or src-* packages; those have their own build systems in Makefile.inc1 and will be converted later. MFC after: 4 weeks (stable/15 only) Reviewed by: jlduran, sjg, brooks Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56087
debug: classified in
05-summary-prefix by
'packages:'
During a discussion about using -fms-extensions jhb pointed out that we have them enabled in the kernel for gcc by default (even multiple times in one part). I had missed all that and clang still failed on my use case (needing another option). The original cause for enabling them for our tree back then was that we needed to support C11 anonymous struct/unions. Our in-tree gcc 4.2.1, despite later patches, needed the -fms-extensions to support these even though this was not the expected use case for that option ( cc4a90c445aa0 enabled it globally for the kernel). clang at that time (or at least when it became default for 10.0) already was fine (with C11). Any later gcc (4.6.0 onwards) did not need that option anymore, even when compiled for -std=iso9899:1990 (which does not support anonymous structs/unions) unless one would add -pedantic (see gcc git 4bdd0a60b27a). This is also the reason why userland cddl sources now compile with the option removed despite CSTD=c99. The only driver which needed the option recently was ccp, but that was fixed in 8d3f41dbcb2a by jhb. So cleanup all uses cases of -fms-extensions for the moment as they are no longer needed given all compilers currently supported seem to be fine without them and gcc-4.2.1 was removed from the tree in stable/13 in 2020 (a9854bc3812b). Reported by: jhb (all this but possibly the world CDDL parts) Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste (earlier), imp, jhb, glebius Differential Revision: https://reviews.freebsd.org/D55072
debug: Commit manually moved from "unknown" to "build".
MFC with: efb77950fdd Fixes: https://cgit.freebsd.org/src/commit/?id=efb77950fdd ("dtrace: Add definitiosn for the cam dtrace provider") Differential Revision: https://reviews.freebsd.org/D56588
debug: classified in
03-filenames_plain1 by
'tools/build/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This reverts base 4822a2cf990048c6eed7822fd34a1aeeb7c39cdf. The change in base aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0 already fixed the original issue, which is that newer versions of lld complain "section '.text' address (0x38000) is smaller than image base (0x10000000); specify --image-base". Reported by: ivy PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
02-filenames_wildcards by
'.*Makefile'
packages: Register pkgconf This should fix the creation of the new packages introduced by the import of pkgconf into the base system. Fixes: https://cgit.freebsd.org/src/commit/?id=b8352da33f34 ("pkgconf: import into the base system") Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D56589
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "packages: Register pkgconf" This reverts commit 970cef9f652ec4d902b20cba6d99dce48458d7b6. I made a mistake when rebasing 1342eb5a832fa10e689a29faab3acb6054e4778c; I did not mean to re-introduce this one.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Building pkgconf with GCC 14 currently fails with: no option '-Wincompatible-pointer-types-discards-qualifiers' This relaxes warnings for libpkgconf, pkgconf(1), and bomtool(1) until the improvements are published upstream (see PR #444). Co-authored-by: ngie Approved by: ngie Sponsored by: The FreeBSD Foundation Event: Wiesbaden Hackathon 202604 Differential Revision: https://reviews.freebsd.org/D56591
debug: classified in
02-filenames_wildcards by
'.*Makefile'
The apm(8) rc script only works on i386, but it's installed on all platforms. Only install it on i386, which avoids creating a useless FreeBSD-apm package on other platforms. While here, build the acpi package on i386. MFC after: 2 weeks Reviewed by: imp Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56629
debug: classified in
02-filenames_wildcards by
'.*Makefile'
bhyve(8) on amd64 needs iasl(8) to run, otherwise it fails with:
/bin/sh: /usr/sbin/iasl: not found
bhyve: BASL failed @ build_dsdt:484
Failed to execute basl_compile(ctx, basl_fwrite_dsdt): Unknown
error: 32512
bhyve: BASL failed @ acpi_build:899
Failed to execute build_dsdt(ctx): Unknown error: 32512
Assertion failed: (error == 0), function bhyve_init_platform_late, file
/home/pkgbuild/worktrees/main/usr.sbin/bhyve/amd64/bhyverun_machdep.c,
line 394.
Register the "acpi" package which provides iasl(8) as a dependency for
bhyve on amd64.
Reviewed by: markj (previous revision), ivy
Differential Revision: https://reviews.freebsd.org/D56498
Sponsored by: The FreeBSD Foundation
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This makes it easier to downgrade kernel when it stops providing some syscall required by libc. In this case, it is enough to downgrade libc as well, our crt1 delegates all non-trivial work to libc::__libc_start1(). With static init, the /sbin/init should be downgraded as well, which might be not easy. This does not mean that we support forward compatibility. Reviewed by: imp, jilles, zlei Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56536
debug: classified in
02-filenames_wildcards by
'.*Makefile'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294775 Fixes: https://cgit.freebsd.org/src/commit/?id=bb75b0d581f7 ("packages: Convert world to a subdir build") MFC after: 2 weeks Reported by: Alastair Hogge <agh@riseup.net> Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56635
debug: classified in
02-filenames_wildcards by
'.*Makefile'
The sh-based makeman silently ignored errors from `make showconfig`. Ignore errors also from makeman.lua (but emit a warning). We may want to revisit this in the future, but want makeman.lua to behave identically for now. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294822 Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56663
debug: classified in
03-filenames_plain1 by
'tools/build/'
Invoke ln with -n and -f. In normal use it doesn't matter, but during development this might be run in a partially populated leftover tree. Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52883
debug: classified in
02-filenames_wildcards by
'release/.*'
This makes it less likely we will silently generate broken artifacts. Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56671
debug: classified in
02-filenames_wildcards by
'release/.*'
We support both -h and -n, but GNU coreutils only supports -n, so use that instead. This fixes the package build on Linux. MFC after: 2 weeks Reviewed by: (wosch, imp) (previous version), emaste Better fix than the original patch suggested by: jrtc27 Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56656
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Previously we had a mix of ${PKG_CMD} and bare 'pkg', which is
wrong, and breaks the build when 'pkg' isn't in the tools path,
e.g. when cross-building.
MFC after: 2 weeks
Reviewed by: wosch, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56655
debug: classified in
02-filenames_wildcards by
'.*Makefile'
In some versions of LLVM (at least 21), the <*intrin.h> headers contain unguarded duplicate typedefs; this isn't permitted prior to C11, and libzpool is built as C99. FreeBSD's LLVM backported LLVM PR #153820 to fix this, but other versions of LLVM (e.g., upstream, or on Linux) don't have the patch, so this breaks the build. Add -Wno-error=typedef-redefinition to downgrade this from an error to a warning. MFC after: 2 weeks Reviewed by: dim, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56653
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Various src.conf options can cause us to build something that ends up in the clang package, but MK_TOOLCHAIN is not one of them; copy the proper conditional from lib/Makefile to decide if we need to build the package. This fixes the build when LLVM/clang is entirely disabled. Fixes: https://cgit.freebsd.org/src/commit/?id=bb75b0d581f7 ("packages: Convert world to a subdir build") MFC after: 2 weeks Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56657
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Import groups(7) from NetBSD, with tweaks for our system. The group list is sorted by GID. All the group names from /usr/src/etc/group are described, except "uucp". The FILES section was added on top of the original manual page. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264966 Relnotes: yes MFC after: 3 days Obtained from: NetBSD Reviewed by: des, ziaee Differential Revision: https://reviews.freebsd.org/D54114
debug: classified in
02-filenames_wildcards by
'.*Makefile'
ACPI is only supported on amd64, arm64 and i386. Don't install the power_profile rc script or devd configuration on other platforms. This avoids creating a useless FreeBSD-acpi package on those platforms. MFC after: 2 weeks Reviewed by: imp Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56650
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Set PACKAGE=lldb in lldb.pre.mk rather than in individual Makefiles; change lib/clang/Makefile.inc from PACKAGE=clang to PACKAGE?=clang to avoid overwriting it. This is safe to MFC to stable/15 since the moved library will be picked up automatically by pkg. MFC after: 2 weeks Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56674
debug: Commit manually moved from "unknown" to "build".
Use ${PKG_CMD} rather than bare 'pkg' to fix the build when pkg is
not in the tools path. Provide a default in case it's not set for
some reason (e.g., running the script by hand).
Since set -- $(...) does not trigger an exit from set -e if the
command fails, this failure was silent and resulted in sets not
being built correctly if we failed to run pkg. Use a temporary
variable, which does trigger set -e, to fail correctly.
MFC after: 2 weeks
Reviewed by: sjg
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56676
debug: classified in
02-filenames_wildcards by
'release/.*'
Makefile.inc1 copies locales to ${INSTALLTMP} to avoid issues when
running make installworld on a live system. However, this can break
on non-FreeBSD systems, e.g. on openSUSE where /usr/share/locales
has mode 0555, which means after we copy it, we can't delete it,
so the build fails.
Since this functionality is only useful when installing over a
live system, disable it when the build host is not FreeBSD.
MFC after: 2 weeks
Reviewed by: kevans, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56677
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Stop generating test scripts at build time. The dc test script is broken and simply fixing the code that generates it won't help as there is no reliable way to ensure it gets regenerated if it already exists in the object tree. MFC after: 1 week Reviewed by: se Differential Revision: https://reviews.freebsd.org/D56511
debug: classified in
03-filenames_plain1 by
'tools/build/'
llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package Some of the LLVM binary utilities were included in the Clang package (because they did not set an explicit PACKAGE). Add a new Makefile under clang/toolchain to create the symlinks and man links for ar, c++filt, nm, and so on (without the llvm-* prefix) when LLVM_BINUTILS is enabled (as it is by default). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293610 Reviewed by: bapt, ivy, brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55692
debug: classified in
02-filenames_wildcards by
'.*Makefile'
toolchain: Correct LLVM_BINUTILS pkg pkg dependency The LLVM binutils are in the clang package. Reported by: jlduran Fixes: https://cgit.freebsd.org/src/commit/?id=c4f08d46c7f7 ("llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package")
debug: classified in
02-filenames_wildcards by
'.*Makefile'
libzpool had a number of undefined symbols related to xxhash after xxhash.c was removed from the build. Fixes: https://cgit.freebsd.org/src/commit/?id=8a62a2a5659d ("zfs: merge openzfs/zfs@https://cgit.freebsd.org/src/commit/?id=f8e5af53e") Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D56770
debug: classified in
02-filenames_wildcards by
'.*Makefile'
bsd.endian.mk: Optimize the handling of big/little endian determination. Add variables to contain lists of MACHINE_ARCH values to use to determine little or big endian. Only error out about not being able to determine endianess if TARGET_ENDIANNESS is empty and not cross-compiling. Reviewed by: sjg Obtained from: Hewlett Packard Enterprise Development LP Differential Revision: https://reviews.freebsd.org/D44629
debug: classified in
03-filenames_plain1 by
'share/mk/'
bsd.endian.mk: Avoid use of M_ListToSkip While the src build works fine with M_ListToSkip, it can break the ports build. For now, it is safer just to do the actual variable modifiers in place. Reported by: se Fixes: https://cgit.freebsd.org/src/commit/?id=01674e15dedb ("bsd.endian.mk: Optimize the handling...")
debug: classified in
03-filenames_plain1 by
'share/mk/'
At least one of these tests changes the system clock, which potentially interferes with concurrently running tests and causes them to fail. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Commit c4f08d46c7f7 moved the symlinks for the LLVM binutils from LLVM itself to the toolchain (usr.bin/clang/toolchain), but did not remove the links for /usr/bin/gcov and /usr/bin/objdump from the llvm version, meaning we installed them twice, once in the clang package and once in the toolchain package. Remove the links from the llvm version and move the MLINKs to toolchain, which is where the other MLINKs dwell. While here, fix toolchain to use the correct build option for llvm-cov, MK_LLVM_COV. Fixes: https://cgit.freebsd.org/src/commit/?id=c4f08d46c7f7 ("llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package") Reported by: jrm Reviewed by: jrm, dim, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56788
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Commit d1c176fedfc9 made create-sets.sh exit when it encounters an error, instead of creating an empty repository. However, this turns out to cause some issues: 1. A package not having any sets is considered an error, but during the release build, we stuff a 'pkg' package into the repository which doesn't have any sets, which causes a failure. Avoid this by simply ignoring the pkg package. 2. No error was printed in this case, which made the problem hard to diagnose. Add an explicit error message. 3. A similar problem occurred running on a repository which already contained sets, which is not usually done during the build, but is not necessarly an inappropriate thing to do. Fix this one by ignoring set packages when looking for sets. While here, fix another issue that might cause packages to be wrongly skipped if the path to the repository contains a '-' character, since we didn't strip the path before testing the package name. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294966 Fixes: https://cgit.freebsd.org/src/commit/?id=d1c176fedfc9 ("packages: Make create-sets.sh more robust") MFC after: 2 weeks Reported by: Alastair Hogge <agh@riseup.net> Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56792
debug: classified in
02-filenames_wildcards by
'release/.*'
Reviewed by: bz MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56693
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Make it clear which of two possible cases applies. Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D56837
debug: classified in
02-filenames_wildcards by
'.*Makefile'
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56831
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: kp MFC after: 1 week Obtained from: 60d8dbbef075 netinet: add a probe point for IP, IP6, ICMP, ICMP6, UDP and TCP stats counters Differential Revision: https://reviews.freebsd.org/D53709
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Enabling ZSTD_TRACE leaves behind undefined weak symbols, which causes a problem for gcc builds. The bfd linker emits an obscure error about overlapping FDEs. We don't need ZSTD_TRACE for libsa, so just disable it. Also disable BMI2 instruction optimizations. The addition of the optional BMI2 code paths caused the boot loader binaries to grow larger (28 KiB for clang, 32 KiB for gcc). The boot loader binaries are size constrained, and this pushed the gcc-generated lua_loader.bin over the 500000 byte limit, and the clang one to within 4k of the limit. Fixes: https://cgit.freebsd.org/src/commit/?id=8a62a2a5659d ("zfs: merge openzfs/zfs@https://cgit.freebsd.org/src/commit/?id=f8e5af53e") Reviewed by: delphij, imp, mm Differential Revision: https://reviews.freebsd.org/D56866
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Reviewed by: kib Discussed with: markj, royger MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54070
debug: classified in
02-filenames_wildcards by
'.*Makefile'
If the user runs "make update-packages" without bumping BRANCH, then it isn't possible to copy packages from the old location to the new one (because the two locations are the same). So just skip that step. Sponsored by: ConnectWise PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295085 MFC after: 1 week Reviewed by: ivy, emaste Differential Revision: https://reviews.freebsd.org/D56872
debug: classified in
02-filenames_wildcards by
'.*Makefile'
MFC after: 1 week Discussed with: christos, markj, ziaee Differential Revision: https://reviews.freebsd.org/D51396
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Cirrus-CI is shutting down at the end of the month, but we can still finish with an up-to-date working build with an LLVM version matching the in-tree toolchain. Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'.cirrus.yml'
WITH_CTF enables building userland components with CTF, and not the ctf* tools as one might expect. The tools are actually included with the DTRACE knob. Add a comment where the dependency is handled, as this has caused confusion. Reported by: ivy Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56977
debug: classified in
03-filenames_plain1 by
'share/mk/'
Cloud releases: Switch to firstboot_pkg_upgrade Cloud images are deployed with base system packages. Introduce a firstboot package auto updater to patch the base system on first boot. MFC after: 1 hour MFC to: stable/15 Reviewed by: cperciva Sponsored by: Google Cloud Differential Revision: https://reviews.freebsd.org/D56890
debug: classified in
02-filenames_wildcards by
'release/.*'
Cloud releases: More firstboot_pkg_upgrade Update a couple more cloudware images which I forgot about earlier. Reviewed by: ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=464a351267dc ("Cloud releases: Switch to firstboot_pkg_upgrade") Differential Revision: https://reviews.freebsd.org/D57006
debug: classified in
02-filenames_wildcards by
'release/.*'
The EC2 "base" flavour installs the devel/py-awscli package at boot time by default; we don't do this in the "small" flavour, so the default behaviour was to update the FreeBSD-ports repository and then do nothing with it. Turn off firstboot_pkgs by default; if someone is using the "small" flavour of AMIs and wants to install packages at instance launch time, they simply need to add 'firstboot_pkgs_enable="YES"' to /etc/rc.conf (which they must already be editing via user-data, in order to provide the list of packages they want installed). Sponsored by: Amazon MFC after: 3 days MFC to: stable/15 Relnotes: EC2 "small" images now have firstboot_pkgs_enable="NO".
debug: classified in
02-filenames_wildcards by
'release/.*'
Technically, virtio_p9fs is an emulated device that masquerades as a p9fs mount, but it does not make sense to have two separate manual pages. Reviewed by: bnovkov, dfr MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57013
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Otherwise failures can occur when running tests in parallel since some tests reuse jail names. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This allows `make universe` or `make tinderbox` to build from a read-only src tree. Reviewed by: ziaee, imp, delphij Approved by: lwhsu (mentor), emaste (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55566
debug: classified in
02-filenames_wildcards by
'.*Makefile'
When doing a large `make universe` build with multiple KERNCONFS,
it should not be an error when a particular target has a missing
KERNCONF.
In this example,
```
$ make universe TARGETS='arm64 riscv' KERNCONFS='QEMU VIRT'
```
Currently, arm64 does not have a QEMU conf, and riscv
does not have a VIRT conf. However, this command should still
succeed instead of failing with the following message:
```
make[2]: /usr/src/Makefile:767: Target architecture for riscv/conf/VIRT unknown. config(8) likely too old.
in .for loop from /usr/src/Makefile:761 with kernel = VIRT
in make[2] in directory "/usr/src"
make[2]: stopped making "universe_kernels" in /usr/src
```
Since the opposite is true, we should build whatever confs are available
from the requested list of KERNCONFS, while making sure to still
emit warnings along the way.
Reviewed by: imp
Approved by: lwhsu (mentor), emaste (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D55571
debug: classified in
02-filenames_wildcards by
'.*Makefile'
This has been stable in my testing, and enabling parallelism speeds up test runs considerably. In particular, with -v parallelism=16 in a 16-vcpu bhyve VM my test runs go from ~50m to ~40m; the exact numbers depend on the kernel config in use. Reviewed by: pouria MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57094
debug: classified in
02-filenames_wildcards by
'.*Makefile'
I just tried building with system clang on one of my Linux systems which happens to be version 19, and these warning suppressions are needed for that version too: same errors as in the original commit. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56874
debug: classified in
03-filenames_plain1 by
'share/mk/'
Without this change I get various undefined symbol errors when trying to link llvm-nm and llvm-objcopy during the cross-tools stage. Test Plan: builds now Reviewed by: dim, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56873
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Use execenv=jail to enable this. MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*Makefile'
libarchive: Clean up the build configuration * Move settings duplicated in libarchive, bsdcat, bsdcpio, bsdtar, and bsdunzip into libarchive's Makefile.inc. * Drop some CFLAGS that merely duplicated some of the contents of our platform configuration header. MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D57307
debug: classified in
02-filenames_wildcards by
'.*Makefile'
libarchive: Fix typo in sed command MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=eb3a0a74a069 ("libarchive: Clean up the build configuration") Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
debug: classified in 01-style
by '[tT]ypo'
debug: moved to build because
'Need to be grouped with
eb3a0a74a069d0f294e1596504676459282bb308'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295704 MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*Makefile'
If pkg is installed, for each old library found to still be present, check if any installed packages either provide or require the library, and inform the user. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53977
debug: classified in
02-filenames_wildcards by
'.*Makefile'
A bug was discovered in the riscv64 assembly implementation of this function. Fall back to the generic implementation until a fix can be developed. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295823 Reported by: siva MFC after: 1 week
debug: classified in
02-filenames_wildcards by
'.*Makefile'
We have to switch back to the previous rule once the temporary build fix has been replaced with a permanent fix. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295823 See also: 4996ebdb720042239a197ebec2d265cdfdf1bbf3 Reported by: siva MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'tools/build/'
Update the GCE image creation process to automatically apply the 'public-image=true' label when publishing new images. This aligns with standard labeling expectations for images hosted in public projects. MFC after: 3 days
debug: classified in
02-filenames_wildcards by
'.*Makefile'
1e649491b8567151270095fda3bce8faea394952 enabled KERN_TLS in riscv/conf/GENERIC, but didn't enable OPENSSL_KTLS. This passes all testcases in the sys/kern/ssl_sendfile suite and fixes CI failures seen here: https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ssl_sendfile/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293810 Fixes: https://cgit.freebsd.org/src/commit/?id=1e649491b8567151270095fda3bce8faea394952 MFC after: 3 days Reviewed by: gallatin, ngie Differential Revision: https://reviews.freebsd.org/D57316
debug: classified in
03-filenames_plain1 by
'share/mk/'
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57366
debug: classified in
02-filenames_wildcards by
'.*Makefile'
In some cases having a src tree in a VM image is convenient for development or debugging. Add a WITH_SRC variable, which, when set, will cause the vm-release target to include FreeBSD-set-src in the list of packages installed in an image. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Sponsored by: Intel Corporation Reviewed by: cperciva MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57143
debug: classified in
02-filenames_wildcards by
'release/.*'
Reviewed by: emaste
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D57601
debug: classified in
02-filenames_wildcards by
'.*Makefile'
For native files we can do more minimal fixes to avoid this large of a hammer, but for third party files it may not be worth the effort to try and patch them. NetBSD has the original _FORTIFY_SOURCE implementation that ours is based on, for instance, but tests sourced from there can't do an __ssp_real(foo) without being certain that `foo` actually has a fortified definition. This change does always define _FORTIFY_SOURCE as a result, so gate it on CFLAGS not already containing _FORTIFY_SOURCE definitions. This re-applies c46a0b59071614, but without re-defining _FORTIFY_SOURCE needlessly. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881 Reviewed by: markj, sjg (both previous version) Differential Revision: https://reviews.freebsd.org/D57356
debug: classified in
03-filenames_plain1 by
'share/mk/'
Update to latest dirdeps related makefiles.
dirdeps.mk tweaks useful for universe among other corner cases.
also additional filtering for bogus paths ending in /
gendirdeps.mk allow more debugging
also additional filtering for bogus paths ending in /
install-new.mk fix bug when isPOSIX_SHELL is true
meta2deps.?? handle file names with spaces by ignoring them
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D57683
debug: classified in
03-filenames_plain1 by
'share/mk/'
Note: We confusingly have the instructions to build the system in the build manual, the UPDATING file, and the Makefile. These will get out of sync and will be harmful when they do. Fixes: https://cgit.freebsd.org/src/commit/?id=ddf6fad0295a ("etcupdate: Make nobuild the default") Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D57644
debug: classified in
02-filenames_wildcards by
'.*Makefile'
remove extra } from GENDIRDEPS_ENV more debug output for gendirdeps.mk Reviewed by: stevek Differential Revision: https://reviews.freebsd.org/D57727
debug: classified in
03-filenames_plain1 by
'share/mk/'
vgrind has been disconnected from the build for a while. Remove from the build, and gc vgrid support in the few remaining places. Reviewed by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57648
debug: Commit manually moved from "unknown" to "build".
This generates a table of all the socket options with fixed types so that programs like qemu can use those tables rather than having to free code thigs. Sponsored by: Netflix
debug: Commit manually moved from "unknown" to "build".
Reviewed by: ziaee Discussed with: Alex S <iwtcex@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57659
debug: classified in
02-filenames_wildcards by
'.*Makefile'
We will add variants of memcpy and memmove to support CHERI so bootstrap the manpages from section 3. Mark bcopy as deprecated. Reviewed by: imp, kib, emaste Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57661
debug: classified in
02-filenames_wildcards by
'.*Makefile'
memory_model(7): create and document pointer provenance Add a skeleton manpage intended to describe the FreeBSD memory model. To start out, add documentation of pointer provenance and a cross link to atomic(9). Provide some advice on preserving provenance in CHERI and reference more detailed discussions elsewere. Effort: CHERI upstreaming Reviewed by: kib, adrian, markj, emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D57812
debug: classified in
02-filenames_wildcards by
'.*Makefile'
memory_model.7: Correct typo perserving -> preserving Reviewed by: jrm Event: Halifax Hackathon 202606 Fixes: https://cgit.freebsd.org/src/commit/?id=1366a87c9cb5 ("memory_model(7): create and document pointer provenance")
debug: classified in 01-style
by '[tT]ypo'
debug: moved to build because
'Need to be grouped with
1366a87c9cb5ed47910636d17972f1bcad27fb9f'
These are zfs-only flags, don't add them when we're building ZSTD. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57860
debug: classified in
02-filenames_wildcards by
'.*Makefile'
We have a ltitle wiggle room, so go ahead and bump the pxeldr size. It should be a little larger than the limit we have for the /boot/loader since we embed that in this loader... Sponsored by: Netflix
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Sicne we have gcc15 in Jenkins, and since people are actually using it, add cross building tests to universe.sh to avoid build breakage when hacking on loader.efi (and others). UEFI makes it too easy to mix pointers and integers since it deals in an odd mix of EFI_PHYSICAL_ADDRESS and pointers... Sponsored by: Netflix
debug: Commit manually moved from "unknown" to "build".
The upstream CLDR directory structure requires the full version string. Remove the ':R' modifier to fix the fetch paths. Previously this worked because major releases were published in a directory without the ".0" suffix, while the filenames included it. Starting with CLDR 47, the upstream layout changed to use the full version string exclusively, causing the fetch URLs to break for point releases. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57625
debug: classified in
02-filenames_wildcards by
'.*Makefile'
Notable changes: - Group separator for number formatting was updated to ' in fr-CH consistent with other Swiss locales. - Some fixes to date formats including: Hv available formats were updated to match behavior in CLDR 47 due to web compatibility issues related to current JS capabilities. - Emoji annotations fixes including collisions between emoji short names. - Updated AM/PM for ko & ps to be consistent with how the wide forms are localized. Reviewed by: bapt MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57626
debug: classified in
02-filenames_wildcards by
'.*Makefile'
The header files for dialog, figpar, dpv were never listed. Fixes: https://cgit.freebsd.org/src/commit/?id=bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")
debug: classified in
03-filenames_plain1 by
'tools/build/'
FreeBSD has not yet established an AI submission policy. For now remove text that implies we have.
debug: classified in
03-filenames_plain1 by
'CONTRIBUTING.md'
Approved by: makc (mentor)
debug: classified in
03-filenames_plain1 by
'share/misc/committers-ports.dot'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'ObsoleteFiles.inc'
Make it possible to create a review without publishing it. This should be useful when one wants to restrict the visibility of a review, as that cannot be done via the command line. Note that a draft review is still publicly visible if one can guess the URL, but creating one does not result in email notifications to subscribers etc., nor does a draft appear in the creating user's activity log. Once a draft is ready, one can publish it via the web UI. Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D56664
debug: classified in
03-filenames_plain1 by
'tools/tools/git/'
Fixes: https://cgit.freebsd.org/src/commit/?id=bb75b0d581f7 ("packages: Convert world to a subdir build") MFC after: 2 weeks Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D56839
debug: classified in
03-filenames_plain1 by
'README.md'
Fixes: https://cgit.freebsd.org/src/commit/?id=448ec129bcef ("git-arc: Add a create-draft mode")
debug: classified in
03-filenames_plain1 by
'tools/tools/git/'
MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=809504f331fd ("man: Kill off MANSUBDIRs") Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57029
debug: Commit manually moved from "unknown" to "internal".
debug: classified in
03-filenames_plain1 by
'share/misc/bsd-family-tree'
These were dropped in 2021 but were never listed in ObsoleteFiles.inc, so systems that have been upgraded from source since before that date (or from 13.x) may still have them. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295668 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=0a36787e4c1f ("locales: separate unicode from other locales") Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D57331
debug: classified in
03-filenames_plain1 by
'ObsoleteFiles.inc'
debug: classified in
03-filenames_plain1 by '['.github/',
'MAINTAINERS']'
I've been the quasi-defacto component maintainer for OpenSSL since 14.0-RELEASE. Make it official via CODEOWNERS/MAINTAINERS. The goal is to help guide those interested in making changes in this space to solicit my input with the new vendor import process and coordinate fixes with upstream until things are at a point where most of this is automated a system of automated checks and balances to confirm that the updates being made to the component help maintain a security supply chain for this given component. Thank you benl and jkim for your past efforts in this component area. Hopefully I can do my part to help improve this critical space further as you both did in your respective tenures. MFC after: 3 days
debug: classified in
03-filenames_plain1 by '['.github/',
'MAINTAINERS']'
debug: classified in
03-filenames_plain1 by
'share/misc/bsd-family-tree'
debug: classified in
03-filenames_plain1 by
'.git-blame-ignore-revs'
This is a utility that effectively wraps git-cherry-pick for performing MFCs, though it has some other usages. In addition to actually cherry-pick the specified commits, it looks at the upstream branch for fixup commits, denoted by a `Fixes:` tag which references the fixed commit. Aside from actually cherry-picking commits, git-mfc can also be used to list pending MFCs (commits in the upstream branch which are eligible for MFC based on the `MFC after` tag), and "dangling" MFCs, where a commit was MFCed to the currently checked out stable branch, and the upstream branch has one or more fixup commits which have not been merged. The utility requires python and the gitpython module. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D57845
debug: classified in
03-filenames_plain1 by
'tools/tools/git/'
The argv test checks ps(1) output immediately after backgrounding yes(1), but the forked child briefly shows the parent shell's argv before exec(2) replaces it. This caused intermittent failures where ps(1) captured the atf shell wrapper command line instead of "yes y". Approved by: des Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56231
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
While here fix the match pattern in the existing test.
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
* The f_flag test may fail if a component of the full path to the temporary directory is a symbolic link. * The n_flag test had an empty head; give it a description. * Use consistent quoting. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56293
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
The unit tests are patterned after those for memrchr(). This catches the issue found in 293915. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293915 Reviewed by: strajabot Reported by: safonov.paul@gmail.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56037
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
* Use ourselves as test file instead of /COPYRIGHT, which may or may not be present in the test environment. * atf-check understands \n in strings, use it. * Some file systems don't like creating small holes, so create large ones instead. This means we need two variables: ps (page size) is the minimum size of a data region and the alignment for a hole, while hs (hole size) is the minimum size of the holes we create. This makes no difference on FreeBSD but makes it easier to port the test to other platforms. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56304
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
Just copy over a timer and a write-filter, be sure that we can observe both in the child. Maybe the timer should check for a minimum time passed, but I don't know that we'd be likely to get that wrong. This also adds a negative test with a kqueue that is *not* set for CPONFORK being added to the first one, made readable, and confirming that we don't see a knote for it in the child. Some other improvements to the test noted in the review are planned in the short term, but they're not particularly worth blocking adding this as a basic sanity check. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56223
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Add tests for each combinations of geneve modes, address families and multicast. Differential Revision: https://reviews.freebsd.org/D55183
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
This includes a regression test for CVE-2024-42416 MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46613
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=3e5550d25c6d ("du: Add regression tests") Sponsored by: Klara, Inc.
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
Fix gcc build error. Reviewed by: asomers, kib Fixes: https://cgit.freebsd.org/src/commit/?id=7e68af7ce2c1 ("fusefs: redo vnode attribute locking") Differential Revision: https://reviews.freebsd.org/D56370
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Notably, confirm in the child that our close-on-fork fd is actually closed, and break RECV_ALL out into a table and check each bit individually to provide a better message when the test fails. While we're here, just switch to waitid() rather than trying to identify the point where we have to make the switch. This reduces maintenance slightly, as keeping our assertion static would require still adding to a _RECV_ALL mask *just* for that purpose. Reviewed by: kib, markj (both slightly earlier version) Differential Revision: https://reviews.freebsd.org/D56372
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Sponsored by: Rubicon Communications, LLC ("Netgate")
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
The test runs without any unexpected results when mac_portacl is loaded. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238781 MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
* RA hop limit validation * RA source address validation * Multi router RA validation * Two hour rule RA validation * SLAAC onlink prefix switching test Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56128
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Test handling of receiving multiple route information options in RA. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56216
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Several testcases assume BLOCKSIZE=K, so set it at the top of the script. This fixes an issue where the tests would sometimes fail when run under sudo. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56476
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
The test verifies that a socket can bind to a local address assigned by connect(2) to a different socket. It was however trying to bind to the wrong address, and the check of the result was inverted, so this went unnoticed. It also needs to set SO_REUSEADDR for this to succeed. Reported by: glebius MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
The underlying bugs which caused them to be flaky are now fixed. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258766
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Approved by: pouria Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56569
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Each test case in opcodes.sh uses ctladm to create and remove the LUN it exercises, but only sg_opcodes was listed in require.progs. On systems where ctladm is not builded the tests would fail at setup instead of being skipped cleanly. Approved by: asomers Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56568
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
_ isn't part of the allowed IQN format, but - is. None functional change. Reviewed by: asomers, ngie Approved by: asomers (mentor) MFC after: 1 week Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D56557
debug: classified in
02b-filenames_wildcards2 by
'usr.sbin/.*/tests/.*'
The new version of incrementing `jid` is a little cleaner and harder to mess up, and also fix a nwlin omission while we're here. These comments were dropped on D51502; ngie takes a co-author credit so that they're not blamed for the commit message, but I can't claim that I tweaked their suggestions. Co-authored-by: ngie
debug: classified in
02b-filenames_wildcards2 by
'usr.sbin/.*/tests/.*'
This matches pflog.sh tests and fixes flaky tests found in CI[0]. [0] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28126/testReport/junit/sys.netpfil.pf/nat/endpoint_independent_exhaust/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289628 Reviewed by: glebius Approved by: lwhsu (mentor) Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56145
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
- Don't use /dev/null as the pidfile for inetd, that doesn't work properly. Create a pidfile in the per-test scratch directory. - Use atf_check to validate results from setup commands. MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Ideally we shall have tests for all possible races. It is races between if_detach(), if_vmove_loan(), if_vmove_reclaim() and vnet_if_return(). Well that requires too many tests and it appears to be less valuable to have them all. So focus on potential in future regressions related to recent fixes [1] and [2] only. [1] ee9456ce3753 ifnet: Fix races in if_vmove_reclaim() [2] ba7f47d47dc1 ifnet: if_detach(): Fix races with vmove operations MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56606
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
A ng_eiface(4) or physical interface does not involve the cloner hence the detaching is a bit different with epair(4). Add more tests to cover that. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292993 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56609
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
The changes [1] and [2] made to CURRENT introduce races between ifnet detach and vmove operations. That requires extra effort to fix. They are not MFCed to stable branches so the latter are not affected. Temporarily skip two affected tests on CURRENT right now. [1] 0bf42a0a05b9 bpf: virtualize bpf_iflist [2] a4d766caf711 bpf: add a crutch to support if_vmove PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292993 Discussed with: kp
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Add require.user root and require.kmods if_wg to wg_key_peerdev_makeshared_head(), consistent with the other wg tests. Without if_wg.ko causes ifconfig wg create to fail with EINVAL. The test also needs root to create jails. Sponsored by: The FreeBSD Foundation
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Requested and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56654
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Added tests: * Test for creating multiple routes. * Test for merge multiple nexthops into a single nexthop group. * Test for nexthop expirations from a nexthop group. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56190
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
The ATF-python test program was attempting to list test cases that require scapy. But it attempted to import the scapy module before the test cases had been listed, resulting in an ImportError that kyua interpreted as a test program crash. Fix this behavior by handling that ImportError well enough to list test cases, but not run them. If scapy isn't present, Kyua will refuse to run the test cases. But it needs to be able to list them in order to know to skip them. Sponsored by: ConnectWise MFC after: 2 weeks Reviewed by: maxim Differential Revision: https://reviews.freebsd.org/D56765
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
For unicast tests, it is sufficient to use wait_for_carp() to verify the setup is sane. Additional sanity checks are not necessarily required but can serve purpose for redundancy. For some unclear reason routed(8) is advertising route to carp BACKUP. That makes the test flaky. Also routed(8) is marked deprecated and may be removed from base in the future. Let's just add static route entry manually for additional sanity checks. Other noticeable changes: 1. Add atf_check to configuration steps to prevent potential failure on setup. That helps diagnosing on failure. 2. Shorten the names of jails to improve readability. 3. Prefer `[ifconfig|route|sysctl] -j` over `jexec [ifconfig|route|sysctl]` to make the lines shorter. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294817 Reviewed by: glebius (previous version), pouria, markj Fixes: https://cgit.freebsd.org/src/commit/?id=93fbdef51a13 tests: carp: Update test case unicast_v4 to catch PR https://cgit.freebsd.org/src/commit/?id=284872 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56761
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294832 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56723
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
- Set require.kmods instead of relying on ifconfig to load if_lagg.ko, as this doesn't work when running within a jail. - Simplify helper functions which create tap and lagg devices. MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Gcc complained about the unused %0 asm argument. Fixes: https://cgit.freebsd.org/src/commit/?id=2c2ec6bbc9cc ("tests/sys/arch/amd64: add a program to check INT $0x80 behavior on amd64") Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56781
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MFC after: 2 weeks
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
The test assumes UTC, which is what I use on my development systems and clearly what is used on our CI runners. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56836
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
Don't waste time generating Perl test cases for algorithms that are not supported in Perl mode only to skip them when they are run. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56687
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
Test what happens when we ask for the rdev of a non-device. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56838
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
The configured timeout of 30s is a bit too low for a couple of tests which create 4+ VNET jails when running tests in parallel and with kernel sanitizers enabled. There's no reason to have custom timeouts, just use the default. MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Signed-off-by: Alex S <iwtcex@gmail.com> Reviewed-by: kib Pull-request: https://github.com/freebsd/freebsd-src/pull/2190
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
PT_TRACE_ME is only useful in combination with exec and there is no exec in this test. Signed-off-by: Alex S <iwtcex@gmail.com> MFC after: 1 week
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Add tests to make sure: * Default metric is enforced. * Lowest metric wins. * Deleting routes by specifying gateway/metric works. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57016
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Since we are sleeping for an indefinite period of time waiting for the default route to appear, the expire times may be gone past 1+ seconds, causing the Expire column to show <1800 or <600. Fixes: https://cgit.freebsd.org/src/commit/?id=f6bcc0925f0ea838da5183dc503f847e56d15cc8 Reviewed by: pouria Approved by: lwhsu (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56712
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Add basic tests on setting rules MFC after: 1 minute Sponsored by: The FreeBSD Foundation
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
BSD.tests.dist: Add the new sys/mac/do directory
Without that, 'make distributeworld' fails ('make buildworld' and 'make
installworld' do not need it).
Fixes: https://cgit.freebsd.org/src/commit/?id=cba191e291c1 ("MAC/do: Add basic tests on setting rules")
MFC after: 1 minute
Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by 'etc/'
debug: moved to tests because
'Need to be grouped with
cba191e291c17b32247e12d6f94dcde56994bfe6'
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57149
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Add ATF test cases covering fts_open() error conditions and edge cases: - invalid option bits (outside FTS_OPTIONMASK) yield EINVAL - empty argv yields EINVAL - empty path string yields FTS_NS with ENOENT - nonexistent path yields FTS_NS, not open failure - trailing slash does not crash (SVN r49851 regression) - unreadable directory yields FTS_D then FTS_DNR, never FTS_DP - multiple root paths are all visited left to right Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2217
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Add ATF test cases covering fts_children() behaviour: - before fts_read returns root entry list - empty directory returns NULL with errno 0 - non-empty directory returns all children in order - called twice returns equivalent results - FTS_NAMEONLY fills only fts_name, fts_info is FTS_NSOK - non-directory node returns NULL with errno 0 - invalid options returns NULL with EINVAL Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2218
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
This adds a test case that passes a very long URL on the command line, which would previously have resulted in a benign buffer overflow in urihandling(), detectable only by compiling tftp with ASAN enabled. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57074
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
Since the test assumes a 250 ms response time, there is no need to delay for 3 seconds. Instead, delay for the minimum possible 1 second. Also, fix some assertions in builtins/read11.0 and builtins/read12.0. If `set -e` is in effect, `foo` in `foo && bar` is considered tested and therefore a failure does not cause the shell to exit. Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D55191
debug: classified in
02b-filenames_wildcards2 by
'bin/.*/tests/.*'
debug: classified in
02b-filenames_wildcards2 by
'bin/.*/tests/.*'
The timestamp_origin test sends an ICMP Timestamp Request (ping -Mt) and parses the tso/tsr fields out of the reply. When the sysctl net.inet.icmp.tstamprepl is 0, the kernel silently drops the request, ping receives no reply, and the sed extraction yields an empty $tso. The test then fails inside atf_check test -n "$tso" with the unhelpful message Approved by: maxim Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57287
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
The ACL tests use UIDs and GIDs 41 through 49 and expect them to be unassigned. Since GID 43 is now assigned to the audio group, some tests have begun to fail. While here, also fix a benign Perl syntax issue in the test runner. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57297
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
ptrace_single_step currently returns EOPNOTSUPP on riscv. This temporarily fixes the following CI failures: https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__PT_STEP_with_signal/ https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__step_siginfo/ Reviewed by: kib Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D57288
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Tests: Remove shebang lines They are automatically added by <bsd.test.mk>. Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Tests: Fix copyrights No comma needed after a single year. Add SPDX. Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Tests: Declare required programs closer to use Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Tests: Quote the source directory In a standard test suite installation, this is not necessary, but be bullet-proof to custom ones, however improbable. Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Tests: Add support for exec paths, jail parameters, subjails And also allow configuration of the mdo(1) executable path. This commit only contains new or modified infrastructure. No functional change intended at this point. Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MAC/do: Add consistency tests Test that: 1. Concurrent changes to different parameters on the same jail are independent/atomic. 2. Inheritance works. 3. Relaxing only parent jail rules does not leak to a subjail thanks to sequential consistency. 4. Sysctl knobs and jail parameters stay consistent. Some of these tests may be extended in the future with several layers of jails (there is only a single subjail currently). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Test msdos22.sh creates 1000 files with long random names consisting of only ASCII characters. The mount is performed without -L option, therefore no use of iconv to convert between character sets. Test msdos23.sh mixes some non-ASCII characters into the file names. The file system is therefore mounted with -L C.UTF-8 to include tests of the conversions between UTF-8 and UTF-16. Test msdos24.sh adds emojis to the names to test the (not yet committed) support of UTF-16 surrogate pairs in filenames. All 3 tests succeed with a small number of files (e.g., 10), but fail most of the time when testing with 1000 files. The tests have been added to all.exclude since they are expected to fail. They shall be enabled as regression tests, when the msdosfs code has been fixed.
debug: classified in
03-filenames_plain1 by
'tools/test/'
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57323
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
The previously committed versions of these tests failed to prevent duplicate file names in the list of files to process, leading to missing files when a "mv" commando tried to operate on a file that had already been renamed. The test for filenames containing UTF-16 surrogate pairs stays disabled, since the required kernel changes have not been committed, yet.
debug: classified in
03-filenames_plain1 by
'tools/test/'
lib/libc/tests/gen: add fts_set() tests Add ATF test cases for fts_set(): fts_set: - invalid instruction returns non-zero with EINVAL - FTS_AGAIN revisits the current node - FTS_AGAIN consecutive visits node three times - FTS_FOLLOW on symlink to file yields FTS_F - FTS_FOLLOW on symlink to directory causes descent - FTS_FOLLOW on dead symlink yields FTS_SLNONE - FTS_SKIP prevents descent into directory - fts_set_clientptr/fts_get_clientptr round-trip - fts_get_stream returns parent FTS* from FTSENT* Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2242
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
fts: address post-merge feedback on fts_set_test.c Per review by des@: - Remove fts_check_debug() which has no effect in fts_set_test.c, and remove unused #include "fts_test.h" - Add errno = 0 before fts_read() so errno check is meaningful - Remove fts_lexical_compar where traversal order does not matter - Change int boolean flags to bool throughout - Use !saw_inside instead of saw_inside == false - Move fts_set_clientptr/fts_get_clientptr test inside fts_read() loop so the pointer is exercised during active traversal Fixes: https://cgit.freebsd.org/src/commit/?id=940142d6103 ("lib/libc/tests/gen: add fts_set() tests") Sponsored by: Google LLC (GSoC 2026) Reviewed by: des, asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2258
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57403
debug: classified in
02b-filenames_wildcards2 by
'usr.bin/.*/tests/.*'
Cause a write error using a fifo and wait, rather than needing a sleep to wait for something to terminate. This is faster and avoids a potential test failure on a heavily loaded system. Using /dev/full would be simpler, but it is not portable enough (it tends not to be available in jails, even). Starting programs with stdout not open or only open for read/execute/search may have unexpected side effects. Reviewed by: ngie, des Differential Revision: https://reviews.freebsd.org/D57213
debug: classified in
02b-filenames_wildcards2 by
'['bin/.*/tests/.*', 'usr.bin/.*/tests/.*']'
- Remove fts_check_debug() which is only needed by test cases that use the fts_test() helper; fts_children_test.c does not call fts_test() - Remove fts_lexical_compar where traversal order does not matter for the test result - Drop fts_test.h and copy fts_lexical_compar locally - Pull up NULL argument onto same line as fts_open Fixes: https://cgit.freebsd.org/src/commit/?id=e624417db8a1 ("lib/libc/tests/gen: add fts_children() tests") Sponsored by: Google LLC (GSoC 2026) Reviewed by: des, asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2260
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Extend fts_misc_test.c with additional test cases: - FTS_NOCHDIR with absolute paths allows application chdir freely - fts_name is always NUL-terminated with correct fts_namelen - FTS_D/FTS_DP are paired and fts_level increments correctly - FTSENT fts_errno/fts_dev/fts_ino/fts_nlink are correct - circular symlink loop under FTS_PHYSICAL terminates - cycle via symlink under FTS_LOGICAL yields FTS_DC - fts_close after root deletion must not crash - fts_close after root rename restores CWD (SVN r77497) - FTS_NOCHDIR + empty directory does not corrupt path (SVN r49772) - FTS_NS entry has non-zero fts_errno - FTS_XDEV and FTS_WHITEOUT stubbed pending mount setup Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers, jillest MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2248
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Add ATF regression tests for previously-fixed fts(3) bugs: - PR 45723: directory with read but no execute is traversed via FTS_DONTCHDIR fallback, not silently skipped (commit 1e03bff7f2b7) - PR 196724: FTS_SLNONE must not be returned for a non-symlink; time-bounded race test runs for 1 second with concurrent file creation/deletion (commit bf4374c54589) - PR 262038: readdir(2) errors produce FTS_DNR with fts_errno set, not silently treated as end-of-directory (commit 0cff70ca6654) - SVN r246641: normal traversal works correctly with O_DIRECTORY fix in fts_safe_changedir() (commit f9928f1705ee) - SVN r261589: no crash when tree modified during traversal; time-bounded race test runs for 1 second with concurrent file creation/deletion (commit c6d38f088e5c) Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2257
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57485
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Reviewed by: imp,emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1659
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1656
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1656
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
This fixes the readv_before_end and preadv_before_end test timeout failures on riscv. See https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/lastCompletedBuild/testReport/lib.libc.secure/fortify_uio_test/readv_before_end/ Reviewed by: kevans, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57420
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Fixes this CI test failure: https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16606/testReport/junit/sys.posixshm/memfd_test/hugetlb/ Reviewed by: kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57289
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
On my ZFS based systems, no allocations occur with tags "newblk" or "freework". This leads to errors executing the tests that check for memory leaks. Skip the checks if the output of wmstat -m does not contain lines corresponding to those allocations. MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'tools/test/'
Instead of varying only the low surrogate do also randomly choose a suitable high surrogate. MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'tools/test/'
Remove test for UFC-16 surrogate pairs in file names from this exclude list, since kernel support has been committed and the test can be now expected to succeed. MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'tools/test/'
This test runs with rights of an un-privileged user writing to a file system only writable by the owner. Since no UID was provided in the mount command, the owner of the file system was "root", and thus writing was not allowed for $testuser. Fix this issue by mounting with "-u $testuser". MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'tools/test/'
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57147
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57148
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI We already have some components (such as mail and tcsh) that build without TIOCSTI defined. This is (existing portability support in those projects. Simplify things for downstreams by extending this approach to this additional TIOCSTI user. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50614
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
This test is known to be flaky if 10 attempts happens to be not enough for the test to pass. Usually, this test passes in ~4-6 attempts. See https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28664/testReport/junit/sys.netpfil.pf/route_to/random_table/ Rely on the timeout (default 5 mins) to catch a failure here, rather than just 10 attempts. It's very unlikely that 5 mins worth of attempts still isn't enough. For a history of flakiness, see https://ci.freebsd.org/job/FreeBSD-main-amd64-test/lastSuccessfulBuild/testReport/junit/sys.netpfil.pf/route_to/random_table/history/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289477 Reviewed by: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57408
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
This is almost a trivial factoring, but it's still a bit of boilerplate that we don't care to rewrite- the SO_PASSRIGHTS test will still receive some data, so the iovec construction still saves us a few lines. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57544
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
We test both the standard case where we want to reject any SCM_RIGHTS message, as well as the case where the kernel discards the unwanted file upon receipt. Reviewed by: glebius (previous version), markj Differential Revision: https://reviews.freebsd.org/D57426
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
Extend the existing test utility to cover recent stdatomic changes and improve validation of interface semantics, compile-time assertions, and behavioural conformance. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
debug: classified in
03-filenames_plain1 by
'tools/regression/'
sound tests: Add PROT_EXEC rejection test Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, kib Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
sound tests: Remove trailing PROT_EXEC Fixes: https://cgit.freebsd.org/src/commit/?id=730eaf466493 ("sound tests: Add PROT_EXEC rejection test") Reported by: Oliver Pinter <oliver.pntr@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 6 days
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
tests: Fix race condition in aslr_setuid Use a cloexec pipe to block the parent until the child is ready. While here, redirect the output from ping to /dev/null, and mark the test as requiring the inet feature since we ping the IPv4 loopback. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296116 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57734
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
tests: Fix race condition in aslr_setuid, take 2 Instead of a cloexec pipe, ingest ping's stdout and block until it has printed its initial summary, then close the pipe and return to the main test loop. Run ping in quiet mode so it won't mind that stdout is gone. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296116 MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=080a4087014e ("tests: Fix race condition in aslr_setuid") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57763
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
fusefs: fix a race in the pre-init tests These tests allow the user to customize the INIT response. But it's necessary to block the daemon's service loop from running until those expectations have been set. This race has never caused failures before simply due to luck. But now it's failing on slower platforms. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296236 Reported by: siva MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: siva Differential Revision: https://reviews.freebsd.org/D57781
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
fusefs: proofread an error message in the tests Reported by: otis Fixes: https://cgit.freebsd.org/src/commit/?id=2c1482e3053 ("fusefs: fix a race in the pre-init tests") MFC after: 2 weeks Sponsored by: ConnectWise
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
* Though undocumented, statfs(2) can sometimes return EBADF or ENOENT while an unmount is in progress. * In MockFS::write_response, write(2) may fail if m_fuse_fd has already been closed. This doesn't happen in the normal sequence of events, but it can happen if some process unrelated to the test nosily decides to access the test file system while it's being unmounted. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296237 Reported by: siva MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: siva Differential Revision: https://reviews.freebsd.org/D57787
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
If RTM_DELETE arrives before RTM_ADD, the test will skip the first reply and then timeout after attempting to read another message from the rtsock_fd. See the CI test failure[0] for more details. [0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16628/testReport/sys.net.routing/test_rtsock_l3/rtm_add_v6_temporal1_success/ Reviewed by: pouria Fixes: https://cgit.freebsd.org/src/commit/?id=e02d3fe70c7247027c85d60179c331618554ba34 MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
After 141bb85798 and 8bda488114f3, ping(8) first writes and flushes the initial status to stdout, then writes notification bell characters to stderr. This patch corrects the expected order of the output to stdout and stderr. This is a temporary fix; the test should be rewritten to separate the output streams and run expectations on each individually. Reviewed by: des MFC after: 3 days Sponsored by: The FreeBSD Foundation
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
Previously, these tests expected the bell chars to arrive before the initial status line. This appeared to be ok because ping(8) incorrectly mixed unbuffered and buffered writes by using printf(3) calls for the initial status, but direct write(2) calls for the bell chars. 141bb85798 revealed that the test's assertions only passed because the buffered writes did not get flushed before the direct writes in the test runs. 8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes in all cases and guarantee a deterministic output ordering to stdout observers. This patch fixes the test to match the correct ordering. Reviewed by: des Sponsored by: The FreeBSD Foundation
debug: classified in
02b-filenames_wildcards2 by
'sbin/.*/tests/.*'
This is a distillation of the environment described in the PR, using a dummy shlib and mapping it repeatedly. This takes advantage of the guard page added in 2767a1f3686e5b16 to reliably crash if rtld tries to scale its stack usage excessively with the # DSOs loaded. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295991 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57954
debug: classified in
03-filenames_plain1 by
'lib/libc/tests/'
Approved by: so Security: FreeBSD-SA-26:41.libalias Security: CVE-2026-49420 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57747
debug: classified in
02b-filenames_wildcards2 by
'tests\/.*'
These could go in other categories, but it's more clear if they're here instead.
- s/reimplemeted/reimplemented/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/impementations/implementations/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/THis/This/ - s/impementation/implementation/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/seperated/separated/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/implemeted/implemented/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/THis/This/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
Reviewed by: tuexen Fixes: https://cgit.freebsd.org/src/commit/?id=c70755bc0d8f ("virtio: add loader tunables to sysctl") MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
Reported by: vladlen
debug: classified in 01-style
by '[tT]ypo'
MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=fc32c802158f Add two new manual pages Differential Revision: https://reviews.freebsd.org/D55814
debug: classified in 01-style
by '[tT]ypo'
The correct path is /etc/defaults/rc.conf (defaults in plural). Reviewed by: netchild Fixes: https://cgit.freebsd.org/src/commit/?id=cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56456
debug: classified in 01-style
by '[tT]ypo'
- s/initited/initiated/ Obtained from: NetBSD MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/verfier/verifier/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/limitiations/limitations/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/Inititalize/Initialize/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/unititialized/uninitialized/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/verfier/verifier/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
This prevents unwanted change when saving files on IDEs (e.g. VSCode, Zed) Signed-off-by: Minsoo Choo <minsoo@minsoo.io> Sponsored by: The FreeBSD Foundation Pull request: https://github.com/freebsd/freebsd-src/pull/2152
debug: classified in 01-style
by '[wW]hitespace'
Signed-off-by: Roman <nnov.brody@gmail.com> Pull-request: https://github.com/freebsd/freebsd-src/pull/2156
debug: classified in 01-style
by '[tT]ypo'
fix typo: remove duplicate 'the' in ffs_vfsops comment Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
fix typo: duplicate 'the' in OP_NOTROOT comment Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
fix typo: lenght -> length in netlink comment Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
fix typo: seperate -> separate in tcp_ratelimit comment Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
fix typo: remove extra 'the' in rack.c comment Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
fix typo: writting -> writing in sack_filter Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
debug: classified in 01-style
by '[tT]ypo'
The address in the configuration file example was intended to be from the 192.168.0.0/16 range of IPv4 private addresses (RFC1918). Reported on mastodon.social at https://mastodon.social/@asmodai/116316630762241486. Fix submitted upstream by emaste@. Fixing locally first. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56773
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[sS]tyle'
Reported by: adrian Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[tT]ypo'
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D56990
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
debug: classified in 01-style
by '[tT]ypo'
MFC after: 3 days Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D55299
debug: classified in 01-style
by '[sS]tyle'
This is a "new" file, but is mostly copied from if_dtsec_fdt.c, so need to retain the original license header in addition to the new one. Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57123
debug: classified in 01-style
by 'license header'
MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57073
debug: classified in 01-style
by '[sS]tyle'
No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57186
debug: classified in 01-style
by '[wW]hitespace'
A typo resulted in the wrong argument for a bytewise comparison that could result in a crash if the incorrect argument was not a valid pointer. This patch fixes the argument. While investigating this, I noticed that the correct argument was not being filled in as required, so this patch fixes that, as well. Somehow, recovery from a NFSv4.1/4.2 server crash worked during testing, so this was not detected. The bug/patch only affects NFS client mounts using NFSv4.1/4.2. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294925 Reported by: Jov <amutu@amutu.com> MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- Use $(...) notation instead of legacy backticked `...` - Use tabs for indentation - Indent continuation lines with 4 spaces Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57039
debug: classified in 01-style
by '[sS]tyle'
Reviewed by: kib, andrew Sponsored by: AFRL, DARPA Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
debug: classified in 01-style
by '[tT]ypo'
MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57298
debug: classified in 01-style
by '[sS]tyle'
Fixes: https://cgit.freebsd.org/src/commit/?id=af2c7d9f6452 ("style.9: Encourage style changes when doing significant modifications") MFC after: 1 day Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[tT]ypo'
style(9) still allows TAB after #define but this is a historical
artifact and by far the minority of uses cases. Going forward, we would
like to promote the use of a single space, as it allows alignment to
survive line prefixing (such as in diffs).
style(9) also has prescribed a single space between '#else' or '#endif'
and a comment recalling the guard since 2002.
So, commit 157c184689ea ("assert.h: Remove leading tabs for whitespace
consistency") was good, and in line with rules about whitespace changes
(since the file was heavily modified by surrounding commits).
This commit is thus basically a revert of 439710cf003b ("assert.h:
Revert "Remove leading tabs for whitespace consistency"), which extended
replacing spaces with TABs in the code introduced in the meantime (after
commit 157c184689ea).
Reviewed by: fuz, imp
Fixes: https://cgit.freebsd.org/src/commit/?id=439710cf003b ("assert.h: Revert "Remove leading tabs for whitespace consistency")
MAC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57391
debug: classified in 01-style
by '[sS]tyle'
.git-blame-ignore-revs: <assert.h> whitespace changes Reminded by: brooks Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[wW]hitespace'
.git-blame-ignore-revs: <assert.h> whitespace changes: Fix comment Fixes: https://cgit.freebsd.org/src/commit/?id=8ee0f80252d1 (".git-blame-ignore-revs: <assert.h> whitespace changes") Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[wW]hitespace'
- s/deterimine/determine/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
The Nd macro takes the rest of the line as an argument, so there is no need for extra quoting. MFC after: 3 days
debug: classified in 01-style
by '[sS]tyle'
- s/Diable/Disable/ - s/connonical/canonical/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/freqency/frequency/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/Diable/Disable/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/freqency/frequency/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/Diable/Disable/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/freqency/frequency/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/freqency/frequency/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/Sotrage/Storage/ MFC after: 5 days
debug: classified in 01-style
by '[tT]ypo'
- s/occurance/occurrence/ - s/Univeristy/University/ MFC after: 5 days
debug: classified in 01-style
by '[tT]ypo'
- s/Similarily/Similarly/ - s/passtrough/passthrough/ MFC after: 5 days
debug: classified in 01-style
by '[tT]ypo'
- s/thet/the/ MFC after: 5 days
debug: classified in 01-style
by '[tT]ypo'
- s/Wihout/Without/ MFC after: 5 days
debug: classified in 01-style
by '[tT]ypo'
- s/Februrary/February/ MFC after: 1 week
debug: classified in 01-style
by '[tT]ypo'
Fix typo in if statement for compiling rtw88 against a Linux target. Signed-off-by: Lambert Lim <lambert@sanesecurityguy.com> Reviewed by: imp,ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/2262
debug: classified in 01-style
by '[tT]ypo'
Event: Halifax Hackathon 202606 Location: jrm@'s kitchen Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[wW]hitespace'
Reviewed by: hrs Event: Halifax Hackathon 202606 Location: jrm@'s couch
debug: classified in 01-style
by '[tT]ypo'
Reported by: rlibby
debug: classified in 01-style
by '[tT]ypo'
Fixes: https://cgit.freebsd.org/src/commit/?id=191f47bcd650 ("hwpstate_amd: Refactor the cpufreq code by using delegation pattenr") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[sS]tyle'
MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Seat 36K in AC667, over Thetford Mines Sponsored by: The FreeBSD Foundation
debug: classified in 01-style
by '[wW]hitespace'
- s/occurence/occurrence/ - s/occurences/occurrences/ - s/ouput/output/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/envionments/environments/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/heirarchical/hierarchical/ - s/itnerface/interface/ - s/conjuction/conjunction/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/exept/except/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/betwen/between/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/appplications/applications/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/colunm/column/ - s/operaions/operations/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
- s/givne/given/ - s/assocation/association/ - s/reporing/reporting/ MFC after: 3 days
debug: classified in 01-style
by '[tT]ypo'
MFC after: 3 days Reviewed by: bz, ziaee Fixes: https://cgit.freebsd.org/src/commit/?id=0a2f7683bf0c ("man: iwlwifi/rtw88/rtw89: update man pages for Linux v7.0 based updates") Differential Revision: https://reviews.freebsd.org/D57720
debug: classified in 01-style
by '[tT]ypo'
Fix small typo in pf.conf(5) MFC after: 3 days Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57938
debug: classified in 01-style
by '[tT]ypo'
Security: CVE-2026-34743 MFC after: 3 days
debug: classified in
05-summary-prefix by 'MFV:'
Changes: https://github.com/libexpat/libexpat/blob/R_2_7_5/expat/Changes https://github.com/libexpat/libexpat/blob/R_2_7_4/expat/Changes Security: CVE-2026-32776 Security: CVE-2026-32777 Security: CVE-2026-32778 Security: CVE-2026-24515 Security: CVE-2026-25210 MFC after: 3 days
debug: classified in
05-summary-prefix by 'contrib/'
Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56222
debug: classified in
03-filenames_plain1 by
'contrib/'
Differential Revision: https://reviews.freebsd.org/D54583 Approved by: bapt MFC after: 3 days Changelog: https://github.com/vstakhov/libucl/releases/tag/0.9.3
debug: classified in
03-filenames_plain1 by
'contrib/'
Merge commit 'fe271bdb43cf88ee129d94c0e286fe618fd28e89'
debug: classified in
05-summary-prefix by 'Merge '
Sponsored by: The FreeBSD Foundation
debug: classified in
03-filenames_plain1 by
'contrib/'
Enable macros and includes by default as this is breaking package building on HEAD. libucl 0.9.3 by default changed the behavior of includes and macros. These were previously enabled but it switched to disabled which breaks the package building in HEAD. This is a temporary workaround for now to fix the package building specially for releng/15.0. This might be reverted post EOL of 15.0 in the coming months. Reported by: ivy Fixes: https://cgit.freebsd.org/src/commit/?id=abda442d92fd ("contrib/libucl: Import libucl 0.9.3") Tested by: ivy Approved by: ivy, kevans Differential Revision: https://reviews.freebsd.org/D56294
debug: classified in
03-filenames_plain1 by
'contrib/'
MFC after: 2 weeks Relnotes: yes
debug: classified in
05-summary-prefix by 'MFV:'
This change brings in version 3.5.6 of OpenSSL, which features several security fixes (the highest of which is a MEDIUM severity issue), as well as some miscellaneous feature updates. Please see the release notes [1] for more details. PS Apologies for the confusing merge commits -- I was testing out a new automated update process and failed to catch the commit message issues until after I pushed the change. 1. https://github.com/openssl/openssl/blob/openssl-3.5.6/NEWS.md MFC after: 1 day (the security issues warrant a quick backport). Merge commit 'ab5fc4ac933ff67bc800e774dffce15e2a541e90'
debug: classified in
03-filenames_plain1 by
'crypto/openssl/'
A new manpage and any associated links will be added in the next commit. MFC after: 1 day (the security issues warrant a quick backport). MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
debug: classified in
05-summary-prefix by
'crypto/openssl:'
We don't need any docs or examples in tree, as well as any upstream-specific build infrastructure. Differential Revision: https://reviews.freebsd.org/D55836
debug: classified in
03-filenames_plain1 by
'sys/contrib'
debug: classified in
03-filenames_plain1 by
'sys/contrib'
NetBSD make defaults this to "yes", bmake defauts it to "no" to retain the traditional behavior. The default is dealt with in bmake's Makefile but that does not address boot-strap. For now, just change the ifdef in main. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294436
debug: classified in
03-filenames_plain1 by
'contrib/'
While after the changes to LinuxKPI 802.11 we should never be assoc and not have dtim_period set, we have seen before that this could happen. Add a WARN as that will help debugging the following DIV 0. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This code was not being built due to errors in our libarchive configuration. Now that those have been addressed, staticize some variables that trip a “no previous extern declaration” error. This is a subset of upstream PR 2962. MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56471
debug: classified in
03-filenames_plain1 by
'contrib/'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Notable upstream pull request merges:
#18148 d1b0a6982 draid: add failure domains support
#18167 f203fedde Add zoned_uid property with additive least privilege
authorization
#18191 -multiple FreeBSD: Fix a couple of races involving zvol creation
and teardown
#18213 33ed68fc2 zpool create: report which device caused failure
#18235 931deb290 Prevent range tree corruption race by updating
dnode_sync()
#18282 b44a3ecf4 zpool: Change zpool offline spares policy
#18310 -multiple Fix s_active leak in zfsvfs_hold() when z_unmounted is
true
#18351 ce837a28e Bridge speculative and prescient prefetchers
#18380 fc659bd6d draid: fix import failure after disks replacements
#18385 16858492e FreeBSD: Implement relatime property
#18390 a22b3f670 abd: Fix stats asymmetry in case of Direct I/O
#18399 7b1682a82 Add support for POSIX_FADV_DONTNEED
#18403 5cb95ad89 fix memleak in spa_errlog.c
#18405 0752cf067 draid: allow seq resilver reads from degraded vdevs
#18407 e635d27eb Add ability to set user properties while changing
encryption key
#18414 2abf469be draid: fix cksum errors after rebuild with degraded disks
#18415 -multiple Fix snapshot automount deadlock during concurrent zfs recv
#18421 1644e2ffd Fix read corruption after block clone after truncate
Obtained from: OpenZFS
OpenZFS commit: 1644e2ffd2640fa3e2c191ceaf048a5fc8399493
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Fixes: https://cgit.freebsd.org/src/commit/?id=d8fbbd371ca1 ("zfs: merge openzfs/zfs@https://cgit.freebsd.org/src/commit/?id=1644e2ffd") Reported by: Jenkins
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Due to FreeBSD-specific code it seems a code update was not applied to the FreeBSD part during the v6.17 driver update. Add the missing lines. Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=b35044b38f74c
debug: classified in
03-filenames_plain1 by
'sys/contrib'
git-subtree-dir: contrib/pkgconf git-subtree-mainline: 45827f9ad2e32ec8e4cdde62cbf722a48fb1b396 git-subtree-split: 6294b6ab217a2d5f1d2bc23a64505a228294c508
debug: classified in
03-filenames_plain1 by
'contrib/'
Changes: https://github.com/eggert/tz/blob/2026b/NEWS MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'contrib/'
Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
debug: classified in
03-filenames_plain1 by
'sys/contrib'
fetch_newgroups_tok(3): clamp group count to AUDIT_MAX_GROUPS before the loop to prevent a stack buffer overflow when a crafted record specifies more than 16 groups. fetch_execarg_tok(3), fetch_execenv_tok(3): add a bounds check at the top of the string-walking loop to prevent an out-of-bounds read when the previous string's nul byte is the last byte of the record buffer. fetch_sock_unix_tok(3): clamp the memchr search length to the number of bytes remaining in the buffer to prevent an out-of-bounds read on short tokens. Also clamp slen to sizeof(path) to prevent a one-byte overflow when no nul byte is found within the path data. fetch_socket_tok: fix copy-paste error where the remote address was written into l_addr instead of r_addr. Previously reported by: @haginara Define AU_UNIX_PATH_MAX as 108 (the largest sun_path across all supported platforms) and use it in au_socketunix_t instead of the hardcoded 104. Update fetch_sock_unix_tok to derive its search bound from sizeof(tok->tt.sockunix.path) so cross-platform records from Solaris and Linux with paths up to 108 bytes parse correctly without truncation. REF: https://github.com/openbsm/openbsm/pull/87 Reviewed by: kevans, markj Differential Revision: https://reviews.freebsd.org/D56510
debug: classified in
03-filenames_plain1 by
'contrib/'
MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'contrib/'
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the last commit before the upstream release/21.x branch was created. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial third-party/ top-level directory. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add partial libc/ top-level directory. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
This adjusts the llvmorg-21-init-19288-gface93e724f4 import: add more items to the libc/ top-level directory. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
Fix various configuration fails, update generated headers, Makefiles, etc. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: Commit manually moved from "unknown" to "contrib".
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2, a.k.a. 21.1.7 release. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
05-summary-prefix by 'Merge '
[libc++] Simplify the implementation of __libcpp_{,de}allocate (#147989)
GCC 15 also supports `__buitin_operator_{new,delete}` now, so the
`#else` cases are dead code. This patch inlines the calls to the wrapper
functions and simplifies some surrounding code.
This is part of making libc++ 21 build with GCC 14.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067
MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[libc++] Remove dead code from <type_traits> (#143854) Since we've upgraded to GCC 15 now, we can remove a bunch of dead code from `<type_traits>`. This is part of making libc++ 21 build with GCC 14. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
Otherwise, gcc will not be able to compile parts of libc++ 21 in -m32
mode, resulting in errors similar to:
In file included from /usr/src/contrib/llvm-project/libc/shared/str_to_float.h:13,
from /usr/src/contrib/llvm-project/libcxx/src/include/from_chars_floating_point.h:14,
from /usr/src/contrib/llvm-project/libcxx/src/charconv.cpp:12:
/usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h: In function 'void __llvm_libc::internal::set_implicit_bit(__llvm_libc::fputil::FPBits<T>&) [with T = long double]':
/usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h:77:10: error: 'struct __llvm_libc::fputil::FPBits<long double>' has no member named 'set_implicit_bit'
77 | result.set_implicit_bit(result.get_biased_exponent() != 0);
| ^~~~~~~~~~~~~~~~
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067
MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[PowerPC] need to set CallFrameSize for the pass PPCReduceCRLogicals when insert a new block (#151017) In the [ [CodeGen] Store call frame size in MachineBasicBlock](https://reviews.llvm.org/D156113), it mentions When a basic block has been split in the middle of a call sequence. the call frame size may not be zero, it need to set the setCallFrameSize for the new MachineBasicBlock. but in the function `splitMBB(BlockSplitInfo &BSI)` in the llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp , it do not setCallFrameSzie for the new MachineBasicBlock `NewMBB`, we will setCallFrameSzie in the patch. the patch fix the crash mention in https://github.com/llvm/llvm-project/pull/144594#issuecomment-2993736654 This fixes "error in backend: Found 1 machine code errors" while crypto/openssh/packet.c for PowerPC64. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a, a.k.a. 21.1.8 release. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
05-summary-prefix by 'Merge '
libcxx-compat: revert llvmorg-21-init-9130-g9e3982d9ae81:
[libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920)
`__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic.
Closes #131179.
This is part of making libc++ 21 build with clang 18.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067
MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: revert llvmorg-21-init-15984-g650b451d0065: [libc++] Simplify the implementation of pointer_traits a bit (#142260) This is part of making libc++ 21 build with clang 18. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83: [libc++] Simplify the implementation of remove_reference (#85207) GCC 13 introduced the type trait `__remove_reference`. We can simplify the implementation of `remove_reference` a bit by using it. This is part of making libc++ 21 build with clang 18. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: revert llvmorg-21-init-10154-ge43e8ec7afbd: [libc++] Remove dead implementation of is_nothrow_convertible and merge the remaining code into is_convertible.h (#137717) We can use the `__is_nothrow_convertible` builtin unconditionally now, which makes the implementation very simple, so there isn't much of a need to keep a separate header around. This is part of making libc++ 21 build with clang 18. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: revert llvmorg-21-init-8400-g703cfe745b96: [libc++] Replace __libcpp_popcount by __builtin_popcountg (#133937) `__libcpp_popcount` was previously used as a fallback for `__builtin_popcountg` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_popcountg` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely replace all instances of `__libcpp_popcount` with `__builtin_popcountg` and eliminate the fallback logic. This is part of making libc++ 21 build with clang 18. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: fix llvmorg-21-init-18351-gfcc09b6f0267: [libc++] Fix std::make_exception_ptr interaction with ObjC (#135386) Clang treats throwing/catching ObjC types differently from C++ types, and omitting the `throw` in `std::make_exception_ptr` breaks ObjC invariants about how types are thrown/caught. Fixes #135089 Co-authored-by: Louis Dionne <ldionne.2@gmail.com> Only use lambdas when in !defined(_LIBCPP_CXX03_LANG), so this will compile with clang 18 and lower, in C++03 mode and earlier. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
libcxx-compat: fix llvmorg-21-init-12415-g3a86e0bd29f3: [libc++] Optimize std::getline (#121346) ``` ----------------------------------------------- Benchmark old new ----------------------------------------------- BM_getline_string 318 ns 32.4 ns ``` Move the __bump_stream() lamda in <istream> to a separate function, so this will compile with clang 18 and lower, in C++03 mode and earlier. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[Clang] Don't diagnose missing members when looking at the instantiating class template (#180725) The perfect matching patch revealed another bug where recursive instantiations could lead to the escape of SFINAE errors, as shown in the issue. Fixes https://github.com/llvm/llvm-project/issues/179118 This fixes compile errors in the www/qt5-webengine port. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[Clang] Fix a regression introduced by #147046 (#150893) Static functions have an implicit object argument during deduction. This fixes an assertion while compiling the devel/corrade port. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[clang] create local instantiation scope for matching template template parameters (#183219) This fixes a bug where a partial substitution from the enclosing scope is used to prepopulate an unrelated template argument deduction. Fixes #181166 This fixes an expected error when building the devel/catch port. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[libc++] Fix iostream size ABI break (#185839) In #124103 we changed the size of various iostream objects, which turns out to be ABI breaking when compiling non-PIE code. This ABI break is safe to fix, since for any programs allocating more memory for the iostream objects, the remaining bytes are simply unused now. Fixes #185724 This fixes the ABI break that causes programs that use the standard streams to terminate in various interesting ways, usually by throwing an unexpected std::bad_cast exception. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
[Headers][X86] Remove more duplicated typedefs (#153820) They are defined in mmintrin.h This fixes a -Werror warning in openzfs, which compiles for C99, and C99 does not allow for typedef redefinitions. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
Add a volatile qualifier in the loop which triggers SIGBUS, as otherwise the compiler is smart enough to elide it, replacing it with a check for page != 0. MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'contrib/'
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_0/expat/Changes Security: CVE-2026-41080 MFC after: 1 week
debug: classified in
05-summary-prefix by 'contrib/'
Reviewed by: pfg Approved by: lwhsu (mentor) Differential Revision: https://reviews.freebsd.org/D56269
debug: classified in
03-filenames_plain1 by
'contrib/'
nvlist_check_header() validated nvlh_size for overflow before performing conversion. An mallicous user can set NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that the orginall value passes the check, but after the conversion the sizeof(nvlist_header) + size can overflow. This can lead to a heap buffer overflow. Approved by: so Security: FreeBSD-SA-26:17.libnv Security: CVE-2026-35547 Fixes: https://cgit.freebsd.org/src/commit/?id=36fa90dbde0060aacb5677d0b113ee168e839071 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56342
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Notable upstream pull request merges: #18387 656285140 Handle raidz errors <= nparity rather than ignoring #18401 1cebe8a38 libzfs: report invalid permission name in zfs allow #18430 513710ed2 Fix "panic: cache_vop_rename: lingering negative entry" #18440 37e3a260f dmu_direct: avoid UAF in dmu_write_direct_done() #18445 2eee4ac1e Fix: draid autopkgtests fail on s390x architecture #18448 8da472973 key lookup failure should always return EACCES #18456 4a58ab8ce zfs.4: document five missing module parameters Obtained from: OpenZFS OpenZFS commit: 84ffe564dff1b7f69d397817ef292cbe2c5ebad3
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Notable upstream pull request merges:
#18473 b8d959640 Fix rare cksum errors after rebuild
#18477 e78a51dd6 Fix off-by-one in PREVIOUSLY_REDACTED handler that drops
last block
#18482 d5099c330 Initialize vr_last_txg for rebuild
#18483 872f01019 Zstd: rework ZSTD_isError symbol renaming
#18489 366b1f9a3 Fix long POSIX_FADV_DONTNEED for single block files
Obtained from: OpenZFS
OpenZFS commit: a12c6ed62fcd06093b95616515e4716b0b0bc038
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Thread Safety Analysis: Fix pointer handling of variables with deprecated attributes (#148974)
de10e44b6fe7 ("Thread Safety Analysis: Support warning on
passing/returning pointers to guarded variables") added checks for
passing pointer to guarded variables. While new features do not
necessarily need to support the deprecated attributes (`guarded_var`,
and `pt_guarded_var`), we need to ensure that such features do not cause
the compiler to crash.
As such, code such as this:
struct {
int v __attribute__((guarded_var));
} p;
int *g() {
return &p.v; // handleNoMutexHeld() with POK_ReturnPointer
}
Would crash in debug builds with the assertion in handleNoMutexHeld()
triggering. The assertion is meant to capture the fact that this helper
should only be used for warnings on variables (which the deprecated
attributes only applied to).
To fix, the function handleNoMutexHeld() should handle all POK cases
that apply to variables explicitly, and produce a best-effort warning.
We refrain from introducing new warnings to avoid unnecessary code bloat
for deprecated features.
Fixes: https://github.com/llvm/llvm-project/issues/140330
This fixes an assertion while building the net/openvswitch port:
"Assertion failed: ((POK == POK_VarAccess || POK == POK_VarDereference)
&& "Only works for variables"), function handleNoMutexHeld, file
/usr/src/contrib/llvm-project/clang/lib/Sema/AnalysisBasedWarnings.cpp,
line 2120.'
Reported by: cy
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295101, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067
MFC after: 1 month
debug: classified in
03-filenames_plain1 by
'contrib/'
Reviewed by: glebius Sponsored by: Netflix Differential Revision: <https://reviews.freebsd.org/D55998>
debug: classified in
03-filenames_plain1 by
'contrib/'
debug: classified in
03-filenames_plain1 by
'contrib/'
git-subtree-dir: contrib/smart git-subtree-mainline: 95b4436e989df29f6368f13832cb13d7cbc52eac git-subtree-split: eb3b1302382b1d0cbe37eeebabfcdd546aa2fc4e
debug: classified in
03-filenames_plain1 by
'contrib/'
Merge commit '69ae37302ee98839857791a261546e19d078cdb8'
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Merge commit 'd2d20bb5099dc1c443a4b783d43b8a45338c85d2'
debug: classified in
03-filenames_plain1 by
'contrib/'
OpenSSH: Update to 10.1p1 Full release notes are available at https://www.openssh.com/txt/release-10.1 Selected highlights from the release notes: Potentially-incompatible changes * ssh(1): add a warning when the connection negotiates a non-post quantum key agreement algorithm. * ssh(1), sshd(8): major changes to handling of DSCP marking/IPQoS * ssh(1), sshd(8): deprecate support for IPv4 type-of-service (ToS) keywords in the IPQoS configuration directive. * ssh-add(1): when adding certificates to an agent, set the expiry to the certificate expiry time plus a short (5 min) grace period. * ssh-agent(1), sshd(8): move agent listener sockets from /tmp to under ~/.ssh/agent for both ssh-agent(1) and forwarded sockets in sshd(8). Security * ssh(1): disallow control characters in usernames passed via the commandline or expanded using %-sequences from the configuration file, and disallow \0 characters in ssh:// URIs. New features * ssh(1), sshd(8): add SIGINFO handlers to log active channel and session information. Sponsored by: The FreeBSD Foundation
debug: classified in
05-summary-prefix by 'OpenSSH:'
pam_ssh: Fix build - chase OpenSSH function signature change Reported by: dch Fixes: https://cgit.freebsd.org/src/commit/?id=644b4646c7ac ("OpenSSH: Update to 10.1p1") Sponsored by: The FreeBSD Foundation
debug: classified in
04-filenames_plain2 by 'lib/'
debug: moved to contrib because
'Need to be grouped with
644b4646c7acab87dc20d4e5dd53d2d9da152989'
Full release notes are available at https://www.openssh.com/txt/release-10.2 Selected highlights from the release notes: Bugfixes -------- * ssh(1): fix mishandling of terminal connections when ControlPersist was active that rendered the session unusable. bz3872 Sponsored by: The FreeBSD Foundation
debug: classified in
05-summary-prefix by 'OpenSSH:'
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_1/expat/Changes Security: CVE-2026-45186 MFC after: 1 week
debug: classified in
05-summary-prefix by 'contrib/'
Merge commit 'ef402bba84260816d3e8d6e2439b0bc7eddc9446'
debug: classified in
05-summary-prefix by 'Merge '
Reviewed by: brooks, emaste Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D56849
debug: classified in
03-filenames_plain1 by
'contrib/'
Remove libkse as it has been obsolete for many years and drop 1:1 from description of libthr. Reviewed by: brooks Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D56850
debug: classified in
03-filenames_plain1 by
'contrib/'
OpenSSH: Update to 10.3p1 Full release notes are available at https://www.openssh.com/txt/release-10.3 Selected highlights from the release notes: * ssh(1), sshd(8): remove bug compatibility for implementations that don't support rekeying. If such an implementation tries to interoperate with OpenSSH, it will now eventually fail when the transport needs rekeying. * ssh(1), sshd(8): support IANA-assigned codepoints for SSH agent forwarding, as per draft-ietf-sshm-ssh-agent. Support for the new names is advertised via the EXT_INFO message. If a server offers support for the new names, then they are used preferentially. * ssh(1): add a ~I escape option that shows information about the current SSH connection. * sshd(8): add 'invaliduser' penalty to PerSourcePenalties, which is applied to login attempts for usernames that do not match real accounts. Defaults to 5s to match 'authfail' but allows administrators to block such attempts for longer if desired. * Support the ed25519 signature scheme via libcrypto. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56999
debug: classified in
05-summary-prefix by 'OpenSSH:'
blocklist: Add back probes The banner exchange was moved to the sshd-auth process in upstream commit bb781f02d4efd178e329a62a838962bee16e3e9b. Add it back. Add back fatal exit probe. NetBSD PR: bin/60270 (GNATS) Reviewed by: emaste Fixes: https://cgit.freebsd.org/src/commit/?id=2574974648c6 ("OpenSSH: Update to 10.3p1") Differential Revision: https://reviews.freebsd.org/D57027
debug: moved to contrib because
'Need to be grouped with
2574974648c68c738aec3ff96644d888d7913a37'
The so far so consistent (file)names got an outlier so add the one character longer pattern as well to catch that. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Due to driver changes it is no longer feasible to extract the full PCI ID / firmware / card type information in one go as we used to be able to. We have already changed the way we extract firmware information for ports and marked the iwlwififw.4 man page as obsolete. Reduce the script to simply extarct the fwget(8) information and, compared to the old times, sort each section so diffs will be easier to see in the future. This was particular helpful this time to make sure we do not lose entries with the change of technique. We also keep the script in the best perl spirit to do the job but not to win a price, especially given it seems we have to change matters every (other) year. Given we can no longer extract firmware information for the PCI IDs, we need to "manually" check against the ports that names match. Ideally we will simplify things for everything "mld-only" one day to only have a single firmware package for these (even if size increases slightly). Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57168
debug: classified in
03-filenames_plain1 by
'contrib/'
ldns: Update to 1.8.4 Merge commit '3dcfa5af412125cd1bad1d383ff7c18c5effbd77' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169
debug: classified in
03-filenames_plain1 by
'contrib/'
ldns: Update to 1.9.0 Merge commit '5eb18e8576462f5bb33fbd60fcbd752fe5791f33' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170
debug: classified in
03-filenames_plain1 by
'contrib/'
ldns: Regenerate configuration after update MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=d44c9549ef31 ("ldns: Update to 1.8.4") Fixes: https://cgit.freebsd.org/src/commit/?id=9ed998a81bab ("ldns: Update to 1.9.0")
debug: classified in
03-filenames_plain1 by
'contrib/'
ldns: Fix unused variable on big-endian MFC after: 1 week Fixes: https://cgit.freebsd.org/src/commit/?id=9ed998a81bab ("ldns: Update to 1.9.0")
debug: classified in
03-filenames_plain1 by
'contrib/'
unbound: Tweak freebsd-configure script Regenerating the configure script is optional and can introduce noise if the installed versions of autoconf, automake, and libtool do not match those used upstream. Tweak our script slightly so it will skip this step if libtoolize is not found.
debug: classified in
03-filenames_plain1 by
'contrib/'
unbound: Regenerate for 1.24.1 No functional changes intended. Fixes: https://cgit.freebsd.org/src/commit/?id=8b29c373e6ab ("unbound: Vendor import 1.24.1")
debug: classified in
05-summary-prefix by 'unbound:'
unbound: Update to 1.24.2 Merge commit 'ec5b94f552d7cb2a9d456c67e9941bcf5e3698bf' This is purely cosmetic as we already had the functional changes. MFC after: 1 week
debug: classified in
05-summary-prefix by 'unbound:'
Release notes at
https://nlnetlabs.nl/news/2026/Apr/29/unbound-1.25.0-released/
Merge commit '4dd0a17edce60370304a45f2c40251e09e193bd6'
MFC after: 1 week
debug: classified in
05-summary-prefix by 'unbound:'
Release notes at
https://nlnetlabs.nl/news/2026/May/20/unbound-1.25.1-released/
Merge commit '22e58f330a151944c24e010d23ec3881df6681b6'
Security: CVE-2026-33278
Security: CVE-2026-42944
Security: CVE-2026-42959
Security: CVE-2026-32792
Security: CVE-2026-40622
Security: CVE-2026-41292
Security: CVE-2026-42534
Security: CVE-2026-42923
Security: CVE-2026-42960
Security: CVE-2026-44390
Security: CVE-2026-44608
MFC after: 1 week
debug: classified in
05-summary-prefix by 'unbound:'
Release notes at https://www.sqlite.org/releaselog/3_53_1.html. Obtained from: https://www.sqlite.org/2026/sqlite-autoconf-3530100.tar.g Merge commit 'b00eb376e3fb28e738f9370552dae9d92c1fdd76' into sqlite3
debug: classified in
03-filenames_plain1 by
'contrib/'
When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294577 MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'contrib/'
Approved by: bapt Differential Revision: https://reviews.freebsd.org/D55627 Upstream: https://github.com/corecode/dma/pull/152
debug: classified in
03-filenames_plain1 by
'contrib/'
[Serialization] Fix assertion on re-deserialized friend template spec… (#200566)
…ialization in PCH (#198133)
A friend function-template specialization declared inside a class
template is serialized into a PCH. When the class template is later
instantiated while loading the PCH, the friend specialization can be
deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
-> VisitFunctionDecl for the same specialization) at the same time as
the canonical copy, producing two redeclarations of the same
specialization in the template's specialization set.
ASTDeclReader::VisitFunctionDecl asserted that this collision could only
happen when merging declarations from different modules. Since
38b3d87bd384, friend functions defined inside dependent class templates
are loaded eagerly, so the collision can now also occur within a single
PCH/AST file (non-modules build), tripping the assertion:
Assertion failed: (Reader.getContext().getLangOpts().Modules &&
"already deserialized this template specialization"), function
VisitFunctionDecl
The merge that follows (mergeRedeclarable) already links the two
redeclarations correctly regardless of whether modules are enabled, so
the fix is to drop the modules-only assumption and let the merge run.
Fixes https://github.com/llvm/llvm-project/issues/198133
This fixes (well, simply removes :) an assertion when building the
cad/OrcaSlicer port with precompiled headers turned on.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295296
MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'contrib/'
MFV: file 5.47. MFC after: 3 days
debug: classified in
05-summary-prefix by 'MFV:'
file: normalize .result files to ensure trailing newline on install Some upstream result files introduced in file 5.47 (e.g., bgcode.result) lack a trailing newline, causing the contrib_file_tests ATF test to fail with "cmp: EOF on bgcode.result". Generate normalized copies of the expected results and install those instead. MFC after: 3 days Fixes: https://cgit.freebsd.org/src/commit/?id=e949ce9dc0e6fff26e83904f1008b76d36ba0a37
debug: classified in
02-filenames_wildcards by
'.*Makefile'
debug: moved to contrib because
'Need to be grouped with
e949ce9dc0e6fff26e83904f1008b76d36ba0a37'
Correctly declare vfs.zfs.metaslab.condense_pct The following sysctls have moved to metaslab.c: vfs.zfs.metaslab.df_alloc_threshold vfs.zfs.metaslab.df_free_pct vfs.zfs.metaslab.sm_blksz_no_log vfs.zfs.metaslab.sm_blksz_with_log Reported by: dim@FreeBSD.org
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Rewrite the main loop to use ppoll() instead of just blocking on read, blocking the signals we care about when we aren't polling. I didn't bother replacing alarm() with setitimer(); the alarm code is dead anyway since there is no way for max_idletime to acquire a non-zero value. While here, avoid leaking the pid file and trigger descriptors to the log child. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295840 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57451
debug: classified in
03-filenames_plain1 by
'contrib/'
This is a rollup commit from upstream to fix: Reject oversized inputs in ASN1_mbstring_ncopy() cms: kek_unwrap_key: Fix out-of-bounds read in check-byte validation cms: kek_unwrap_key: test for fix out-of-bounds read in check-byte validation Avoid length truncation in ASN1_STRING_set pkcs12: verify that the pbmac1 key length is safe Reject potentially forged encrypted CMS AuthEnvelopedData messages QUIC stack must limit the number of PATH_CHALLENGE frames processed in RX Fix NULL dereference in QUIC address validation Fix potential NULL dereference processing CMS PasswordRecipientInfo Fix potential NULL dereference in OSSL_CRMF_ENCRYPTEDVALUE_decrypt() Enforce implicit rejection for CMS/PKCS#7 decryption Use the correct issuer when validating rootCAKeyUpdate Match the local q DHX parameter against the peer's q Apply the buffered IV on the AES-OCB EVP_Cipher() path Fix handling of empty-ciphertext messages in AES-GCM-SIV and AES-SIV Fix possible use-after-free in OpenSSL PKCS7_verify() Approved by: so Obtained from: OpenSSL Security: FreeBSD-SA-26:35.openssl Security: CVE-2026-7383 Security: CVE-2026-9076 Security: CVE-2026-34180 Security: CVE-2026-34181 Security: CVE-2026-34182 Security: CVE-2026-34183 Security: CVE-2026-42764 Security: CVE-2026-42766 Security: CVE-2026-42767 Security: CVE-2026-42768 Security: CVE-2026-42769 Security: CVE-2026-42770 Security: CVE-2026-45445 Security: CVE-2026-45446 Security: CVE-2026-45447
debug: classified in
03-filenames_plain1 by
'crypto/openssl/'
Approved by: so Security: FreeBSD-SA-26:36.ldns Security: CVE-2026-10846
debug: classified in
03-filenames_plain1 by
'contrib/'
This change is a security release which resolves several issues with OpenSSL 3.5, the highest severity issue being ranked "High". Users are strongly encouraged to update to this release. More information about the release (from a high level) can be found in the release notes [1]. 1. https://github.com/openssl/openssl/blob/openssl-3.5.7/NEWS.md All conflicts were resolved with `--theirs`, taking the release diff over the local diff; the conflicts occurred due to preemptive security fixes applied by so@ in e508c343. MFC after: 3 days (the important security issues have been preemptively addressed) Merge commit '3a71a35ad9dad0e5d2cad8efecc8ba9d57c42d43' Conflicts: crypto/openssl/include/internal/quic_channel.h crypto/openssl/ssl/quic/quic_channel_local.h crypto/openssl/ssl/quic/quic_rx_depack.c crypto/openssl/test/cmsapitest.c crypto/openssl/test/evp_extra_test.c
debug: classified in
03-filenames_plain1 by
'crypto/openssl/'
MFC after: 3 days MFC with: 1523ccfd9
debug: classified in
05-summary-prefix by
'crypto/openssl:'
This diff reduces with the content provided by upstream (OpenSSL). MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'crypto/openssl/'
This particular change didn't come from upstream. It was added locally in 7a991ecd1 when attempting to enable the fips provider with 3.0. Given the fact that we no longer build the fips provider and the fips provider build process (including sources) is very prescribed to specific build steps and source versions, there's no reason why we need to continue carrying around this diff anymore. MFC after: 1 week Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
debug: classified in
03-filenames_plain1 by
'crypto/openssl/'
[ToolChains][FreeBSD] Set default Linker to LLD for FreeBSD (#190596) When the linker is specified as ld, toolchain applies special handling by invoking (triple)-ld instead of resolving ld via standard PATH lookup. This causes GNU ld installed via the system package manager to take the precedence (since (triple)-ld appears earlier in the search path), effectively overriding ld.lld. As a result, we set the default Linker on FreeBSD to ld.lld to indicate we want to use lld by default. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'contrib/'
Amongst others mt76_connac_pm_unref() is calling mt76_connac_power_save_sched()
which will (normaly) re-schedule the pm_work.
In various parts we also cancel that work, also during PCI detach ("shutdown",
"remove" in LinuxKPI terms).
However we also keep calling mt76_connac_pm_unref() in the detach path and thus
we get to a point where we re-scheduled the work but then the device goes away.
At that point LinuxKPI delayed work has a callput pending which is embedded in
the work structure (pm_work). The moment we free the device that structure
and callout is gone but the callout is still on the list and once that list
is walked we panic.
Simply prevent mt76_connac_power_save_sched() from getting to the point of
possibly re-scheduling the pm_work by setting pm->enable to false in the
beginning of the detach path.
The are likely more paths which will need the same treatment as the code
is by far anything from "symmetric" (that is the attach path is highly
bus independent while the detach path is implemented per-bus). Also
other chipsets share the same "logical paths" with their own names, so
they will need this too once we get to them.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
mt76: ensure net80211 com instance before returning from driver load Do as we have done for iwlwifi (f808c43ad923, bee60c989745) add a completion event for device registration which calls into 802.11 and creates the wifi "device" (net80211 com instance). This is needed as otherwise the deferred work in the mt76 drivers (mt7915, mt7921, mt7925, mt7996; but not the 7615 [*]) would make driver loading return before the wifi device is there. We would then continue, e.g., during rc startup and race possibly trying to create a vap (wlan interface) with the underlying device not being registered yet and fail. [*] the 7615 does not seem to do this asynchronously so is fine. Sponsored by: The FreeBSD Foundation Tested on: 7921, others to be tested at time MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
mt76: mt7921: terminate fw log messages with \n In order to make the firmware messages spewed on the console readable write one message per line and not one very long line. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
mt76: mt7921: depend on lindebugfs and turn debugfs support on Add the missing MODULE_DEPEND() calls for lindebugfs. It is unfortunate that they are shared code between various bus implementations. Ideally we would leave the MODULE_DEPEND() calls in the debugfs.c file instead of adding extra #ifdef guards to the bus attachment files. Turn debugfs support on for mt76(core) and the mt7921 module for now. Sponsonred by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Merge commit '026e5b88eb0cde54d9fc22b9a1ebc79ea0f67aec'
debug: classified in
03-filenames_plain1 by
'contrib/'
Merge commit '3750aed65c1f5a610b44d29c92236ca119b62780'
debug: classified in
03-filenames_plain1 by
'contrib/'
This duplicates 009d92b25f7c from mt7921 which has the full description. Sponsored by: The FreeBSD Foundation MFC after: 3 days
debug: classified in
03-filenames_plain1 by
'sys/contrib'
Since these files were a direct commit, I don't have to fix the vendor branch. Remove the DOS line endings. It doesn't matter one way or another, but we should be consistent within the tree. Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/contrib'
These are needed for memdisk support, so import them separately. These are from 202502, like all the other files here. Sponsored by: Netflix
debug: classified in
03-filenames_plain1 by
'sys/contrib'
In terminate_with_diagnostics the cast_to arguments were swapped, so it always failed. The diagnostic handler produced output like "Terminating due to uncaught exception 0x24891e08000 of type std::runtime_error". Now, e->what() will actually be included in the output, e.g. "Terminating due to uncaught exception 0x2bba49208000 'Model file doesn't exist' of type std::runtime_error". Reviewed by: dim Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57822
debug: classified in
03-filenames_plain1 by
'contrib/'
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_2/expat/Changes Security: CVE-2026-50219 Security: CVE-2026-56131 Security: CVE-2026-56132 Security: CVE-2026-56403 Security: CVE-2026-56404 Security: CVE-2026-56405 Security: CVE-2026-56406 Security: CVE-2026-56407 Security: CVE-2026-56408 Security: CVE-2026-56409 Security: CVE-2026-56410 Security: CVE-2026-56411 Security: CVE-2026-56412 MFC after: 1 week
debug: classified in
05-summary-prefix by 'contrib/'
dt_print_sym() fills the symbol string via snprintf() in non-oformat mode but the guarding `dtp->dt_oformat != 0 &&` for the dt_printf() call causes the symbol is computed but never emitted. This fixes tests: - common.profile-n.t_dtrace_contrib.tst_sym_ksh - common.profile-n.t_dtrace_contrib.tst_func_ksh Reviewed by: markj Fixes: https://cgit.freebsd.org/src/commit/?id=93f27766a7e1 ("dtrace: Add the 'oformat' libdtrace option") MFC after: 3 days Event: Halifax Hackathon 202606 Location: Room 208, Computer Science Building, Dalhousie University Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57895
debug: classified in
03-filenames_plain1 by
'cddl/contrib/'
Merge upstream change d9f6b1a2d292 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296305 MFC after: 1 week
debug: classified in
03-filenames_plain1 by
'contrib/'
Based on a report by Nick Wellnhofer. Approved by: so Security: FreeBSD-SA-26:49.iconv Reviewed by: markj, kevans Differential Revision: https://reviews.freebsd.org/D57948
debug: classified in
03-filenames_plain1 by
'contrib/'
In the ISO2022-CN encoding, characters may require at least seven bytes, and MB_LEN_MAX==6 is insufficient. From code inspection, _ISO2022_sputwchar() can emit 10 bytes in the worst case, so use that to size buffers. Add a regression test. Approved by: so Security: FreeBSD-SA-26:49.iconv Security: CVE-2026-58082 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57950
debug: Commit manually moved from "unknown" to "contrib".
The logic of clearing local address at the protocol level makes sense. It is feature of UDP, not of any protocol, that local address is cleared on disconnect. This code can be tracked down to pre-FreeBSD times. For example, for TCP we want a disconnected socket to return previously used local address with getsockname(2). The TCP has successfully evaded that by not calling in_pcbdisconnect() and calling in_pcbdetach() in the very old code and in_pcbdrop() later. After D55661 TCP again has this potential bug masked. Better make it right than rely on such unintentional evasions. The raw IP sockets don't use in_pcbdisconnect(), but they are going to in the near future. If in_pcbdisconnect() clears local address for them, that would be a larger bug than just getsockname(). A raw socket may be bound with bind(2) and then connect(2)ed, and then disconnected, e.g. connect(INADDR_ANY). And when we run raw IP socket through in_pcbdisconnect() we don't want to lose local address. This reverts D38362. This reverts commit 2589ec0f365777faacf36bd1eb24706538836b17. Reviewed by: rrs, markj Differential Revision: https://reviews.freebsd.org/D56170
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This should no longer be necessary after 2018ae4e3b6a. This reverts commit cfe0b7d37e552d78762c029f5b15e0f36d9d0d38.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
sound: Remove some forward declarations from sound.h and uaudio.h Sponsored by: The FreeBSD Foundation MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "sound: Remove some forward declarations from sound.h and uaudio.h" This reverts commit 602249f033d146d9c731d8b1cb4b2e0899c61ad9.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Import tzdata 2026b
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "Import tzdata 2026b" This reverts commit 5417f0bbde91c148b3c3982eb2ab23a675b5e8d1.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
speaker(4): move static data to bss Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "speaker(4): move static data to bss" This reverts commit 690ef95b3354ac7a80aa469fa7a8f15f07962f83. The commit message was wrong.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
nda: Filter non-storage nvme drives Non-stroage drives have namespaces, but no storage attached. These drives have a different interface type than storage drives, so ignore them for the nvme_sim, which just handles storage. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56461
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "nda: Filter non-storage nvme drives" This reverts commit b40205855e100a4bd95f89e97c15d268ef5b3a35. There's an aparent path lifetime issue in it that needs to be investigated. Sponsored by: Netflix
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
imgact_elf: Fix uninitialized variable use in note_procstat_auxv Found building with latest clang MFC after: 3 days
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "imgact_elf: Fix uninitialized variable use in note_procstat_auxv" This reverts commit 753a166bdeb3aeba02fd9678e7360f0929007368. It appears to be unnecessary now.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts" This reverts commit caf0ccccc304e3e7938c9722f1deb0a362fd70d5, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: install headers that were reintroduced by reverts" This reverts commit 8ad38d5eb3985ef778a7d36093878b0b373ccedf, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: don't remove headers that were reintroduced by reverts" This reverts commit 2b3703a4f4519e202c3bdf12e7e13d9b5fdbc3f3, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:" This reverts commit fd17362f6225085e60eabed8af7421838100b457, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e:" This reverts commit a7455c47801ea1e4c4eed10cab2072375f6f92a2, in preparation for merging llvm 21, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:" This reverts commit 267fa9ab814c23ca97b8b7e1740f4da51485ac72, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed:" This reverts commit f7570f1eb0dc056dfce9d7500157538c670edaf6, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455:" This reverts commit cab3680acf8e6ea40c686d4f26db4429e26a5331, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc:" This reverts commit f12b6acbe1ea1c425c0e21d80097115e4ad33017, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:" This reverts commit 198b947ebc6834eade6acc52c5441a38693b8822, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:" This reverts commit 2facc097b9b28a81b925c924f27f09b40f29fd4d, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5:" This reverts commit 6933315cf57fc3f505431bff7a0075df471d7453, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libcxx-compat: revert llvmorg-19-init-18063-g561246e90282:" This reverts commit 1d99ada3215dbc28665fe051f9ccf028a2a02ce8, in preparation for merging llvm 21. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292067 MFC after: 1 month
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables Describe how the LoaderEnv and NextLoaderEnv variables can be used. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293054 Reviewed by: imp Sponsored by: Wiesbaden Hackathon 202604 Differential Revision: https://reviews.freebsd.org/D56633
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables" This reverts commit cf7d4b04e9ae890f2a0f5811234e926f75a0c237. I attributed the wrong author of the patch.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Vendor import of smart at 1.0.2 smart/diskhealth is a command line application to monitor disk health from a storage device via SMART. Reviewed by: fuz, jrm Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56638
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "Vendor import of smart at 1.0.2" This reverts commit 68e5b71517e947b4e3f349c970af362b47b45f27.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
build: provide a FORTIFY_SOURCE.<src file> override For native files we can do more minimal fixes to avoid this large of a hammer, but for third party files it may not be worth the effort to try and patch them. NetBSD has the original _FORTIFY_SOURCE implementation that ours is based on, for instance, but tests sourced from there can't do an __ssp_real(foo) without being certain that `foo` actually has a fortified definition. This change does always define _FORTIFY_SOURCE as a result, so gate it on CFLAGS not already containing _FORTIFY_SOURCE definitions. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56733
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "build: provide a FORTIFY_SOURCE.<src file> override" This reverts commit c46a0b590716144d772eeba83ca88d96ee12c2f1. It broke the build and I'm not awake yet.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
After base 966fb94cb357, this revert is no longer necessary: stdint.h will unconditionally define macros such as `SIZE_MAX`, `UINT64_C`, and others. Submitted by: Nikolas Klauser <nikolasklauser@berlin.de> MFC after: 1 month Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56746
debug: Commit manually moved from "unknown" to "reverts".
sys/vnode.h: remove stale comment The source sweep is not going to happen. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56611
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert erronously pushed series of commits, which should not be. Sorry for the mess. Revert "sys/vnode.h: remove stale comment" This reverts commit f193f5a749b696e6c05fa2c47c24522b1624b1a7. Revert "vfs: convert VFS_OPs from macros to static inlines" This reverts commit 48bf024f2ef5afeba3500bd92a04283370479edf. Revert "vnode: add VIRF_KNOTE flag" This reverts commit 7fe74a02764e5899b10cdc45ab34182b961d5d19. Revert "vfs: convert vfs_op_thread_* macros to static inlines" This reverts commit a61a696e78a967b149a6e39b1f98ada26217a6bb. Revert "struct vnode: assign v_rl.resv1 as v_vrflag" This reverts commit d990e8f0e9478194569ba28c366b0c0c0f414e7b. Revert "sys/rangelock.h: explicitly enumerate padding at the end of the structure" This reverts commit a770638ecf16515d8922111c3fdd417aba6c045e. Revert "bufspace_wait(): only try to help bufdaemon if there is a chance to help" This reverts commit 067cfac2e7bd9dc857fb6cc504c01b0249bcd1b7. Revert "Add O_SYMLINK emulation" This reverts commit f9458655e78f6532e962a13d28d6a6086b4156de. Revert "libc: add freadlink(3)" This reverts commit ae6a13deb8e33a52188643e09171207e1d7171e8. Revert "Add O_SYMLINK emulation" This reverts commit 2213820b6f4cd22bbfdc0f45741c3e7d17ae82c0.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit b5bad6df467cc95bea641afe674c55cd5b9f1510. Revert until we can fix reported issues
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit c16c95192f01237a876eb7bc336e3bbda9310171. Revert until we can fix reported issues
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libusb: change callback register handler to int libusb upstream uses int for register handler. This causes some library user (like pyusb) to assume that we have int in all implementations and therefore provides a 4 byte storage only. This causes Segmentation fault as we will right the pointer. Reviewed by: adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54211
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libusb: change callback register handler to int" This reverts commit ce9ced951a0b9d004a3b007d4ac6e9087a1301a2. We should handle backward compatibility before introducing this patch as people may rely on old ABI.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit de2ea5423cc63b62e7e42d11b667aa634109fc28 which is no longer needed after 1dddb580f950 . Tested by: mmel
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Per [siva@'s comment on the PR][1], this testcase now passes cleanly in CI. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274941 MFC after: 1 week [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274941#c6 This reverts commit 86e87c3bd1b377242aafe7e2222ae17ca0be96d9.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit ce33f96fcf2f2d0d49c406274bcc64df72fe530e. It turns out that doing it this way did indeed prevent backwards movement of timestamps, however it also lead to an ever increasing error, eventually yielding timestamps hundreds or thousands of seconds in the future. Back this out until we can come up with a solution that prevents backards timestamps and also avoids accumulating error. Sponsored by: Netflix
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit 0a19464bf7afa35ce2aa7649152bc3a7629faa98. It's incorrect for ahci attachments. Reverting to merge to stable/15 to merge to releng/15.1 for the release. Sponsored by: Netflix
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
asmc: fix asmc_key_dump() page fault on T2 MMIO backend asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ, asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL (MMIO backend is used instead), causing a page fault when ASMC_DEBUG triggers asmc_dumpall() during attach. Add an MMIO guard at the top of asmc_key_dump(): delegate to asmc_key_dump_by_index() + asmc_key_read() for MMIO devices, consistent with the rest of the T2 code paths. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56748
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "asmc: fix asmc_key_dump() page fault on T2 MMIO backend" This reverts commit 3abc07947c14f5c30e5328d56a2da8dbf8412ebf. I'm not sure how this built locally for me but obviously failed in CI; I'll go figure that out with the submitter and come back.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit 2fe37927d41990abe8d1c336e75fd75873285e90. This turns out to have been misguided. First, clearing the hash results in all loopback ip/ip6 traffic being hashed to the netisr queue associated with the if_index of the loopback interface. Eg, it bottlenecks loopback traffic. When the hash is kept, traffic is spread evenly among netisrs. Also, it is safe to keep the hash here. The clearing was only needed when RSS core selection is enabled; we only enabled the consistent hashing parts of RSS globally, not the cpuid mapping stuff. So there is no need to clear it. Reviewed by: glebius Sponsored by: Netflix
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
import ldns 1.8.3 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "import ldns 1.8.3" Pre-push rebase bungled the metadata This reverts commit 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
import ldns 1.9.0 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "import ldns 1.9.0" Pre-push rebase bungled the metadata This reverts commit 597a090ff2ab868242e4ec1cdec7469edbe41c50.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Dag-Erling Smørgrav does not like this, but I do not understand why. This reverts commit 1df431576f99c3cc26dd4ceb1a6eda864cc9f196.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
edk2: enable static asserts for *INT64 alignment The ia32 loader is now built with -malign-double, so these should pass. Differential Revision: https://reviews.freebsd.org/D55386
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "edk2: enable static asserts for *INT64 alignment" This fails when using WITH_BEARSSL. It seems like we build the EFI bits of libsecureboot (which is really just part of libsa in this case), even when building the BIOS loader. Revert for now to unbreak the build. This reverts commit 2fa4bdd7f9e99698a6652db405c3165fdcd41c1d. Reported by: freebsd@walstatt-de.de
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
assert.h: Remove leading tabs for whitespace consistency Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
assert.h: Revert "Remove leading tabs for whitespace consistency" This reverts commit 157c184689ea3d7b8b6bd89aff849e94f004aa0e. As per style(9), a tab goes after #define. This should not have been removed. Reported by: kib Fixes: https://cgit.freebsd.org/src/commit/?id=157c184689ea3d7b8b6bd89aff849e94f004aa0e. Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
defaultroute: Fix dual-stack and IPv6-only handling Since IPv6-only setups are becoming more common, and IPv6 connectivity is often sufficient for tasks such as DNS resolution and NTP time synchronization, update defaultroute rc.d script to support IPv6-only environments. Reviewed by: pouria, ae Differential Revision: https://reviews.freebsd.org/D56797
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "defaultroute: Fix dual-stack and IPv6-only handling" This reverts commit 5b5a836e72ec2614def23409674822c907cf3740. Despite using arcpatch for this commit, I attributed the wrong author of the patch.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc: Constify the getcap API MFC after: 1 week Inspired by: NetBSD Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57252
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc: Constify the getcap API" This broke cross-building on Linux and macOS. This reverts commit 823d00b2d447247f1c5860e3bbc61f6fd19a70e5.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
improve renice user error messages Improve error handling for invalid user names and UIDs in renice: - Use warnx() and err() for consistent error reporting - Set errno = EINVAL for invalid input - Provide clearer error messages for invalid user names and UIDs - Add test cases for invalid user input Signed-off-by: androvonx95 <androvonx95@tutamail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1768
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "improve renice user error messages" This reverts commit 925f53682469ea12c017b48114b16e8f1627fb0b. The tests are wrong, so I'm reverting and reopening the pull request.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
It broke the test suite, and will be recommitted when fixed. This reverts commit db887713de2bf5c77494220a9e0ddfa7d4290155. Reported by: markj
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit 7a289fe3cd5c6de7ddbe394b7700b20b0bafdb3e. Hopefully, commit fc7993cf2d6d has fixed the underlying problem reported by PR#289734, so I am reverting this temporary work-around. I will delay MFC'ng this for a while, to see if the problem occurs again. MFC after: 3 months
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
fts: refactor to use fd-relative operations internally Replace all _open() calls with _openat() in __fts_open(), fts_read(), and fts_children(). Add fts_dirfd to FTSENT. Callers can use openat(ent->fts_dirfd, ent->fts_name, ...) to access files safely without relying on fts_accpath, which enables: 1. Capsicum capability mode where path-based operations fail 2. Security-sensitive programs that avoid TOCTOU races Replace statfs(ent->fts_path) with _fstatfs(ent->fts_dirfd) in fts_ufslinks() when fts_dirfd is valid, falling back to statfs() for root-level entries where fts_dirfd is -1 This is a preparatory change for fts_openat() which will allow callers to provide a pre-opened directory fd, enabling fts(3) traversal inside Capsicum capability mode. Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers, jillest MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2278
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "fts: refactor to use fd-relative operations internally" This reverts commit e03ed9daeb49fffa1d16b8d00240c65e92650d01. The change to the size of struct FTSENT is breaking backwards compatibility for some binaries. Jitendra is working on a new version that will move the new field into a private struct. Reported by: bdrewery Fixes: https://cgit.freebsd.org/src/commit/?id=e03ed9daeb4 ("fts: refactor to use fd-relative operations") Sponsored by: ConnectWise
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
resolver(5): Overhaul * Modernize the markup * Describe the comment syntax * Drop obsolete advice * Capitalize sentences * Improve the language * Replace no_tld_query with no-tld-query; both are supported, but all the other multi-word options use hyphens rather than underscores. * Add missing ENVIRONMENT section * Redo the example MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "resolver(5): Overhaul" This reverts commit 066bef580b21bed9100c727045e1dbfdeb9bf1a9.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Drop Solaris 2 compatibility MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Drop Solaris 2 compatibility" This reverts commit b27e21f304f260d539288756c5bb85421a549d44.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Refactor the option parser Start the loop by finding the end of the option name, the name-value separator (if any), and the end of the option. Use those pointers to simplify matching the option name and parsing the option value. This means that: * We no longer accept trailing garbage in an option name or value. For instance, we would previously interpret “edns0123” as “edns0” and “timeout:3xyz” as “timeout:3”. This was actually quite lucky because we also failed to recognize the newline at the end of the option line as a whitespace character. * For options that take a numerical value, we would previously happily set a numerical option to a negative value and treat non-numerical arguments as 0, while a numerical argument that happened to exceed the maximum for the option would result in the option being set to its default value. Now, any failure to parse the argument, including overflow, results in the option being set to its default value. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Refactor the option parser" This reverts commit 40e10af6c6dc46d9c0835db3dc95368ce7d69b55.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Refactor the configuration parser This was previously all a single loop in res_init(), apart from option parsing which we cleaned up in a previous commit. Break it out into separate functions for reading the configuration line by line, setting the default domain, setting the search list, and adding a nameserver to the nameserver list. Sprinkle bounds checks and code comments all around. The sortlist code, which has been disabled for the past 20 years, will be dealt with in a separate commit. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Refactor the configuration parser" This reverts commit 9fd22951233219b5e9985575c1b3aaf3532961fd.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Reimplement the sortlist parser When we switched from the BIND4 resolver to the BIND9 resolver, the sortlist parser was inadvertently disabled, and nobody noticed. The sorting code remained enabled in the resolver, but there was no way to set a sort order. Reimplement the sortlist parser, but correctly, and update the documentation accordingly. The new parser accepts IPv4 and IPv6 addresses with or without a prefix length. Fixes: https://cgit.freebsd.org/src/commit/?id=5342d17f09a8 ("Update the resolver in libc to BIND9's one.") Relnotes: yes
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Reimplement the sortlist parser" This reverts commit 507ab02d751b4aaa7f35f30882299e9908448e53.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Add no-debug and no-rotate options These are simply the reverse of the debug and rotate options.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Add no-debug and no-rotate options" This reverts commit 61697e9cd5cccc367a38f9851efebad4d7c2bb65.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
resolv.h: Remove unused parts
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "resolv.h: Remove unused parts" This reverts commit 95978326cb326c69592c75323914bdc52ada0346.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Dead code and style cleanup
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Dead code and style cleanup" This reverts commit 5028a8489f54fcf0a96399059c14e28c6a69d159.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libfetch: Overhaul socket read / write * Make fetch_ssl_read() and fetch_ssl_write() behave more like read(2) and write(2), and drop fetch_socket_read() in favor of read(2). * Don't request POLLERR, it's implied. * Don't needlessly set errno, it's relatively costly. * Always check for EAGAIN from writev(2), otherwise we will abort on a short write instead of proceeding to poll(2). * Always check for EAGAIN from poll(2) even though it can't happen on FreeBSD; POSIX says it can, and it might in the future. * Rewrite fetch_read() and fetch_writev() to be more similar to each other. The main difference is that a partial read is treated as success while a partial write is treated as failure. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296316 MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libfetch: Overhaul socket read / write" This reverts commit 298f37a71ae6d9f2cb0c2abd4ff2887e81e0942c.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libfetch: Add read buffering Previously, we would read FTP control connection messages and HTTP reponse headers one character at a time. Now, we read as much as will fit in our buffer and look for a newline. If there is data left over, it will be reused by the next fetch_getln() call. This also requires the addition of a fetch_bufread() which takes the buffer into account, otherwise the start of the HTTP response body will be stuck in the buffer after we read the last line of the header. This should noticeably improve HTTP performance, especially for small transfers. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libfetch: Add read buffering" This reverts commit afb60498e0c9836a6e3a7efda8a51710e208a608.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libfetch: Apply timeout to connection attempts Mark the socket non-blocking before connecting and poll for completion, applying fetchTimeout if set. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libfetch: Apply timeout to connection attempts" This reverts commit d53af4112273f7b234a1cdd6694b3a7ca0aae0eb.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libfetch: Document fetchTimeout Document the global fetchTimeout variable, now that it works reliably. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libfetch: Document fetchTimeout" This reverts commit c83e9ee0ef3e6af982e6fd35afe420d460fa84b3.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
fetch: Stop setting an alarm Now that fetchTimeout works reliably, setting an alarm is not only no longer necessary but counterproductive, as it will trigger even if the connection is not actually stalled but merely slow. While here, improve the wording of the manual page's description of the various options for setting a timeout. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "fetch: Stop setting an alarm" This reverts commit 23380f3e6ac9334e85489f92f7f20b700ede3368.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libfetch: Make fetch_ref an inline Make fetch_ref() an inline and provide a fetch_deref(). MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libfetch: Make fetch_ref an inline" This reverts commit 672cb7320a2754788bddf5cd026721b6f70a0d30.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
libc/resolv: Export __res_conf_name Add a new global variable, __res_conf_name, which is initialized to _PATH_RESCONF and used in its place by res_init(). This allows test programs (and applications) to select a different configuration file to read instead of /etc/resolv.conf. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220610
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "libc/resolv: Export __res_conf_name" This reverts commit 702c24ccc0c208e9bc697e775abe47ff723e3012.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
pkgbasify: Add new utility The pkgbasify utility converts a system installed from distribution sets to packaged base by registering, without actually installing, a set of packages that corresponds to what is already installed. MFC after: 1 week
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "pkgbasify: Add new utility" This reverts commit e6467516f584505ac29fd370966abd530a7b5454.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Retire dialog This is the last remaining piece of GPL software in the base system. The installer transitioned to bsddialog four years ago, and the last remaining dialog consumer, dpv, was turned off more than two years ago. Retire dpv, libdpv, libfigpar (used only by dpv), and dialog itself. (cherry picked from commit 73bb4a92985d747462d866248c1e7623f7ff1a7f)
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "Retire dialog" This reverts commit 5b2bdadeb6c25c10dac9722fd66a668e14d3b384.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Retire the GNU subtree With GNU diff and cdialog gone, this is now an empty shell. (cherry picked from commit 151dd62e005119dda24b8ff9b14aa5beaaa681ac)
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
Revert "Retire the GNU subtree" This reverts commit 9cc87ca23d9ccae814bea514aa4bdc791f2d6e46.
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
This reverts commit 5b8c28adb829b50fb8ac065637fa99f717858bab. The commit message was wrong. Reported by: des
debug: classified in 00-reverts
by 'This reverts commit
\b([0-9a-fA-F]{40})\b'
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-07-06 18:01:19+00:00.
This work is supported by Tarsnap Backup Inc.
Alternate version: 2026-04-01 (release)