#
f7db0c95 |
| 04-Nov-2020 |
Mark Johnston <markj@FreeBSD.org> |
vmspace: Convert to refcount(9)
This is mostly mechanical except for vmspace_exit(). There, use the new refcount_release_if_last() to avoid switching to vmspace0 unless other processes are sharing
vmspace: Convert to refcount(9)
This is mostly mechanical except for vmspace_exit(). There, use the new refcount_release_if_last() to avoid switching to vmspace0 unless other processes are sharing the vmspace. In that case, upon switching to vmspace0 we can unconditionally release the reference.
Remove the volatile qualifier from vm_refcnt now that accesses are protected using refcount(9) KPIs.
Reviewed by: alc, kib, mmel MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27057
show more ...
|
Revision tags: release/12.2.0 |
|
#
e2e80fb3 |
| 10-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_map: Add a map entry kind that can only be clipped at specific boundary.
The entries and their clip boundaries must be aligned on supported superpages sizes from pagesizes[]. vm_map operations r
vm_map: Add a map entry kind that can only be clipped at specific boundary.
The entries and their clip boundaries must be aligned on supported superpages sizes from pagesizes[]. vm_map operations return Mach error KERN_INVALID_ARGUMENT, which is usually translated to EINVAL, if it would require clip not at the boundary.
In other words, entries force preserving virtual addresses superpage properties.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
show more ...
|
#
7a9f2da3 |
| 09-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vm_map_find_aligned(9).
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
|
#
60cd9c95 |
| 09-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Move MAP_32BIT_MAX_ADDR definition to sys/mman.h.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
|
#
e8f77c20 |
| 09-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Prepare to handle non-trivial errors from vm_map_delete().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org
Prepare to handle non-trivial errors from vm_map_delete().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
show more ...
|
#
c3aa3bf9 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vm: clean up empty lines in .c and .h files
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
7dd979df |
| 17-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove the VM map zone.
Today, the zone is only used to allocate a trio of kernel maps: the kernel map itself, and the exec and pipe submaps. Maps for user processes are dynamically allocated but a
Remove the VM map zone.
Today, the zone is only used to allocate a trio of kernel maps: the kernel map itself, and the exec and pipe submaps. Maps for user processes are dynamically allocated but are embedded in the vmspace structure, which is allocated from its own zone. Make the aforementioned kernel maps statically allocated and get rid of the zone.
While here, remove a stale comment above vmspace_alloc() and change the names of locks initialized in vm_map_init() to match vmspace_zinit().
Reported by: alc Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26052
show more ...
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
e383ec74 |
| 06-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363739 through r363986.
|
#
9f9cc3f9 |
| 06-Aug-2020 |
Brooks Davis <brooks@FreeBSD.org> |
Preserve ASLR vm_map flags across fork
In the most common case (fork+execve) this doesn't matter, but further attempts to apply entropy would fail in (e.g.) a pre-fork server.
Reported by: Alfredo
Preserve ASLR vm_map flags across fork
In the most common case (fork+execve) this doesn't matter, but further attempts to apply entropy would fail in (e.g.) a pre-fork server.
Reported by: Alfredo Mazzinghi Reviewed by: kib, markj Obtained from: CheriBSD MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25966
show more ...
|
#
a7752896 |
| 13-Jul-2020 |
Mark Johnston <markj@FreeBSD.org> |
Add vm_map_valid_range_KBI().
This is required for standalone module builds.
Reported by: hselasky Reviewed by: dougm, hselasky, kib MFC after: 3 days Differential Revision: https://reviews.freebsd
Add vm_map_valid_range_KBI().
This is required for standalone module builds.
Reported by: hselasky Reviewed by: dougm, hselasky, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25650
show more ...
|
#
8a64110e |
| 29-Jun-2020 |
Conrad Meyer <cem@FreeBSD.org> |
vm: Add missing WITNESS warnings for M_WAITOK allocation
vm_map_clip_{end,start} and lookup_clip_start allocate memory M_WAITOK for !system_map vm_maps. Add WITNESS warning annotation for !system_m
vm: Add missing WITNESS warnings for M_WAITOK allocation
vm_map_clip_{end,start} and lookup_clip_start allocate memory M_WAITOK for !system_map vm_maps. Add WITNESS warning annotation for !system_map callers who may be holding non-sleepable locks.
Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25283
show more ...
|
#
84242cf6 |
| 25-Jun-2020 |
Mark Johnston <markj@FreeBSD.org> |
Call swap_pager_freespace() from vm_object_page_remove().
All vm_object_page_remove() callers, except linux_invalidate_mapping_pages() in the LinuxKPI, free swap space when removing a range of pages
Call swap_pager_freespace() from vm_object_page_remove().
All vm_object_page_remove() callers, except linux_invalidate_mapping_pages() in the LinuxKPI, free swap space when removing a range of pages from an object. The LinuxKPI case appears to be an unintentional omission that could result in leaked swap blocks, so unconditionally free swap space in vm_object_page_remove() to protect against similar bugs in the future.
Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25329
show more ...
|
#
f0340740 |
| 19-Jun-2020 |
Mark Johnston <markj@FreeBSD.org> |
Restore a check unintentionally dropped in r362361.
MFC with: r362361
|
#
0f1e6ec5 |
| 19-Jun-2020 |
Mark Johnston <markj@FreeBSD.org> |
Add a helper function for validating VA ranges.
Functions which take untrusted user ranges must validate against the bounds of the map, and also check for wraparound. Instead of having the same log
Add a helper function for validating VA ranges.
Functions which take untrusted user ranges must validate against the bounds of the map, and also check for wraparound. Instead of having the same logic duplicated in a number of places, add a function to check.
Reviewed by: dougm, kib Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25328
show more ...
|
#
a116b5d3 |
| 17-Jun-2020 |
Conrad Meyer <cem@FreeBSD.org> |
vm: Drop vm_map_clip_{start,end} macro wrappers
No functional change.
Reviewed by: dougm, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25282
|
Revision tags: release/11.4.0 |
|
#
5d25f943 |
| 23-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358239 through r358262.
|
#
eaa17d42 |
| 23-Feb-2020 |
Ryan Libby <rlibby@FreeBSD.org> |
sys/vm: quiet -Wwrite-strings
Discussed with: kib Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23796
|
#
051669e8 |
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
#
c7b23459 |
| 24-Jan-2020 |
Doug Moore <dougm@FreeBSD.org> |
Most uses of vm_map_clip_start follow a call to vm_map_lookup. Define an inline function vm_map_lookup_clip_start that invokes them both and use it in places that invoke both. Drop a couple of local
Most uses of vm_map_clip_start follow a call to vm_map_lookup. Define an inline function vm_map_lookup_clip_start that invokes them both and use it in places that invoke both. Drop a couple of local variables made unnecessary by this function.
Reviewed by: markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D22987
show more ...
|
#
e6bd3a81 |
| 23-Jan-2020 |
Mark Johnston <markj@FreeBSD.org> |
vm_map_submap(): Avoid unnecessary clipping.
A submap can only be created from an entry spanning the entire request range. In particular, if vm_map_lookup_entry() returns false or the returned entr
vm_map_submap(): Avoid unnecessary clipping.
A submap can only be created from an entry spanning the entire request range. In particular, if vm_map_lookup_entry() returns false or the returned entry contains "end".
Since the only use of submaps in FreeBSD is for the static pipe and execve argument KVA maps, this has no functional effect.
Github PR: https://github.com/freebsd/freebsd/pull/420 Submitted by: Wuyang Chung <wuyang.chung1@gmail.com> (original) Reviewed by: dougm, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23299
show more ...
|
#
b249ce48 |
| 03-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differenti
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D21427
show more ...
|
#
668a8aa8 |
| 31-Dec-2019 |
Doug Moore <dougm@FreeBSD.org> |
The map-entry clipping functions modify start and end entries of an entry in the vm_map, making invariants related to the max_free entry field invalid. Move the clipping work into vm_map_entry_link,
The map-entry clipping functions modify start and end entries of an entry in the vm_map, making invariants related to the max_free entry field invalid. Move the clipping work into vm_map_entry_link, so that linking is okay when the new entry clips a current entry, and the vm_map doesn't have to be briefly corrupted. Change assertions and conditions in SPLAY_{LEFT,RIGHT}_STEP since the max_free invariants can now be trusted in all cases.
Tested by: pho Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D22897
show more ...
|
#
df8db6dd |
| 28-Dec-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object_shadow(): fix object reference leak.
In r355270 by me, vm_object_shadow() was changed to handle the reference counting for the shared case, but the extra reference that was done in vmspace
vm_object_shadow(): fix object reference leak.
In r355270 by me, vm_object_shadow() was changed to handle the reference counting for the shared case, but the extra reference that was done in vmspace_fork() for the shared/need_copy case was not removed.
Submitted by: jeff
show more ...
|