diff options
author | Kees Cook <[email protected]> | 2024-06-12 12:59:18 -0700 |
---|---|---|
committer | Shuah Khan <[email protected]> | 2024-06-14 19:31:33 -0600 |
commit | 51104c19d8570eb23208e08eac0e9ae09ced1c15 (patch) | |
tree | e3667f8ff7dda66f1a79d5f848a9de66a1b6b530 /lib/memory-notifier-error-inject.c | |
parent | 425ae3ab5a1fa744a00680f059cf1accaaaecb28 (diff) |
kunit: test: Add vm_mmap() allocation resource manager
For tests that need to allocate using vm_mmap() (e.g. usercopy and
execve), provide the interface to have the allocation tracked by KUnit
itself. This requires bringing up a placeholder userspace mm.
This combines my earlier attempt at this with Mark Rutland's version[1].
Normally alloc_mm() and arch_pick_mmap_layout() aren't exported for
modules, so export these only for KUnit testing.
Link: https://lore.kernel.org/lkml/[email protected]/ [1]
Co-developed-by: Mark Rutland <[email protected]>
Signed-off-by: Mark Rutland <[email protected]>
Reviewed-by: David Gow <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions