Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge FreeBSD 2024-10-25 #2305

Merged
merged 433 commits into from
Jan 29, 2025
Merged
Changes from 1 commit
Commits
Show all changes
433 commits
Select commit Hold shift + click to select a range
8c8ebbb
bhyve ahci: Improve robustness of TRIM handling
bsdjhb Oct 24, 2024
f0bc751
csa: Use pci_find_device to simplify clkrun_hack
bsdjhb Oct 24, 2024
d96ba5a
config: Remove a stray semicolon
gmshake Oct 24, 2024
56b17de
makefs: Remove a stray semicolon
gmshake Oct 24, 2024
88b71d1
arm64: rockchip: Remove a stray semicolon
gmshake Oct 24, 2024
b4856b8
LinuxKPI: Remove stray semicolons
gmshake Oct 24, 2024
75ff908
enic: Remove a stray semicolon
gmshake Oct 24, 2024
6ccf4f4
mana: Remove stray semicolons
gmshake Oct 24, 2024
86a2c91
mpi3mr: Remove a stray semicolon
gmshake Oct 24, 2024
3675619
ocs_fc: Remove a stray semicolon
gmshake Oct 24, 2024
2f395cf
tcp cc: Remove a stray semicolon
gmshake Oct 24, 2024
f3a097d
netstat: switch to using the sysctl-exported stats for live stats
kevans91 Oct 24, 2024
656991b
locks: augment lock_class with lc_trylock method
glebius Oct 24, 2024
efcb2ec
callout: provide CALLOUT_TRYLOCK flag
glebius Oct 24, 2024
bffebc3
tcp: use CALLOUT_TRYLOCK for the TCP callout
glebius Oct 24, 2024
d021d3b
tcp: get rid of TDP_INTCPCALLOUT
glebius Oct 24, 2024
db08b0b
tmpfs_vnops: move swap work to swap_pager
Oct 24, 2024
ce5b536
sctp garbage collect sctp_update_ifn_mtu
tuexen Oct 24, 2024
a3a88aa
Fix buildworld with gcc 13 after llvm-19 import
DimitryAndric Oct 24, 2024
02e85d1
swap_pager: fix assert in seek_data
Oct 24, 2024
faa9356
swap_pager: fix seek_hole assert
Oct 24, 2024
23dee25
loader: Change this BIOS tradeoff: Add back zip and use text only
bsdimp Oct 25, 2024
358752a
loader/loader.mk: add docs for LOADER_*_SUPPORT variables
bsdimp Oct 25, 2024
3df1abd
Revise qsort(3 reflect POSIX.1-2024 update.
delphij Oct 25, 2024
43c0b59
sound: Remove redundant refcount checks in vchan_setnew()
christosmarg Oct 25, 2024
9a6cf27
sound: Retire channel refcount
christosmarg Oct 25, 2024
02478e6
sctp: further cleanup
tuexen Oct 25, 2024
a05620b
sctp: cleanup the addition of addresses which are already known
tuexen Oct 25, 2024
7d87559
git-arc: Make patch with reviewers more portable
jlduran Oct 25, 2024
3ab8697
git-arc: Do not echo unescaped literals to jq
jlduran Oct 25, 2024
a2c0d20
lib/libcrypt: use explicit_bzero() to clear sensitive buffers
clausecker Oct 10, 2024
cb5e41b
lib/libcrypt: unbundle hash functions
clausecker Oct 11, 2024
c611041
release: tweak Oracle Cloud settings
dch Oct 25, 2024
bc9e19d
Fix buildworld with gcc 12 after llvm-19 import
DimitryAndric Oct 25, 2024
3ceba58
Fix gcc uninitialized warning in FreeBSD zio_crypt.c
DimitryAndric Oct 25, 2024
72e15f7
libkldelf: add see_local parameter to elf_lookup_symbol
khng300 Oct 25, 2024
f11a9f1
pctrie: drop meaningless neighbor check
Oct 25, 2024
f86e328
p9fs: Fix whitespace in request tag handling functions
markjdb Oct 25, 2024
b9500cb
virtio_p9fs: Fix some style issues
markjdb Oct 25, 2024
fff5181
virtio_p9fs: Fix handling of a full request queue
markjdb Oct 25, 2024
1f6f247
virtio_p9fs: Check for completions after enabling interrupts
markjdb Oct 25, 2024
28c9b13
virtio_p9fs: Simplify vt9p_req_wait() a bit
markjdb Oct 25, 2024
d8cd2d0
depend-cleanup.sh: clean up after hash function removal from libcrypt
clausecker Oct 25, 2024
4b01a7f
Revert "intrng: change multi-interrupt root support type to enum"
kevans91 Oct 25, 2024
0d965bc
subr_pctrie: improve iter nbr search
Oct 25, 2024
2f3f867
ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2
cperciva Oct 22, 2024
bc0d10d
gpiobus: Make gpiobus_read_ivar extern
cperciva Oct 22, 2024
2d42199
acpi_gpiobus: Narrow scope of NOT_YET
cperciva Oct 22, 2024
9d585fc
absolute-symlink.sh: check for absolute symlinks on a FreeBSD system
wosch Oct 26, 2024
01a5af6
zstream: avoid absolute symlink
emaste Oct 21, 2024
52d895f
nfs: trivial typo fix
emaste Oct 8, 2024
f44029e
linker: Make linker.h more self-contained
markjdb Oct 26, 2024
39f6d1e
swap_pager: iter in haspage, lookup, getpages
Oct 26, 2024
87c2aab
lib/libcrypt: reinstate CFLAGS+=-I${SRCTOP}/sys/crypto/sha2
clausecker Oct 26, 2024
353484f
bus: Set the current VNET in device_attach()
markjdb Oct 19, 2024
bcf570a
RELNOTES: Add mididump(1)
christosmarg Oct 19, 2024
48dc0e9
mididump(1): Use LIBADD instead of LDFLAGS
christosmarg Oct 19, 2024
b42be64
mididump(1): Use nitems()
christosmarg Oct 19, 2024
fba72eb
stand: Fix defaults file
bsdimp Oct 19, 2024
b95dc3e
membarrier: man page improvements
emaste Oct 9, 2024
d1883bf
vm_glue: use vm_page_alloc_domain_after
Oct 19, 2024
fc58f4b
tests/sys/fs/fusefs: include iomanip header
ngie-eign Oct 19, 2024
1586bd2
contrib/googletest: update from 1.14.0 to 1.15.2
ngie-eign Oct 20, 2024
7e526ad
libarchive: merge from vendor branch
mmatuska Oct 20, 2024
66c6f99
ifconfig: Fix wrong indentation for the status of pfsync(4)
gmshake Oct 20, 2024
ad7583c
cdefs: Use __has_feature to gate the definition of __nosanitize*
markjdb Oct 19, 2024
70ddbf6
Revert "Reapply "sbin/ping: allow normal users to specify larger pack…
markjdb Oct 20, 2024
96e68df
la57: explain how the trampoline works
kostikbel Oct 20, 2024
882ce77
zfs: merge openzfs/zfs@b2f6de7b5
mmatuska Oct 20, 2024
85358f9
git subrepo pull --force sys/contrib/subrepo-openzfs
bsdjhb Jan 28, 2025
75be80c
mk: add PLAIN_TESTS_PORCH support
kevans91 Oct 21, 2024
5262380
tests: kern: add some porch(1)-based tty tests
kevans91 Oct 21, 2024
0467143
subr_pctrie: fix a comment
Oct 21, 2024
9ff4ea4
mkuzip: drop support for executable uzip images
rob-wing Oct 21, 2024
1f69460
linux: support IUTF8
trasz Oct 9, 2024
faefe4d
Give usbdump a '-u' option for unbuffered output.
bsdphk Oct 21, 2024
05a0b40
arm64: Remove VPIPT I-cache support from pmap
zxombie Oct 18, 2024
38896b3
arm64: Remove old I-Cache types
zxombie Oct 18, 2024
6c542be
arm64: Add ID register field width values
zxombie Oct 18, 2024
b7b60d7
arm64: Support non-4 bit ID reg fields
zxombie Oct 18, 2024
5c81772
arm64: Add MRS_SAFE to hold a safe ID field value
zxombie Oct 18, 2024
4695e09
arm64: Use a bit to hold userspace ID reg exports
zxombie Oct 18, 2024
fcc7034
arm64: Support more ID register field types
zxombie Oct 18, 2024
9fb5446
arm64: Handle RES1 ID register fields
zxombie Oct 18, 2024
3d6f4ef
arm64: Decode CTR_EL0 via a table
zxombie Oct 18, 2024
29ca250
arm64: Use register types to build kernel ID regs
zxombie Oct 18, 2024
efa8359
arm64: Update how we handle SpecSEI
zxombie Oct 18, 2024
39e7c94
arm64: Remove a duplicated include
zxombie Oct 18, 2024
20e5fc8
arm64: write PID in CONTEXTIDR_EL1 on ctx switch
zdleaf Jul 31, 2024
b8bb65f
.github: Use the two most recent LTS releases
zxombie Aug 29, 2024
ed06c6e
.github: Update the clang release used for macos
zxombie Aug 29, 2024
ef9f426
libarchive: backport PR #2386 (fixes output of one test)
mmatuska Oct 21, 2024
558d97f
vm_object: Assert that managed pages are on pagequeues when freeing
markjdb Oct 21, 2024
a9b3539
cpufreq: Use a real device_probe routine
bsdjhb Oct 21, 2024
fbe3941
legacy cpu: Add proper device_probe and device_attach routines
bsdjhb Oct 21, 2024
7950236
Use bus_delayed_attach_children instead of its inline implementation
bsdjhb Oct 21, 2024
887ef89
ctl_report_supported_opcodes: Handle invalid requested service action
bsdjhb Oct 21, 2024
e3b9e52
rc.d/sendmail: Return non-zero if the daemon fails to start or is not…
0mp Oct 21, 2024
0209be4
nfsd: Fix handling of credentials with cr_ngroups == 0
Oct 21, 2024
b7ea121
ifnet: Assert that we are assigning network stack correctly
gmshake Oct 22, 2024
659bdb2
bhyve: don't crash when guest writes TPM int_enable register
hrosenfeld Sep 9, 2024
1de1992
bhyve: TPM CRB: pass actual TPM request length to backend execute_cmd()
hrosenfeld Sep 9, 2024
79a6d19
bhyve: TPM 2.0 emulation with swtpm
hrosenfeld Sep 9, 2024
1e1ea9e
bhyve: merge adjacent E820 entries
ckoehne Dec 19, 2023
4b0db9a
vm_object: Report laundry pages in kinfo_vmobject
markjdb Oct 22, 2024
4808864
vmstat: Add a column to vmstat -o output for laundry pages
markjdb Oct 22, 2024
90ef098
vm_meter: Fix laundry accounting
markjdb Oct 22, 2024
9c7ab17
ACPI: Implement power button on !x86
cperciva Oct 12, 2024
9d15755
da: Add comments about asc/ascq values
bsdimp Oct 22, 2024
442f49e
scsi: Make asc/ascq 44/0 fatal with ENXIO
bsdimp Oct 22, 2024
be009b0
sys: Add GPIO_INTR_EDGE_MASK define
cperciva Oct 22, 2024
07cb426
debug.sh add DebugAdd
sgerraty Oct 22, 2024
22c3109
Skipping merge of 8bc14f6ba937dc080b435ac519bed334a4f0b629
bsdjhb Jan 28, 2025
3066f00
sysent: regen for typo fix
brooksdavis Oct 22, 2024
ca655cd
DS3231: converstion -> conversion
brooksdavis Oct 22, 2024
ed2c71b
sys_capability.c: update the source of CAPENABLED
brooksdavis Oct 22, 2024
2ed43ed
acpidump: correct memcmp() result check
kostikbel Oct 22, 2024
a65a742
acpidump: use acpica definitions for devscope types in DMAR decoding
kostikbel Oct 20, 2024
0087133
vfs_subr: maintain sorted tailq
Oct 22, 2024
71e3de6
libcxxrt: Update to upstream 698997bfde1f
emaste Oct 22, 2024
7e836de
style.9: clarify FALLTHROUGH
emaste Oct 22, 2024
38b3222
LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
Sep 29, 2024
f09e79f
conf/NOTES: Remove trailing whitespace
lwhsu Oct 23, 2024
e8a4a56
LINT: Add mac_do
lwhsu Oct 23, 2024
d0e8fbc
Revert "LINT: Add mac_do"
lwhsu Oct 23, 2024
3e9c422
libc: fix access mode tests in fmemopen(3)
emaste Oct 23, 2024
3443cc2
libc: Add one more check in new fmemopen test
emaste Oct 23, 2024
5e9df95
Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0
DimitryAndric Jul 27, 2024
f4ae40f
ObsoleteFiles.inc: Disable libc++ 18 -> 19 entries
bsdjhb Jan 28, 2025
a4bc9a9
libcompiler_rt: Omit a new file in LLVM 19
bsdjhb Jan 28, 2025
165c981
Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2
DimitryAndric Jul 30, 2024
e60c53c
Tentatively apply https://github.com/llvm/llvm-project/pull/101403
DimitryAndric Jul 31, 2024
173ee4d
bsd.sys.mk: for clang >= 19, similar to gcc >= 8.1, turn off -Werror for
DimitryAndric Jul 30, 2024
a8d3227
Fix enum warning in ath_hal's ar9002
DimitryAndric Jul 31, 2024
83019a2
libcxx simd_utils.h: only enable _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS for
DimitryAndric Aug 5, 2024
ae7e8aa
libcxx atomic_ref.h: add typename keyword for difference_type
DimitryAndric Aug 5, 2024
36f068a
libcxx cstdlib, cwchar: avoid using long long functions if not
DimitryAndric Aug 5, 2024
257ab36
libcxx-compat: revert llvmorg-19-init-18063-g561246e90282:
DimitryAndric Aug 5, 2024
d405147
libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5:
DimitryAndric Aug 5, 2024
6f6bcef
libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:
DimitryAndric Aug 5, 2024
4d231c1
libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:
DimitryAndric Aug 5, 2024
2d3abd6
libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc:
DimitryAndric Aug 5, 2024
e510419
libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455:
DimitryAndric Aug 5, 2024
2171520
libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed:
DimitryAndric Aug 5, 2024
85fa225
libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:
DimitryAndric Aug 5, 2024
2dabc44
libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e:
DimitryAndric Aug 5, 2024
44f7d1c
libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:
DimitryAndric Aug 5, 2024
0f7f815
libcxx-compat: don't remove headers that were reintroduced by reverts
DimitryAndric Aug 5, 2024
63caddc
libcxx-compat: install headers that were reintroduced by reverts
DimitryAndric Aug 5, 2024
9789e51
libcxx-compat: update libcxx.imp for headers that were reintroduced b…
DimitryAndric Aug 6, 2024
f564745
Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c
DimitryAndric Aug 6, 2024
148f4fd
Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8
DimitryAndric Aug 25, 2024
4ee6516
Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a
DimitryAndric Sep 4, 2024
f878fd8
Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser):
DimitryAndric Sep 11, 2024
751a06f
Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1
DimitryAndric Sep 22, 2024
ee5494d
Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349
DimitryAndric Oct 8, 2024
34d9fae
Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6
DimitryAndric Oct 21, 2024
30a6fd1
Bump __FreeBSD_version for llvm 19.1.2 merge
DimitryAndric Oct 23, 2024
ef6fe83
mlx5e: Immediately initialize TLS send tags
Oct 23, 2024
7d2b673
mlx5e: Use M_WAITOK when allocating TLS tags
Oct 23, 2024
7f33e35
DMAR: handle affinity for in-memory data structures
kostikbel Oct 22, 2024
fafd89a
acpidump(8): add const qualifier to the known tables array
kostikbel Oct 23, 2024
1f9b924
ncurses: Fix codegen for key names and codes
aokblast Oct 23, 2024
c0985f9
Canonicalize the name of the FreeBSD Foundation
lwhsu Oct 23, 2024
bef0832
linker: Handle a truncated hints file properly
markjdb Oct 23, 2024
29491ed
devmatch: Catch truncated linker hints files
markjdb Oct 23, 2024
d5eb10c
mixer: Fix a bogus free() call in the main loop
markjdb Oct 23, 2024
c715978
llvm19: permit incremental builds from llvm18
brooksdavis Oct 23, 2024
60530ff
swap_pager: move scan_all_shadowed, use iterators
Oct 24, 2024
dab414e
x86 specialreg.h: visually align %cr4 and MSR_EFER bit mask definitions
kostikbel Oct 23, 2024
c59cbd6
x86 specialreg.h: add all defined bits for %cr4
kostikbel Oct 23, 2024
b1572ce
x86 specialreg: reorder %cr3 bits masks definitions by value
kostikbel Oct 23, 2024
a26b85b
x86 specialreg: add bit masks definitions for LAM in %cr3
kostikbel Oct 23, 2024
5faa24d
x86 specialreg: add bit masks definitions for EFER features
kostikbel Oct 23, 2024
f759071
x86 specialreg: add bit masks definitions for LASS and LAM features
kostikbel Oct 23, 2024
5dcda12
net: route: convert routing statistics to a sysctl
kevans91 Oct 24, 2024
23fefe5
e1000: Move I219 LM19/V19 to ADL
kev009 Oct 24, 2024
0ee67c5
arm{,64}: use genassym for INTR_ROOT_* values
ehem Oct 24, 2024
ea6c016
intrng: change multi-interrupt root support type to enum
ehem Oct 24, 2024
a265838
sys/intr.h: formally depend on machine/intr.h
kevans91 Oct 24, 2024
e083405
Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS
DimitryAndric Oct 24, 2024
3e1e9aa
Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG
DimitryAndric Oct 24, 2024
2a0812d
dev/gpio: Mask all pl011 interrupts
zxombie Oct 23, 2024
52eae9f
intrng: Store the IPI priority
zxombie Oct 23, 2024
5ec3ea2
arm64: Check TDP_NOFAULTING in a data abort
zxombie Oct 24, 2024
1666474
arm64: Don't enable interrupts when in a spinlock
zxombie Oct 24, 2024
1361939
arm64: Implement efi_rt_arch_call
zxombie Oct 24, 2024
39eb659
arm64: Enable handling EFI runtime service faults
zxombie Oct 24, 2024
c624ab2
sound: Call DSP_REGISTERED before PCM_DETACHING
christosmarg Oct 24, 2024
1502863
sound: Use DSP_REGISTERED in dsp_clone()
christosmarg Oct 24, 2024
c247623
sound: Change PCMDIR_* numbering
christosmarg Oct 24, 2024
612a71a
sound: Untangle dsp_cdevs[] and dsp_unit2name() confusion
christosmarg Oct 24, 2024
5e5f8ce
sound: Fix build error in chm_mkname() KASSERT
christosmarg Oct 24, 2024
04df576
sctp: improve debug output
tuexen Oct 24, 2024
e436d58
sctp: cleanup
tuexen Oct 24, 2024
2938d8c
bhyve ahci: Improve robustness of TRIM handling
bsdjhb Oct 24, 2024
1c720a0
csa: Use pci_find_device to simplify clkrun_hack
bsdjhb Oct 24, 2024
67717a9
config: Remove a stray semicolon
gmshake Oct 24, 2024
6b4745a
makefs: Remove a stray semicolon
gmshake Oct 24, 2024
3e8c7e9
arm64: rockchip: Remove a stray semicolon
gmshake Oct 24, 2024
91d1578
LinuxKPI: Remove stray semicolons
gmshake Oct 24, 2024
d9a649f
enic: Remove a stray semicolon
gmshake Oct 24, 2024
2510735
mana: Remove stray semicolons
gmshake Oct 24, 2024
0ca7931
mpi3mr: Remove a stray semicolon
gmshake Oct 24, 2024
f850b33
ocs_fc: Remove a stray semicolon
gmshake Oct 24, 2024
0b453c2
tcp cc: Remove a stray semicolon
gmshake Oct 24, 2024
12d93b3
netstat: switch to using the sysctl-exported stats for live stats
kevans91 Oct 24, 2024
f26098a
locks: augment lock_class with lc_trylock method
glebius Oct 24, 2024
ac3aa00
callout: provide CALLOUT_TRYLOCK flag
glebius Oct 24, 2024
f48d0a3
tcp: use CALLOUT_TRYLOCK for the TCP callout
glebius Oct 24, 2024
7603f36
tcp: get rid of TDP_INTCPCALLOUT
glebius Oct 24, 2024
aa0e0a8
tmpfs_vnops: move swap work to swap_pager
Oct 24, 2024
f7ad98a
sctp garbage collect sctp_update_ifn_mtu
tuexen Oct 24, 2024
17a4681
Fix buildworld with gcc 13 after llvm-19 import
DimitryAndric Oct 24, 2024
addddf4
swap_pager: fix assert in seek_data
Oct 24, 2024
23ea2ff
swap_pager: fix seek_hole assert
Oct 24, 2024
247eded
loader: Change this BIOS tradeoff: Add back zip and use text only
bsdimp Oct 25, 2024
92fa6c4
loader/loader.mk: add docs for LOADER_*_SUPPORT variables
bsdimp Oct 25, 2024
e4a35f1
Revise qsort(3 reflect POSIX.1-2024 update.
delphij Oct 25, 2024
ccde22e
sound: Remove redundant refcount checks in vchan_setnew()
christosmarg Oct 25, 2024
f91ff11
sound: Retire channel refcount
christosmarg Oct 25, 2024
c81b07d
git-arc: Make patch with reviewers more portable
jlduran Oct 25, 2024
612efe4
git-arc: Do not echo unescaped literals to jq
jlduran Oct 25, 2024
e542375
lib/libcrypt: use explicit_bzero() to clear sensitive buffers
clausecker Oct 10, 2024
4ca6f57
lib/libcrypt: unbundle hash functions
clausecker Oct 11, 2024
0869561
sctp: further cleanup
tuexen Oct 25, 2024
4d8ca72
sctp: cleanup the addition of addresses which are already known
tuexen Oct 25, 2024
c754191
release: tweak Oracle Cloud settings
dch Oct 25, 2024
022edc2
Fix buildworld with gcc 12 after llvm-19 import
DimitryAndric Oct 25, 2024
133777e
Fix gcc uninitialized warning in FreeBSD zio_crypt.c
DimitryAndric Oct 25, 2024
0060524
libkldelf: add see_local parameter to elf_lookup_symbol
khng300 Oct 25, 2024
984554e
pctrie: drop meaningless neighbor check
Oct 25, 2024
071a87b
p9fs: Fix whitespace in request tag handling functions
markjdb Oct 25, 2024
be6c5c8
virtio_p9fs: Fix some style issues
markjdb Oct 25, 2024
0fa978e
virtio_p9fs: Fix handling of a full request queue
markjdb Oct 25, 2024
af0f658
virtio_p9fs: Check for completions after enabling interrupts
markjdb Oct 25, 2024
8434cc3
virtio_p9fs: Simplify vt9p_req_wait() a bit
markjdb Oct 25, 2024
d50167e
depend-cleanup.sh: clean up after hash function removal from libcrypt
clausecker Oct 25, 2024
cd40bf4
Revert "intrng: change multi-interrupt root support type to enum"
kevans91 Oct 25, 2024
0d6bd3e
subr_pctrie: improve iter nbr search
Oct 25, 2024
0aa2f31
ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2
cperciva Oct 22, 2024
756d60d
gpiobus: Make gpiobus_read_ivar extern
cperciva Oct 22, 2024
a70c4eb
acpi_gpiobus: Narrow scope of NOT_YET
cperciva Oct 22, 2024
018583c
absolute-symlink.sh: check for absolute symlinks on a FreeBSD system
wosch Oct 26, 2024
cad96bc
zstream: avoid absolute symlink
emaste Oct 21, 2024
f2ca585
nfs: trivial typo fix
emaste Oct 8, 2024
0809dea
linker: Make linker.h more self-contained
markjdb Oct 26, 2024
73ce4cc
swap_pager: iter in haspage, lookup, getpages
Oct 26, 2024
1fc9078
lib/libcrypt: reinstate CFLAGS+=-I${SRCTOP}/sys/crypto/sha2
clausecker Oct 26, 2024
2f27910
compile_et: reduce the dependency chain for bootstrap tools.
bapt Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
callout: provide CALLOUT_TRYLOCK flag
If a callout was initialized with the flag, then the callout(9) system
will not drop the callwheel lock in softclock_call_cc() to obtain the
callout lock.  Instead it will use try-lock semantic to obtain the
callout's lock.  In case of a failure the callout will be rescheduled to
the 50% of the precision value.  The main benefit of such behavior is not
the avoidance of the lock contention in the callout thread, but the fact
that callout with such flag can be actually stopped in a safe manner,
because the race window in the beginning of softclock_call_cc() is closed.

Call of callout_stop() on such a callout would guarantee that nothing will
be executed after callout_stop() returns, neither callout lock will be
dereferenced.  A callout marked as CALLOUT_TRYLOCK |
CALLOUT_RETURNUNLOCKED can call callout_stop() from the callout function
itself (0, a failure to stop, will be returned), then unlock the lock and
then free the memory containing the callout structure.

Caveat: when calling callout_stop() from outside the callout function, the
return value from callout_stop() is still inconsistent.  A race window at
the end of softclock_call_cc() still exists, so callout_stop() may report
failure to stop, which would not be true.

Reviewed by:            jtl, kib
Differential Revision:	https://reviews.freebsd.org/D45746
glebius committed Oct 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit efcb2ec8cb81ea44c58e41082c6d965f9493099f
40 changes: 30 additions & 10 deletions sys/kern/kern_timeout.c
Original file line number Diff line number Diff line change
@@ -649,6 +649,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc,
static callout_func_t *lastfunc;
#endif

CC_LOCK_ASSERT(cc);
KASSERT((c->c_iflags & CALLOUT_PENDING) == CALLOUT_PENDING,
("softclock_call_cc: pend %p %x", c, c->c_iflags));
KASSERT((c->c_flags & CALLOUT_ACTIVE) == CALLOUT_ACTIVE,
@@ -671,16 +672,29 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc,
cc_exec_last_func(cc, direct) = c_func;
cc_exec_last_arg(cc, direct) = c_arg;
cc_exec_cancel(cc, direct) = false;
CC_UNLOCK(cc);
if (c_lock != NULL) {
class->lc_lock(c_lock, lock_status);
/*
* The callout may have been cancelled
* while we switched locks.
*/
if (cc_exec_cancel(cc, direct)) {
class->lc_unlock(c_lock);
goto skip;
if (c_iflags & CALLOUT_TRYLOCK) {
if (__predict_false(class->lc_trylock(c_lock,
lock_status) == 0)) {
cc_exec_curr(cc, direct) = NULL;
callout_cc_add(c, cc,
cc->cc_lastscan + c->c_precision / 2,
qmax(c->c_precision / 2, 1), c_func, c_arg,
(direct) ? C_DIRECT_EXEC : 0);
return;
}
CC_UNLOCK(cc);
} else {
CC_UNLOCK(cc);
class->lc_lock(c_lock, lock_status);
/*
* The callout may have been cancelled
* while we switched locks.
*/
if (cc_exec_cancel(cc, direct)) {
class->lc_unlock(c_lock);
goto skip;
}
}
/* The callout cannot be stopped now. */
cc_exec_cancel(cc, direct) = true;
@@ -698,6 +712,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc,
c, c_func, c_arg);
}
} else {
CC_UNLOCK(cc);
#ifdef CALLOUT_PROFILING
(*mpcalls)++;
#endif
@@ -1332,10 +1347,15 @@ void
_callout_init_lock(struct callout *c, struct lock_object *lock, int flags)
{
KASSERT(lock != NULL, ("%s: no lock", __func__));
KASSERT((flags & ~(CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK)) == 0,
KASSERT((flags & ~(CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK |
CALLOUT_TRYLOCK)) == 0,
("%s: bad flags %d", __func__, flags));
KASSERT(!(LOCK_CLASS(lock)->lc_flags & LC_SLEEPABLE),
("%s: callout %p has sleepable lock", __func__, c));
KASSERT(!(flags & CALLOUT_TRYLOCK) ||
(LOCK_CLASS(lock)->lc_trylock != NULL),
("%s: CALLOUT_TRYLOCK requested for %s",
__func__, LOCK_CLASS(lock)->lc_name));

*c = (struct callout ){
.c_lock = lock,
2 changes: 1 addition & 1 deletion sys/sys/callout.h
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@

#include <sys/_callout.h>

#define CALLOUT_LOCAL_ALLOC 0x0001 /* was allocated from callfree */
#define CALLOUT_TRYLOCK 0x0001 /* try semantic in softclock_call_cc */
#define CALLOUT_ACTIVE 0x0002 /* callout is currently active */
#define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */
#define CALLOUT_MPSAFE 0x0008 /* deprecated */