Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [linus:master] [selftests]  ecb8bd70d5: kernel-selftests.vDSO.vdso_standalone_test_x86.fail
@ 2024-09-24  8:08 kernel test robot
  2024-09-24 11:47 ` [PATCH] selftests: vDSO: align stack for O2-optimized memcpy Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-09-24  8:08 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: oe-lkp, lkp, linux-kernel, Jason A. Donenfeld, linux-kselftest,
	oliver.sang



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 <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com



# 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/202409241558.98e13f6f-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] selftests: vDSO: align stack for O2-optimized memcpy
  2024-09-24  8:08 [linus:master] [selftests] ecb8bd70d5: kernel-selftests.vDSO.vdso_standalone_test_x86.fail kernel test robot
@ 2024-09-24 11:47 ` Jason A. Donenfeld
  2024-09-27 17:24   ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2024-09-24 11:47 UTC (permalink / raw)
  To: christophe.leroy, linux-kselftest, linux-kernel, skhan
  Cc: Jason A. Donenfeld, kernel test robot

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@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests: vDSO: align stack for O2-optimized memcpy
  2024-09-24 11:47 ` [PATCH] selftests: vDSO: align stack for O2-optimized memcpy Jason A. Donenfeld
@ 2024-09-27 17:24   ` Jason A. Donenfeld
  2024-09-27 18:19     ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2024-09-27 17:24 UTC (permalink / raw)
  To: christophe.leroy, linux-kselftest, linux-kernel, skhan; +Cc: kernel test robot

Hi Shuah,

On Tue, Sep 24, 2024 at 01:47:23PM +0200, Jason A. Donenfeld wrote:
> 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@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests: vDSO: align stack for O2-optimized memcpy
  2024-09-27 17:24   ` Jason A. Donenfeld
@ 2024-09-27 18:19     ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2024-09-27 18:19 UTC (permalink / raw)
  To: Jason A. Donenfeld, christophe.leroy, linux-kselftest,
	linux-kernel
  Cc: kernel test robot, Shuah Khan

On 9/27/24 11:24, Jason A. Donenfeld wrote:
> Hi Shuah,
> 
> On Tue, Sep 24, 2024 at 01:47:23PM +0200, Jason A. Donenfeld wrote:
>> 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.

>>
>> Fixes: ecb8bd70d51 ("selftests: vDSO: build tests with O2 optimization")
>> Reported-by: kernel test robot <oliver.sang@intel.com>
>> Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com
>> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
>   
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-27 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24  8:08 [linus:master] [selftests] ecb8bd70d5: kernel-selftests.vDSO.vdso_standalone_test_x86.fail kernel test robot
2024-09-24 11:47 ` [PATCH] selftests: vDSO: align stack for O2-optimized memcpy Jason A. Donenfeld
2024-09-27 17:24   ` Jason A. Donenfeld
2024-09-27 18:19     ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox