[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240924115001.916112-1-Jason@zx2c4.com>
Date: Tue, 24 Sep 2024 13:47:23 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: christophe.leroy@...roup.eu,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
kernel test robot <oliver.sang@...el.com>
Subject: [PATCH] selftests: vDSO: align stack for O2-optimized memcpy
When switching on -O2, gcc generates SSE2 instructions that assume a
16-byte aligned stack, which the standalone test's start point wasn't
aligning. Fix this with the usual alignnent sequence.
Fixes: ecb8bd70d51 ("selftests: vDSO: build tests with O2 optimization")
Reported-by: kernel test robot <oliver.sang@...el.com>
Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com
Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
---
tools/testing/selftests/vDSO/vdso_standalone_test_x86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c b/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
index 27f6fdf11969..644915862af8 100644
--- a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
+++ b/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
@@ -131,6 +131,8 @@ asm (
"_start:\n\t"
#ifdef __x86_64__
"mov %rsp,%rdi\n\t"
+ "and $-16,%rsp\n\t"
+ "sub $8,%rsp\n\t"
"jmp c_main"
#else
"push %esp\n\t"
--
2.46.0
Powered by blists - more mailing lists