binfmt_elf: Introduce KUnit test
authorKees Cook <keescook@chromium.org>
Thu, 24 Feb 2022 03:32:10 +0000 (19:32 -0800)
committerKees Cook <keescook@chromium.org>
Tue, 1 Mar 2022 00:53:45 +0000 (16:53 -0800)
commitdecde1e679c6a69f8ff02d8da17dcae682be7e59
tree9465939316a6cacd090538f2d2c73ff154f5b378
parenta79caffe7599e2b54d26894edac0184b6335615f
binfmt_elf: Introduce KUnit test

Adds simple KUnit test for some binfmt_elf internals: specifically a
regression test for the problem fixed by commit 8904d9cd90ee ("ELF:
fix overflow in total mapping size calculation").

Cc: Eric Biederman <ebiederm@xmission.com>
Cc: David Gow <davidgow@google.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Magnus Groß" <magnus.gross@rwth-aachen.de>
Cc: kunit-dev@googlegroups.com
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/Kconfig.binfmt
fs/binfmt_elf.c
fs/binfmt_elf_test.c [new file with mode: 0644]
fs/compat_binfmt_elf.c