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
ptrace: clear TDP_USERWR after transparent attach only on attach
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 at gmail.com>
Fixes: 99976934274de6fa19f049a0b6eac10856710f96
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56928
bsdinstall: do pkgbase installations with the "script" command
"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.
PR: 290375
Sponsored by: ConnectWise
Reviewed by: ziaee, ivy, jduran
Differential Revision: https://reviews.freebsd.org/D56717
(cherry picked from commit dc14ae4217a0babb1240f813b642edc2d7b955a6)
bq_insert: delay the BUF_UNLOCK if not bd_flush()ing
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
Make "make update-packages" idempotent
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: 295085
Reviewed by: ivy, emaste
Differential Revision: https://reviews.freebsd.org/D56872
(cherry picked from commit bd1e789b8452a8c2f166a3b4defb95330c71dadd)
Fix LOCAL_PEERCRED in 32-bit compat mode
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: 294833
Sponsored by: ConnectWise
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D56675
(cherry picked from commit 1d24638d3e8875e4b99a4b5e39f4241e37221b3d)
arm64/vmm: Enforce a data barrier before tlbi for non-VHE
Exception entry does not include an implicit, architectural data
barrier.
Reported by: Ben Simner <ben.simner at cl.cam.ac.uk>
Reviewed by: andrew
Fixes: 5577bb2f67ff ("arm64/vmm: Support tlbi from VHE")
Differential Revision: https://reviews.freebsd.org/D56855
mandoc: Updating FreeBSD thead library descriptions
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
sys: Fix heap disclosure in compat7 kern.proc.filedesc sysctl
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
(cherry picked from commit e68433e1990d5f1bcc1bdd270d65f1e4792a8e1b)