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]
Date: Wed,  5 Jun 2024 17:24:48 +0530
From: Dev Jain <dev.jain@....com>
To: linux-arm-kernel@...ts.infradead.org,
	catalin.marinas@....com,
	will@...nel.org,
	shuah@...nel.org,
	linux-kselftest@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	broonie@...nel.org,
	suzuki.poulose@....com,
	Anshuman.Khandual@....com,
	Dev Jain <dev.jain@....com>
Subject: [PATCH] selftests: arm64: Fix redundancy of a testcase

Currently, we are writing the same value as we read, into the TLS
register; hence, we cannot confirm updation of the register, making the
testcase "verify_tpidr_one" redundant. Fix this; while at it, do a style
change.

Signed-off-by: Dev Jain <dev.jain@....com>
---
 tools/testing/selftests/arm64/abi/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/arm64/abi/ptrace.c b/tools/testing/selftests/arm64/abi/ptrace.c
index abe4d58d731d..c105703442f9 100644
--- a/tools/testing/selftests/arm64/abi/ptrace.c
+++ b/tools/testing/selftests/arm64/abi/ptrace.c
@@ -47,7 +47,7 @@ static void test_tpidr(pid_t child)
 
 	/* ...write a new value.. */
 	write_iov.iov_len = sizeof(uint64_t);
-	write_val[0] = read_val[0]++;
+	write_val[0] = read_val[0] + 1;
 	ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov);
 	ksft_test_result(ret == 0, "write_tpidr_one\n");
 
@@ -108,7 +108,7 @@ static void test_tpidr(pid_t child)
 		/* Writing only TPIDR... */
 		write_iov.iov_len = sizeof(uint64_t);
 		memcpy(write_val, read_val, sizeof(read_val));
-		write_val[0] += 1;
+		++write_val[0];
 		ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov);
 
 		if (ret == 0) {
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ