lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240717212230.work.346-kees@kernel.org>
Date: Wed, 17 Jul 2024 14:22:34 -0700
From: Kees Cook <kees@...nel.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Kees Cook <kees@...nel.org>,
	Christian Brauner <brauner@...nel.org>,
	Jan Kara <jack@...e.cz>,
	Eric Biederman <ebiederm@...ssion.com>,
	David Gow <davidgow@...gle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org
Subject: [PATCH] execve: Move KUnit tests to tests/ subdirectory

Move the exec KUnit tests into a separate directory to avoid polluting
the local directory namespace. Additionally update MAINTAINERS for the
new files and mark myself as Maintainer.

Signed-off-by: Kees Cook <kees@...nel.org>
---
I'll toss this into -next and send it to Linus before -rc1 closes.
---
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Jan Kara <jack@...e.cz>
Cc: Eric Biederman <ebiederm@...ssion.com>
Cc: David Gow <davidgow@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-fsdevel@...r.kernel.org
Cc: linux-mm@...ck.org
---
 MAINTAINERS                      | 5 +++--
 fs/binfmt_elf.c                  | 2 +-
 fs/exec.c                        | 2 +-
 fs/{ => tests}/binfmt_elf_test.c | 0
 fs/{ => tests}/exec_test.c       | 0
 5 files changed, 5 insertions(+), 4 deletions(-)
 rename fs/{ => tests}/binfmt_elf_test.c (100%)
 rename fs/{ => tests}/exec_test.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8dfbe998f175..35474718c05b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8211,8 +8211,8 @@ S:	Maintained
 F:	rust/kernel/net/phy.rs
 
 EXEC & BINFMT API, ELF
+M:	Kees Cook <keescook@...omium.org>
 R:	Eric Biederman <ebiederm@...ssion.com>
-R:	Kees Cook <keescook@...omium.org>
 L:	linux-mm@...ck.org
 S:	Supported
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
@@ -8220,7 +8220,8 @@ F:	Documentation/userspace-api/ELF.rst
 F:	fs/*binfmt_*.c
 F:	fs/Kconfig.binfmt
 F:	fs/exec.c
-F:	fs/exec_test.c
+F:	fs/tests/binfmt_*_test.c
+F:	fs/tests/exec_test.c
 F:	include/linux/binfmts.h
 F:	include/linux/elf.h
 F:	include/uapi/linux/binfmts.h
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 40111451aa95..1a032811b304 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2152,5 +2152,5 @@ core_initcall(init_elf_binfmt);
 module_exit(exit_elf_binfmt);
 
 #ifdef CONFIG_BINFMT_ELF_KUNIT_TEST
-#include "binfmt_elf_test.c"
+#include "tests/binfmt_elf_test.c"
 #endif
diff --git a/fs/exec.c b/fs/exec.c
index 5b580ff8d955..5a59063c50b1 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -2244,5 +2244,5 @@ fs_initcall(init_fs_exec_sysctls);
 #endif /* CONFIG_SYSCTL */
 
 #ifdef CONFIG_EXEC_KUNIT_TEST
-#include "exec_test.c"
+#include "tests/exec_test.c"
 #endif
diff --git a/fs/binfmt_elf_test.c b/fs/tests/binfmt_elf_test.c
similarity index 100%
rename from fs/binfmt_elf_test.c
rename to fs/tests/binfmt_elf_test.c
diff --git a/fs/exec_test.c b/fs/tests/exec_test.c
similarity index 100%
rename from fs/exec_test.c
rename to fs/tests/exec_test.c
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ