<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/vm/vm_fault.c, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-04-13T02:58:16Z</updated>
<entry>
<title>vm_fault: Reset m_needs_zeroing properly</title>
<updated>2026-04-13T02:58:16Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-04-08T04:21:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50f7b62f0862f764215cee98547d5b8c0979ec26'/>
<id>urn:sha1:50f7b62f0862f764215cee98547d5b8c0979ec26</id>
<content type='text'>
- When allocating a page, we should only consider the PG_ZERO flag when
  handling the top-level page.
- Unconditionally reset the flag when restarting the fault handler.
  Previously, vm_fault_busy_sleep() would fail to reset it.

PR:		294039
Reviewed by:	kib
Tested by:	Peter Much &lt;pmc@citylink.dinoex.sub.org&gt;
MFC after:	3 days
Fixes:		cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated")
Differential Revision:	https://reviews.freebsd.org/D56234

(cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d)
</content>
</entry>
<entry>
<title>vm_fault: only rely on PG_ZERO when the page was newly allocated</title>
<updated>2026-01-26T15:13:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-11-28T15:57:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=babac9d7bc05fe8ceece1710b9becc5970492f81'/>
<id>urn:sha1:babac9d7bc05fe8ceece1710b9becc5970492f81</id>
<content type='text'>
(cherry picked from commit cff67bc43df14d492ccc08ec92fddceadd069953)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:25Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3bc80996974a61a4223eae4c1ccd47b6ee32a48a'/>
<id>urn:sha1:3bc80996974a61a4223eae4c1ccd47b6ee32a48a</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
</content>
</entry>
<entry>
<title>vm_map: Add a macro to fetch a map entry's split boundary index</title>
<updated>2023-08-09T20:48:18Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-05-09T14:07:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5abba9619cbb6f1cdd598d6eaa80ebd1947fa7f5'/>
<id>urn:sha1:5abba9619cbb6f1cdd598d6eaa80ebd1947fa7f5</id>
<content type='text'>
The resulting code is a bit more concise.  No functional change
intended.

Reviewed by:	alc, dougm, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41249

(cherry picked from commit d0e4e53ebd6499d420c19426586eeeafec157150)
</content>
</entry>
<entry>
<title>vm_fault: move FAULT_* return codes out of range for Mach errors</title>
<updated>2023-07-04T03:07:01Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-06-27T11:41:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6f21f94b158382762d528c514b58aa96c8ecdcd9'/>
<id>urn:sha1:6f21f94b158382762d528c514b58aa96c8ecdcd9</id>
<content type='text'>
(cherry picked from commit ef747607ead43552cb3ebb093fadd2c39c56a36d)
</content>
</entry>
<entry>
<title>vm_fault: Fix a race in vm_fault_soft_fast()</title>
<updated>2023-02-27T13:22:33Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-02-13T21:24:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2f57ef2d3b8f776a28e195cd780a3bb4924570be'/>
<id>urn:sha1:2f57ef2d3b8f776a28e195cd780a3bb4924570be</id>
<content type='text'>
When vm_fault_soft_fast() creates a mapping, it release the VM map lock
before unbusying the top-level object.  Without the map lock, however,
nothing prevents the VM object from being deallocated while still busy.

Fix the problem by unbusying the object before releasing the VM map
lock.  If vm_fault_soft_fast() fails to create a mapping, the VM map
lock is not released, so those cases don't need to change.

Reported by:	syzkaller
Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D38527

(cherry picked from commit d0991948182a1a149ee84f1b9c4d3e30450c8f0b)
</content>
</entry>
<entry>
<title>vm_pager: add method to veto page allocation</title>
<updated>2023-01-20T03:19:29Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-10-20T13:15:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7d05e01b3e59c12f1b7a07dbf3b0ed11ac62ed13'/>
<id>urn:sha1:7d05e01b3e59c12f1b7a07dbf3b0ed11ac62ed13</id>
<content type='text'>
Tested by:	pho

(cherry picked from commit ec201dddfbddd3a77dd3f3afc9b007d0e13e7ad1)
</content>
</entry>
<entry>
<title>vm_fault: Shoot down shared mappings in vm_fault_copy_entry()</title>
<updated>2022-08-09T19:47:40Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2022-07-25T20:53:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3ea8c7ad90f75129c52a2b64213c5578af23dc8d'/>
<id>urn:sha1:3ea8c7ad90f75129c52a2b64213c5578af23dc8d</id>
<content type='text'>
As in vm_fault_cow(), it's possible, albeit rare, for multiple vm_maps
to share a shadow object.  When copying a page from a backing object
into the shadow, all mappings of the source page must therefore be
removed.  Otherwise, future operations on the object tree may detect
that the source page is fully shadowed and thus can be freed.

Approved by:	so
Security:	FreeBSD-SA-22:11.vm
Reviewed by:	alc, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35635

(cherry picked from commit 5c50e900ad779fccbf0a230bfb6a68a3e93ccf60)
</content>
</entry>
<entry>
<title>vm_fault: Fix some nits in vm_fault_copy_entry()</title>
<updated>2022-07-25T13:44:45Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2022-07-11T19:27:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d529f396b7e876cf5bc10bc373376a2b37869d0c'/>
<id>urn:sha1:d529f396b7e876cf5bc10bc373376a2b37869d0c</id>
<content type='text'>
- Correct the description (vm_fault_copy_entry() does not create a
  shadow object).
- Move some initialization and assertions out of the scope of the object
  locks, when doing so makes sense.
- Merge a pair of conditional blocks.
- Use __unused when appropriate.

No functional change intended.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b57be759d079d40aa6ec75207faadce5ae1484a2)
</content>
</entry>
<entry>
<title>vm_fault: Fix a racy copy of page valid bits</title>
<updated>2022-06-29T14:12:34Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2022-06-14T20:36:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cc81b8661d5085a470c0f1821fa68bee2d8fa39c'/>
<id>urn:sha1:cc81b8661d5085a470c0f1821fa68bee2d8fa39c</id>
<content type='text'>
We do not hold the object lock or a page busy lock when copying src_m's
validity state.  Prior to commit 45d72c7d7fca we marked dst_m as fully
valid.

Use the source object's read lock to ensure that valid bits are not
concurrently cleared.

Reviewed by:	alc, kib
Fixes:		45d72c7d7fca ("vm_fault_copy_entry: accept invalid source pages.")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit d0443e2b9832f01319bcaaece8102d998bf81f01)
</content>
</entry>
</feed>
