param.h: bump __FreeBSD_version for be1f7435ef218b
I meant to review the diff again to make sure that __FreeBSD_version had
not progressed in the interim, but failed to do so- belatedly bump it
for a struct ucred ABI change.
Fixes: be1f7435ef21 ("kern: start tracking cr_gid outside of [...]")
kern: start tracking cr_gid outside of cr_groups[]
This is the (mostly) kernel side of de-conflating cr_gid and the
supplemental groups. The pre-existing behavior for getgroups() and
setgroups() is retained to keep the user <-> kernel boundary
functionally the same while we audit use of these syscalls, but we can
remove a lot of the internal special-casing just by reorganizing ucred
like this.
struct xucred has been altered because the cr_gid macro becomes
problematic if ucred has a real cr_gid member but xucred does not. Most
notably, they both also have cr_groups[] members, so the definition
means that we could easily have situations where we end up using the
first supplemental group as the egid in some places. We really can't
change the ABI of xucred, so instead we alias the first member to the
`cr_gid` name and maintain the status quo.
This also fixes the Linux setgroups(2)/getgroups(2) implementation to
more cleanly preserve the group set, now that we don't need to special
[17 lines not shown]
loader: add nvidia modules to the loader blacklist
It is known that nvidia modules, like the drm modules that are already
present, will panic if loaded in early boot rather than later. Pop them
into our list to deny loading them if someone were to add, e.g.,
nvidia-modeset_load="YES", to their loader.conf. This doesn't prevent
them from being loaded if one drops to the loader prompt, but it does
prevent the standard user from easy foot-shooting if they find old or
inaccurate information out in the wild.
Reviewed by: imp, kbowling
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D51644
qlnxe: Advertise the IFCAP_HWSTATS capability
The hardware can count statistics and the driver has already retrieved
them via qlnx_get_counter().
Advertise the IFCAP_HWSTATS capability to avoid the net stack from
double counting IFCOUNTER_IBYTES.
Reviewed by: kbowling
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51451
(cherry picked from commit 386960a8805edc6d5ac6bb6215ad102a83314549)
qlnxe: Fix advertising the IFCAP_LINKSTATE capability
The following up advertising of IFCAP_HWCSUM capability unconditionally
overwrite IFCAP_LINKSTATE.
Reviewed by: kbowling
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D51450
(cherry picked from commit c18860339d5051dea99cb5cee7e322ffa5dd2a81)
Revert "src.opts.mk: Default LLVM_ASSERTIONS off"
Enabling and disabling LLVM assertions changes the ABI. There have
been multiple reports on the freebsd-current@ mailing list of broken
'cc'.
Out of caution, you may wish to do a clean build while crossing this
commit after building the reverted commit if you do not set
LLVM_ASSERTIONS in your src.conf.
Discussed with: kevans, jrtc27
This reverts commit 9b3055d0d4bcbe665d3c622c761adcc7d0a5b1c9.
swapon: Improve tests for non-standard kernel page size and small media
Add a test to verify swapon's behavior when attaching to media that's too small.
This also adapts existing tests to accommodate kernel page sizes larger than
the default 4KB.
Approved by: kib, chs (previous version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51641
release, bsdinstall: include FreeBSD-kernel-man package
This package has been newly split off during man page reorganization and
should be considered part of the "base" component rather than being
ignored. Update pkgbase release and bsdinstall scripts for this change.
Reviewed by: ivy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51519
syslogd: Fix function return test
Looks like during the capsicum setup the return value for cap_syslogd
is checked twice rather than checking the return value of cap_net
after initializing the casper service.
Signed-off-by: Nathan Huff <nhuff at acm.org>
Fixes: 897240c7d666 ("syslogd: Enter capability mode")
Pull-request: https://github.com/freebsd/freebsd-src/pull/1796
ufs: change isrmdir type to bool or u_int as appropriate
Use bool for isrmdir argument to
ufs_dirremove()/softdep_setup_remove()/newdirrem(), where it is used as
bool.
Use u_int for isrmdir argument to
ufs_dirrewrite()/softdep_setup_directory_change()
where it is 0/1/ino. Without the change to unsigned, the
if (isrmdir > 1)
test is broken on volumes with many inodes.
Use newparent instead of isrmdir for the argument name in this case.
Reviewed by: markj, olce
Tested by: pho
Fixes: 610319c766e941de96e52f2d28fea9f8cfc51aeb
Fixes: 98eb6f0eaa50d8bd9a6794f0a9da2eddeae5bcd8
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51617
vt: Remove FONT specification from INDEX files
There is no reason to change the font in order to select a keymap or a
font.
This was done in the syscons(4) era to ensure that a font with the
appropriate character set was used for kbdmap or vidfont's localized
menu, but vt is always UTF-8 and this is no longer necessary.
PR: 235565
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51640
bsdinstall: Emit a warning if the system has too little memory
PR: 251993
Reviewed by: adrian
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50944
(cherry picked from commit eb5884c564ae0e37df1d8a3fc5704ab6b2fa07d0)
db/hash.c: Allow O_WRONLY in dbm_open
The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSIX.1 allows O_WRONLY in dbm_open and states
that the underlying file must be opened for both reading and writing.
Fix this by correcting the O_WRONLY check and moving it further into
the function to make sure that the original flags are stored in hashp.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D51514