]> git.ipfire.org Git - thirdparty/linux.git/commit
usercopy: Convert test_user_copy to KUnit test
authorKees Cook <kees@kernel.org>
Wed, 12 Jun 2024 19:59:19 +0000 (12:59 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Sat, 15 Jun 2024 01:31:39 +0000 (19:31 -0600)
commitcf6219ee889fb304cf8192c707ad280d93baafc7
treec758fca93159cbaca6e16929a147559ffe2b7bb7
parent51104c19d8570eb23208e08eac0e9ae09ced1c15
usercopy: Convert test_user_copy to KUnit test

Convert the runtime tests of hardened usercopy to standard KUnit tests.

Additionally disable usercopy_test_invalid() for systems with separate
address spaces (or no MMU) since it's not sensible to test for address
confusion there (e.g. m68k).

Co-developed-by: Vitor Massaru Iha <vitor@massaru.org>
Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
Link: https://lore.kernel.org/r/20200721174654.72132-1-vitor@massaru.org
Tested-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
MAINTAINERS
lib/Kconfig.debug
lib/Makefile
lib/test_user_copy.c [deleted file]
lib/usercopy_kunit.c [new file with mode: 0644]