Kees Cook 51104c19d8 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>
2024-06-14 19:31:33 -06:00
..
2024-05-20 15:18:34 -07:00
2024-05-24 17:28:02 -07:00
2024-05-22 10:49:54 -07:00
Hi,
2024-05-13 10:40:15 -07:00
2024-05-04 10:19:59 +02:00
2024-05-14 18:25:53 -07:00
2024-05-23 13:29:27 +02:00
2024-05-23 13:44:47 -07:00
2024-05-24 17:28:02 -07:00