diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2026-11-12 10:23:24 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2026-11-12 10:23:24 +0000 |
| commit | 1ebf46ecb6278e31d7ae029b0f8af3d64e7bc1f9 (patch) | |
| tree | f4f194be5c3e5364c9f153ff076be6975b5b8ccd /include | |
| parent | 622365caf3bde45c459e566701ba0c8f9d8afa89 (diff) | |
modstat: don't copyout while holding a lock
If a user arranges for a page fault to never be filled (e.g., via a
FUSE file system), this can hold the shared lock forever.
To make this all work, refactor kern_modstat and freebsd32_modstat to
malloc a temporary buffer and fill it before copying it out rather
than doing a bunch of copies.
Add COMPAT_* ifdefs around compat code. The module_stat_v1 code is
really for a.out binaries in practice and thus a bit questionable.
Reviewed by: markj
Reported by: llm-postcr
Sponsored by: Innovate UK
Fixes: 7f8c2056db1e ("modstat: avoid copying from freed memory")
Differential Revision: https://reviews.freebsd.org/D61432
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
