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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221109221104.1797802-2-punit.agrawal@bytedance.com>
Date:   Wed,  9 Nov 2022 22:11:04 +0000
From:   Punit Agrawal <punit.agrawal@...edance.com>
To:     akpm@...ux-foundation.org, shuah@...nel.org
Cc:     adobriyan@...il.com, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        Punit Agrawal <punit.agrawal@...edance.com>
Subject: [PATCH v2 2/2] selftests: proc: Mark proc-pid-vm as x86_64 only

The proc-pid-vm test does not have support for architectures other
than x86_64. Mark it as such in the Makefile and in the process remove
the special casing in the test itself.

Signed-off-by: Punit Agrawal <punit.agrawal@...edance.com>
---
 tools/testing/selftests/proc/Makefile      | 2 +-
 tools/testing/selftests/proc/proc-pid-vm.c | 9 ---------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/tools/testing/selftests/proc/Makefile b/tools/testing/selftests/proc/Makefile
index 743aaa0cdd52..db953c014bf8 100644
--- a/tools/testing/selftests/proc/Makefile
+++ b/tools/testing/selftests/proc/Makefile
@@ -11,7 +11,6 @@ TEST_GEN_PROGS += fd-001-lookup
 TEST_GEN_PROGS += fd-002-posix-eq
 TEST_GEN_PROGS += fd-003-kthread
 TEST_GEN_PROGS += proc-loadavg-001
-TEST_GEN_PROGS += proc-pid-vm
 TEST_GEN_PROGS += proc-self-map-files-001
 TEST_GEN_PROGS += proc-self-map-files-002
 TEST_GEN_PROGS += proc-self-syscall
@@ -29,6 +28,7 @@ TEST_GEN_PROGS += proc-multiple-procfs
 TEST_GEN_PROGS += proc-fsconfig-hidepid
 
 TEST_GEN_PROGS_x86_64 += proc-empty-vm
+TEST_GEN_PROGS_x86_64 += proc-pid-vm
 
 TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH))
 
diff --git a/tools/testing/selftests/proc/proc-pid-vm.c b/tools/testing/selftests/proc/proc-pid-vm.c
index 69551bfa215c..6b0cb772b688 100644
--- a/tools/testing/selftests/proc/proc-pid-vm.c
+++ b/tools/testing/selftests/proc/proc-pid-vm.c
@@ -105,7 +105,6 @@ struct elf64_phdr {
 	uint64_t p_align;
 };
 
-#ifdef __x86_64__
 #define PAGE_SIZE 4096
 #define VADDR (1UL << 32)
 #define MAPS_OFFSET 73
@@ -209,7 +208,6 @@ static int make_exe(const uint8_t *payload, size_t len)
 
 	return fd1;
 }
-#endif
 
 /*
  * 0: vsyscall VMA doesn't exist	vsyscall=none
@@ -225,7 +223,6 @@ static const char str_vsyscall_1[] =
 static const char str_vsyscall_2[] =
 "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]\n";
 
-#ifdef __x86_64__
 static void sigaction_SIGSEGV(int _, siginfo_t *__, void *___)
 {
 	_exit(g_vsyscall);
@@ -493,9 +490,3 @@ int main(void)
 
 	return 0;
 }
-#else
-int main(void)
-{
-	return 4;
-}
-#endif
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ