#
f3b7dbda |
| 04-Dec-2024 |
Mark Johnston <markj@FreeBSD.org> |
shm: Handle swap pager allocation failures
shm_alloc() can fail if swap reservation fails (i.e., vm.overcommit is non-zero) or racct is imposing some limits on swap usage.
PR: 282994 MFC after: 2
shm: Handle swap pager allocation failures
shm_alloc() can fail if swap reservation fails (i.e., vm.overcommit is non-zero) or racct is imposing some limits on swap usage.
PR: 282994 MFC after: 2 weeks Reviewed by: olce, kib Differential Revision: https://reviews.freebsd.org/D47839
show more ...
|
Revision tags: release/14.2.0 |
|
#
ef9ffb85 |
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
#
e578fd85 |
| 08-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
shm_alloc(): cleanup
Consistently use the shorter name 'obj' for the new object. Set OBJ_POSIXSHM flag outside if, it is set on both pathes.
Suggested by: alc Reviewed by: alc, markj Sponsored by:
shm_alloc(): cleanup
Consistently use the shorter name 'obj' for the new object. Set OBJ_POSIXSHM flag outside if, it is set on both pathes.
Suggested by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47018
show more ...
|
#
bda73e44 |
| 07-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
posix shm: add shm_get_path(9)
to calculate the posix shm path from the vm_object backing shm segment.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revisio
posix shm: add shm_get_path(9)
to calculate the posix shm path from the vm_object backing shm segment.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970
show more ...
|
#
a10870ec |
| 07-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
posix shm: mark backing objects with SHM_POSIXSHM flag
and consistently store the pointer to shmfd into pager priv data space.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 w
posix shm: mark backing objects with SHM_POSIXSHM flag
and consistently store the pointer to shmfd into pager priv data space.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970
show more ...
|
#
33c2c58f |
| 04-Oct-2024 |
Mark Johnston <markj@FreeBSD.org> |
shm: Respect PROT_MAX when creating private mappings
We were previously unconditionally adding PROT_WRITE to the maxprot of private mapping (because a private mapping can be written even if the fd i
shm: Respect PROT_MAX when creating private mappings
We were previously unconditionally adding PROT_WRITE to the maxprot of private mapping (because a private mapping can be written even if the fd is read-only), but this might violate the user's PROT_MAX request.
While here, rename cap_maxprot to max_maxprot. This is the intersection of the maximum protections imposed by capsicum rights on the fd (not really relevant for private mappings) and the user-required maximum protections (which were not being obeyed). In particular, cap_maxprot is a misnomer after the introduction of PROT_MAX.
Add some regression test cases. mmap__maxprot_shm fails without this patch.
Note: Capsicum's CAP_MMAP_W is a bit ambiguous. Should it be required in order to create writeable private mappings? Currently it is, even though such mappings don't permit writes to the object referenced by the fd.
Reported by: brooks Reviewed by: brooks MFC after: 1 month Fixes: c7841c6b8e41 ("Relax restrictions on private mappings of POSIX shm objects.") Differential Revision: https://reviews.freebsd.org/D46741
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
c3d8a931 |
| 07-Aug-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Re-implement rangelocks part 1
Using the algorithms from https://doi.org/10.1145/3342195.3387533.
For the first part, consider all range lock requests as exclusive.
Reviewed by: markj, Olivier Cer
Re-implement rangelocks part 1
Using the algorithms from https://doi.org/10.1145/3342195.3387533.
For the first part, consider all range lock requests as exclusive.
Reviewed by: markj, Olivier Certner <olce.freebsd@certner.fr> Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787
show more ...
|
#
3e00c11a |
| 12-Jul-2024 |
Alan Cox <alc@FreeBSD.org> |
arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[]
Update pagesizes[] to include the L3 ATTR_CONTIGUOUS (L3C) page size, which is 64KB when the base page size is 4KB and 2MB when the bas
arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[]
Update pagesizes[] to include the L3 ATTR_CONTIGUOUS (L3C) page size, which is 64KB when the base page size is 4KB and 2MB when the base page size is 16KB.
Add support for L3C pages to shm_create_largepage().
Add support for creating L3C page mappings to pmap_enter(psind=1).
Add support for reporting L3C page mappings to mincore(2) and procstat(8).
Update vm_fault_soft_fast() and vm_fault_populate() to handle multiple superpage sizes.
Declare arm64 as supporting two superpage reservation sizes, and simulate two superpage reservation sizes, updating the vm_page's psind field to reflect the correct page size from pagesizes[]. (The next patch in this series will replace this simulation. This patch is already big enough.)
Co-authored-by: Eliot Solomon <ehs3@rice.edu> Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45766
show more ...
|
#
7975f57b |
| 20-May-2024 |
Ricardo Branco <rbranco@suse.de> |
uipc_shm: Fix double check for shmfd->shm_path
Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1250
|
#
e411b227 |
| 19-Apr-2024 |
Mark Johnston <markj@FreeBSD.org> |
uipc_shm: Fix a free() of an uninitialized variable
Reported by: Coverity CID: 1544043 Fixes: b112232e4fb9 ("uipc_shm: Copyin userpath for ktrace(2)")
|
#
b112232e |
| 10-Apr-2024 |
Jake Freeland <jfree@FreeBSD.org> |
uipc_shm: Copyin userpath for ktrace(2)
If userpath is not SHM_ANON, then copy it in early so ktrace(2) can record it. Without this change, ktrace(2) will attempt to strcpy a userspace string and tr
uipc_shm: Copyin userpath for ktrace(2)
If userpath is not SHM_ANON, then copy it in early so ktrace(2) can record it. Without this change, ktrace(2) will attempt to strcpy a userspace string and trigger a page fault.
Reported by: syzbot+490b9c2a89f53b1b9779@syzkaller.appspotmail.com Fixes: 0cd9cde767c3 Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44702
show more ...
|
#
0cd9cde7 |
| 06-Apr-2024 |
Jake Freeland <jfree@FreeBSD.org> |
ktrace: Record namei violations with KTR_CAPFAIL
Report namei path lookups while Capsicum violation tracing with CAPFAIL_NAMEI. vfs caching is also ignored when tracing to mimic capability mode beha
ktrace: Record namei violations with KTR_CAPFAIL
Report namei path lookups while Capsicum violation tracing with CAPFAIL_NAMEI. vfs caching is also ignored when tracing to mimic capability mode behavior.
Reviewed by: markj Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D40680
show more ...
|
#
f28526e9 |
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kcmp(2): implement for generic file types
Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518
|
#
2619c5cc |
| 21-Nov-2023 |
Jason A. Harmening <jah@FreeBSD.org> |
Avoid waiting on physical allocations that can't possibly be satisfied
- Change vm_page_reclaim_contig[_domain] to return an errno instead of a boolean. 0 indicates a successful reclaim, ENOMEM i
Avoid waiting on physical allocations that can't possibly be satisfied
- Change vm_page_reclaim_contig[_domain] to return an errno instead of a boolean. 0 indicates a successful reclaim, ENOMEM indicates lack of available memory to reclaim, with any other error (currently only ERANGE) indicating that reclamation is impossible for the specified address range. Change all callers to only follow up with vm_page_wait* in the ENOMEM case.
- Introduce vm_domainset_iter_ignore(), which marks the specified domain as unavailable for further use by the iterator. Use this function to ignore domains that can't possibly satisfy a physical allocation request. Since WAITOK allocations run the iterators repeatedly, this avoids the possibility of infinitely spinning in domain iteration if no available domain can satisfy the allocation request.
PR: 274252 Reported by: kevans Tested by: kevans Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42706
show more ...
|
#
6df6facf |
| 18-Aug-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
shmfd: hide direct rangelock(9) use under a wrapper
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
f3e11927 |
| 14-Aug-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
vm: Allow MAP_32BIT for all architectures
Reviewed by: alc, kib, markj Differential revision: https://reviews.freebsd.org/D41435
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
0919f29d |
| 23-Nov-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
shmfd: account for the actually allocated pages
Return the value as stat(2) st_blocks.
Suggested and reviewed by: markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC af
shmfd: account for the actually allocated pages
Return the value as stat(2) st_blocks.
Suggested and reviewed by: markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
show more ...
|
#
37aea264 |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: for used pages, account really allocated pages, instead of file sizes
This makes tmpfs size accounting correct for the sparce files. Also correct report st_blocks/va_bytes. Previously the rep
tmpfs: for used pages, account really allocated pages, instead of file sizes
This makes tmpfs size accounting correct for the sparce files. Also correct report st_blocks/va_bytes. Previously the reported value did not accounted for the swapped out pages.
PR: 223015 Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
show more ...
|
#
7ec4b29b |
| 23-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
uiomove_object: hide diagnostic under bootverbose
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
|
#
8c9aa94b |
| 23-Jul-2022 |
Ka Ho Ng <khng@FreeBSD.org> |
Convert runtime param checks to KASSERTs for fo_fspacectl
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D35880
|
#
7060da62 |
| 29-Jun-2022 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: Remove a prison's shared memory when it dies
Add shm_remove_prison(), that removes all POSIX shared memory segments belonging to a prison. Call it from prison_cleanup() so a prison won't be s
jail: Remove a prison's shared memory when it dies
Add shm_remove_prison(), that removes all POSIX shared memory segments belonging to a prison. Call it from prison_cleanup() so a prison won't be stuck in a dying state due to the resources still held.
PR: 257555 Reported by: grembo
show more ...
|
Revision tags: release/13.1.0 |
|
#
9891cb1e |
| 25-Feb-2022 |
Warner Losh <imp@FreeBSD.org> |
Eliminate curlen, it's set but never used
Sponsored by: Netflix
|
#
d7c4ea7d |
| 24-Feb-2022 |
Jamie Gritton <jamie@FreeBSD.org> |
posixshm: Allow jails to use kern.ipc.posix_shm_list PR: 257554 Reported by: grembo@
|