#
f141ed73 |
| 25-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Style.
Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
19bd0d9c |
| 24-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement address space guards.
Guard, requested by the MAP_GUARD mmap(2) flag, prevents the reuse of the allocated address space, but does not allow instantiation of the pages in the range. It is
Implement address space guards.
Guard, requested by the MAP_GUARD mmap(2) flag, prevents the reuse of the allocated address space, but does not allow instantiation of the pages in the range. It is useful for more explicit support for usual two-stage reserve then commit allocators, since it prevents accidental instantiation of the mapping, e.g. by mprotect(2).
Use guards to reimplement stack grow code. Explicitely track stack grow area with the guard, including the stack guard page. On stack grow, trivial shift of the guard map entry and stack map entry limits makes the stack expansion. Move the code to detect stack grow and call vm_map_growstack(), from vm_fault() into vm_map_lookup().
As result, it is impossible to get random mapping to occur in the stack grow area, or to overlap the stack guard page.
Enable stack guard page by default.
Reviewed by: alc, markj Man page update reviewed by: alc, bjk, emaste, markj, pho Tested by: pho, Qualys Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D11306 (man pages)
show more ...
|
#
546bb2d7 |
| 24-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
The issue is catched by "vm_map_wire: alien wire" KASSERT at the end of the vm_map_wire(). We currently check for MAP_ENTRY_WIRE
Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
The issue is catched by "vm_map_wire: alien wire" KASSERT at the end of the vm_map_wire(). We currently check for MAP_ENTRY_WIRE_SKIPPED flag before ensuring that the wiring_thread is curthread. For HOLESOK wiring, this means that we might see WIRE_SKIPPED entry from different wiring.
The fix it by only checking WIRE_SKIPPED if the entry is put IN_TRANSITION by us. Also fixed a typo in the comment explaining the situation.
Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
0ec97ffc |
| 21-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Call pmap_copy() only for map entries which have the backing object instantiated.
Calling pmap_copy() on non-faulted anonymous memory entries is useless.
Noted and reviewed by: alc Sponsored by: Th
Call pmap_copy() only for map entries which have the backing object instantiated.
Calling pmap_copy() on non-faulted anonymous memory entries is useless.
Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
00de6773 |
| 21-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Assert that the protection of a new map entry is a subset of the max protection.
Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
212e02c8 |
| 19-Jun-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Ignore the P_SYSTEM process flag, and do not request VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack.
System maps do not create auto-grown stack. Any stack we handled, even for P_SYSTEM,
Ignore the P_SYSTEM process flag, and do not request VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack.
System maps do not create auto-grown stack. Any stack we handled, even for P_SYSTEM, must be for user address space. P_SYSTEM processes with mapped user space is either init(8) or an aio worker attached to other user process with aio buffer pointing into stack area. In either case, VM_MAP_WIRE_USER mode should be used.
Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
e1cb9d37 |
| 10-Apr-2017 |
Mark Johnston <markj@FreeBSD.org> |
Busy the map in vm_map_protect().
We are otherwise susceptible to a race with a concurrent vm_map_wire(), which may drop the map lock to fault pages into the object chain. In particular, vm_map_prot
Busy the map in vm_map_protect().
We are otherwise susceptible to a race with a concurrent vm_map_wire(), which may drop the map lock to fault pages into the object chain. In particular, vm_map_protect() will only copy newly writable wired pages into the top-level object when MAP_ENTRY_USER_WIRED is set, but vm_map_wire() only sets this flag after its fault loop. We may thus end up with a writable wired entry whose top-level object does not contain the entire range of pages.
Reported and tested by: pho Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10349
show more ...
|
#
1c2d20a1 |
| 10-Apr-2017 |
Mark Johnston <markj@FreeBSD.org> |
Consistently use for-loops in vm_map_protect().
No functional change.
Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D10349
|
#
ed11e4d7 |
| 10-Apr-2017 |
Mark Johnston <markj@FreeBSD.org> |
Add some bounds assertions to the vm_map_entry clip functions.
Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D10349
|
#
83d37aaf |
| 16-Mar-2017 |
Xin LI <delphij@FreeBSD.org> |
The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying.
Submitted by: alc MFC after: 3 days
|
#
d1780e8d |
| 14-Mar-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Use atop() instead of OFF_TO_IDX() for convertion of addresses or addresses offsets, as intended.
Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
|
#
78d7964b |
| 14-Mar-2017 |
Xin LI <delphij@FreeBSD.org> |
Implement INHERIT_ZERO for minherit(2).
INHERIT_ZERO is an OpenBSD feature.
When a page is marked as such, it would be zeroed upon fork().
This would be used in new arc4random(3) functions.
PR: 1
Implement INHERIT_ZERO for minherit(2).
INHERIT_ZERO is an OpenBSD feature.
When a page is marked as such, it would be zeroed upon fork().
This would be used in new arc4random(3) functions.
PR: 182610 Reviewed by: kib (earlier version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D427
show more ...
|
#
2b6d1a63 |
| 12-Mar-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Follow-up to r313690.
Fix two missed places where vm_object offset to index calculation should use unsigned shift, to allow handling of full range of unsigned offsets used to create device mappings.
Follow-up to r313690.
Fix two missed places where vm_object offset to index calculation should use unsigned shift, to allow handling of full range of unsigned offsets used to create device mappings.
Reported and tested by: royger (previous version) Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
348238db |
| 01-Mar-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r314420 through r314481.
|
#
fbbd9655 |
| 01-Mar-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
#
1569205f |
| 01-Jan-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Style fixes for vm_map_insert().
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
9a4ee196 |
| 30-Dec-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Style.
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
3ffd3530 |
| 16-Dec-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r309817 through r310168.
|
#
a9546a6b |
| 13-Dec-2016 |
John Baldwin <jhb@FreeBSD.org> |
Use db_lookup_proc() in the DDB 'show procvm' command.
This allows processes to be identified by PID as well as a pointer address.
MFC after: 2 weeks Sponsored by: DARPA / AFRL
|
#
3453bca8 |
| 12-Dec-2016 |
Alan Cox <alc@FreeBSD.org> |
Eliminate every mention of PG_CACHED pages from the comments in the machine- independent layer of the virtual memory system. Update some of the nearby comments to eliminate redundancy and improve cl
Eliminate every mention of PG_CACHED pages from the comments in the machine- independent layer of the virtual memory system. Update some of the nearby comments to eliminate redundancy and improve clarity.
In vm/vm_reserv.c, do not use hyphens after adverbs ending in -ly per The Chicago Manual of Style.
Update the comment in vm/vm_page.h defining the four types of page queues to reflect the elimination of PG_CACHED pages and the introduction of the laundry queue.
Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8752
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
381b7242 |
| 07-Jul-2016 |
Alan Cox <alc@FreeBSD.org> |
Change the type of the map entry's next_read field from a vm_pindex_t to a vm_offset_t. (This field is used to detect sequential access to the virtual address range represented by the map entry.) T
Change the type of the map entry's next_read field from a vm_pindex_t to a vm_offset_t. (This field is used to detect sequential access to the virtual address range represented by the map entry.) There are three reasons to make this change. First, a vm_offset_t is smaller on 32-bit architectures. Consequently, a struct vm_map_entry is now smaller on 32-bit architectures. Second, a vm_offset_t can be written atomically, whereas it may not be possible to write a vm_pindex_t atomically on a 32-bit architecture. Third, using a vm_pindex_t makes the next_read field dependent on which object in the shadow chain is being read from.
Replace an "XXX" comment.
Reviewed by: kib Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division
show more ...
|
#
763df3ec |
| 02-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/vm: minor spelling fixes in comments.
No functional change.
|
#
164a37a5 |
| 27-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Trim redundant message.
WITNESS_WARN() appends "with non-sleepable lock" to the caller's message.
Sponsored by: Chelsio Communications
|
Revision tags: release/10.3.0 |
|
#
2414e864 |
| 03-Feb-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MfH @r295202
Expect to see panics in routing code at least now.
|
#
14d5c08b |
| 26-Jan-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r294599 through r294776.
|