Thread (64 messages) 64 messages, 7 authors, 2025-04-22

Re: [PATCH 4/4] tools/selftests: add file/shmem-backed mapping guard region tests

From: Vlastimil Babka <hidden>
Date: 2025-02-18 14:18:17
Also in: linux-kselftest, linux-mm, lkml

On 2/13/25 19:17, Lorenzo Stoakes wrote:
Extend the guard region self tests to explicitly assert that guard regions
work correctly for functionality specific to file-backed and shmem
mappings.

In addition to testing all of the existing guard region functionality that
is currently tested against anonymous mappings against file-backed and
shmem mappings (except those which are exclusive to anonymous mapping), we
now also:

* Test that MADV_SEQUENTIAL does not cause unexpected readahead behaviour.
* Test that MAP_PRIVATE behaves as expected with guard regions installed in
  both a shared and private mapping of an fd.
* Test that a read-only file can correctly establish guard regions.
* Test a probable fault-around case does not interfere with guard regions
  (or vice-versa).
* Test that truncation does not eliminate guard regions.
* Test that hole punching functions as expected in the presence of guard
  regions.
* Test that a read-only mapping of a memfd write sealed mapping can have
  guard regions established within it and function correctly without
  violation of the seal.
* Test that guard regions installed into a mapping of the anonymous zero
  page function correctly.
Impressive.
Signed-off-by: Lorenzo Stoakes <redacted>
Acked-by: Vlastimil Babka <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help