Skip to contentSkip to conversation

ecb8bd70d5: kernel-selftests.vDSO.vdso_standalone_test_x86.fail

linus:master In review kernel test robot 3 participants 4 messages Sep 24, 2024 – Sep 27, 2024

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

Hello,

kernel test robot noticed "kernel-selftests.vDSO.vdso_standalone_test_x86.fail" on:

commit: ecb8bd70d51ccf9009219a6097cef293deada65b ("selftests: vDSO: build tests with O2 optimization")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

in testcase: kernel-selftests
version: kernel-selftests-x86_64-977d51cf-1_20240508 with following parameters:

	group: group-03

compiler: gcc-12
test machine: 36 threads 1 sockets Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz (Cascade Lake) with 32G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-lkp/[email protected]

# timeout set to 300
# selftests: vDSO: vdso_standalone_test_x86
# Segmentation fault
not ok 5 selftests: vDSO: vdso_standalone_test_x86 # exit=139

The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240924/[email protected]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw

PATCH 1/1 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")
---
 tools/testing/selftests/vDSO/vdso_standalone_test_x86.c | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/vDSO/vdso_standalone_test_x86.c +2 -0
index 27f6fdf11969..644915862af8 100644
@@ -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"
Signature · 1 line
2.46.0
#2 lore raw

Re: [PATCH] selftests: vDSO: align stack for O2-optimized memcpy

Hi Shuah,

Quoted 8 lines · Jason A. Donenfeld

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")

Just FYI, I'm expecting that this is a patch you take through your tree for 6.12, and hopefully before rc1, as automated testing is failing.

Jason

maintainer
#3 lore raw

Re: [PATCH] selftests: vDSO: align stack for O2-optimized memcpy

Quoted 6 lines · Jason A. Donenfeld

Hi Shuah,

Quoted 3 lines · Jason A. Donenfeld

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.

I fixed this spelling when I apply. checkpatch is good at catching these by the way.

Quoted 10 lines
Quoted 5 lines
Fixes ecb8bd70d51 ("selftests: vDSO: build tests with O2 optimization")

Just FYI, I'm expecting that this is a patch you take through your tree for 6.12, and hopefully before rc1, as automated testing is failing.

Jason

Okay. Thanks for letting me know.

I will try to send this up for rc1 if at all possible.

Applied to linux-kselftest next

thanks,
-- Shuah