i386: Fix build and remove empty unused macro
When inlining the macro, reg was not substituted with the %ecx argument
previously passed in. One of the definitions was also left behind as an
empty macro.
PR: 292883
Fixes: 377c053a43f3 ("cpu_switch(): unconditionally wait on the blocked mutex transient")
MFC after: 1 week
sdt: Use the "cc" operand modifier for the address of probes for GCC 15+
This is required for GCC on RISC-V. The GCC 15 docs claim that "cc" is
similar to "c" except that it "tries harder".
NB: I have not yet found a way to make the DTrace probes compile on
RISC-V with older versions of GCC.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54964
heimdal: Pass the correct pointer to realloc when growing a string buffer
The realloc in my_fgetln was trying to grow the pointer to the string
buffer, not the string buffer itself.
In function 'my_fgetln',
inlined from 'mit_prop_dump' at crypto/heimdal/kdc/mit_dump.c:156:19:
crypto/heimdal/kdc/mit_dump.c:119:13: error: 'realloc' called on unallocated object 'line' [-Werror=free-nonheap-object]
119 | n = realloc(buf, *sz + (*sz >> 1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/heimdal/kdc/mit_dump.c: In function 'mit_prop_dump':
crypto/heimdal/kdc/mit_dump.c:139:11: note: declared here
139 | char *line = NULL;
| ^~~~
Reviewed by: rmacklem, cy
Fixes: a93e1b731ae4 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision: https://reviews.freebsd.org/D54933
smartpqi: Update to vendor version 14.4690.0.2008 - 15.2.0.2008
Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008
Included in this update are:
- Support for new controllers
- Add code that utilizes the new BIG_IOCTL_Command_struct and allows
the I/O buffer size for a single passthrough ioctl to be stored as a
32 bit integer instead of the original 16 bit integer.
- Update occurrences of Microsemi to Microchip
- Some format changes including converting comments from C++ to C
style, remove instances of /* $FreeBSD$ */, and updating copyright
dates.
Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008
[22 lines not shown]
ip6_mroute: Remove an unhelpful comment
ifnets already track if_allmulti() calls in the if_amcount field. That
field is older than the comment, so I'm not exactly sure what the intent
was; let's just remove it.
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
socket.2: Cross-reference netintro(4)
netintro(4) is a great manual page that provides a basic introduction to
network facilities, I think it is well worth mentioning in the
socket(2).
I also think we can incorporate this reference somewhere in the text as
well, but I'm not sure, maybe the reference in the SEE ALSO section
would be enough.
Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55032
atf_python: Run vnet handlers in $HOME
When kyua runs a test, it creates a temp directory and sets $HOME to
point to it. Tests are run with the cwd set to that temp directory.
When a process attaches to a jail, its cwd is set to the root of the
jail. Modify atf_python to cd to $HOME instead, so that it's easier for
tests to share files.
Reviewed by: zlei, ngie
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54971
ip6_mroute: Make MF6CFIND a regular function
This is more natural and corresponds more closely to the v4 multicast
routing code. No functional change intended.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54983
ip_mroute: Make privilege checking more consistent
- The v6 socket option and ioctl handlers had no privilege checks at
all. The socket options, I believe, can only be reached via a raw
socket, but a jailed root user with a raw socket shouldn't be able to
configure multicast routing in a non-VNET jail. The ioctls can only
be used to fetch stats.
- Delete a bogus comment in X_mrt_ioctl(), one can issue multicast
routing ioctls against any socket. Note that the call path is
soo_ioctl()->rtioctl_fib()->mrt_ioctl().
I think all of the mroute privilege checks should be done within the
ip(6)_mroute code, but let's first make the v4 and v6 modules
consistent.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54982
libc: Fix missing include
Although not needed on FreeBSD due to namespace pollution, we should
technically #include <stddef.h> to secure a definition of NULL.
Fixes: 5074d5c9845e ("libc: Improve POSIX conformance of dirfd()")
libc: Improve POSIX conformance of dirfd()
POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream. Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55025
nvmecontrol: telemetry-log don't sanity check host generation number
Don't sanity check the host initiated generation number. It's not
necessarily constant between the two log page fetches. nvme-cli doesn't
do this stanity check and it generates a lot of false positives.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D55018
nvmecontrol: telemetry-log --verbose
Add -v / --verbose to report status report since these things can take
minutes to retrieve.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D55019
nvmecontrol: Always set the RAE bit on telemetry-log requests
nvme-cli, as well as some vendor scripts, always set the RAE bit of the
GET LOG PAGE request when retrieving telemetry logs to avoid the log
getting reset to something new. Adopt that praactice here (nvme-cli
telemetry-log does have a --rae option, but that just turns on the rae
bit which defaults to being on: there's no way to turn it off).
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D55017
e1000: Fix setting the promiscuous mode
The variable reg_rctl stores the value read from reg E1000_RCTL. It
may contain bits E1000_RCTL_VFE and E1000_RCTL_CFIEN which control
VLAN hardware filter feature. The promiscuous mode implies all tagged
or untagged packets should be accepted, so the VLAN hardware filter
feature should be disabled when enabling the promiscuous mode.
Calling em_if_vlan_filter_disable() did the task, but later writing
the value of reg_rctl back to the reg E1000_RCTL may restore the
feature.
Move the calling of em_if_vlan_filter_disable() after writing the reg
to fix that.
PR: 292759
Reviewed by: kbowling
Tested by: vova at zote.me
Fixes: 2796f7cab107 e1000: Fix up HW vlan ops
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54973
bcmp(3): update manpage to following the Posix Standard
Reviewed by: glebius
Approved by: glebius (mentor)
Differential Revision: https://reviews.freebsd.org/D52980
pkgbase-stage.lua: Add '*-jail-dbg' variant to dvd1
- Add *-jail-dbg variant to dvd1 to match the non-jail variant;
- Remove assertion introduced in the previous commit for consistency with existing code.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1991