summaryrefslogtreecommitdiff
path: root/lib/kunit/Makefile
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2024-06-12 22:59:18 +0300
committerShuah Khan <skhan@linuxfoundation.org>2024-06-15 04:31:33 +0300
commit51104c19d8570eb23208e08eac0e9ae09ced1c15 (patch)
treee3667f8ff7dda66f1a79d5f848a9de66a1b6b530 /lib/kunit/Makefile
parent425ae3ab5a1fa744a00680f059cf1accaaaecb28 (diff)
downloadlinux-51104c19d8570eb23208e08eac0e9ae09ced1c15.tar.xz
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/20230321122514.1743889-2-mark.rutland@arm.com/ [1] Co-developed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/kunit/Makefile')
-rw-r--r--lib/kunit/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 900e6447c8e8..30f6bbf04a4a 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_KUNIT) += kunit.o
kunit-objs += test.o \
resource.o \
+ user_alloc.o \
static_stub.o \
string-stream.o \
assert.o \