mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
linux-kselftest-fixes-6.3-rc5
This Kselftest fixes update for Linux 6.3-rc5 consists of one single fix for sigaltstack test -Wuninitialized warning found when building with clang. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmQjEZsACgkQCwJExA0N Qxzgeg//RJZvZr1iqQ0w+C21e4BRzMMPjQEwAbKEoN9opiRx4nzMdSoJKxl3x66S NTSaAST89plIaJGpHAbqC59SVWsUwBY9XdrknNV7PAwIBx4yHeQ8JlpIOK6dXoYV tyGQxKvOQOtKP+Ou8iGKP9yv81dZylrcCVDrWG34xfZRqo3FIL6cs/U3DiGF+k8D ofLKaqqENdOJtXzE6aIk4hJK7I60EvMealwF22KLnOKaNl8Lh6zWCRzf6BAV7eYY 8NO8sg4nAjszDF3HBkgxN7ON3c8Ei8Rn8DMfh5nhV6ni0wkwkd6uabcVaewixvJ2 qbVVRuBRECUqvJ1AwYizmXszizDEPTrl/1F8EpTmwe3rXd61WazN9eEXUW3chCeu bQJaBzKYVemy/d+JEEYwgHHg9kM7V80wlZE9lnPtocZp4agkkvKqInGBeaTSbyuX sEeYk1QPDBQ5kVqjzydm6eNqkG4l4g0o8GJHfKy0cO98vYt/IcJirMpP6iXI7aNt Z+VZsD8lIMoiLJ/mk1+uJqUvj8Er/BePwoaSgQDa8HEjtYC0umrpPtSErLb43cDO f8pWVLdaSF55lD+O4JC5QJcjPj1xQkHlo6J4B3vWPC2rHZX8VBfpFxuhBobOUO3S M1nDO+iODepDTxY/mm4p7lSct3a7oOoGxjj7lFUCG3DLHwqRiLg= =cSRs -----END PGP SIGNATURE----- Merge tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "One single fix for sigaltstack test -Wuninitialized warning found when building with clang" * tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: sigaltstack: fix -Wuninitialized
This commit is contained in:
commit
756c1a0593
23
tools/testing/selftests/sigaltstack/current_stack_pointer.h
Normal file
23
tools/testing/selftests/sigaltstack/current_stack_pointer.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#if __alpha__
|
||||
register unsigned long sp asm("$30");
|
||||
#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv
|
||||
register unsigned long sp asm("sp");
|
||||
#elif __i386__
|
||||
register unsigned long sp asm("esp");
|
||||
#elif __loongarch64
|
||||
register unsigned long sp asm("$sp");
|
||||
#elif __ppc__
|
||||
register unsigned long sp asm("r1");
|
||||
#elif __s390x__
|
||||
register unsigned long sp asm("%15");
|
||||
#elif __sh__
|
||||
register unsigned long sp asm("r15");
|
||||
#elif __x86_64__
|
||||
register unsigned long sp asm("rsp");
|
||||
#elif __XTENSA__
|
||||
register unsigned long sp asm("a1");
|
||||
#else
|
||||
#error "implement current_stack_pointer equivalent"
|
||||
#endif
|
@ -20,6 +20,7 @@
|
||||
#include <sys/auxv.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "current_stack_pointer.h"
|
||||
|
||||
#ifndef SS_AUTODISARM
|
||||
#define SS_AUTODISARM (1U << 31)
|
||||
@ -46,12 +47,6 @@ void my_usr1(int sig, siginfo_t *si, void *u)
|
||||
stack_t stk;
|
||||
struct stk_data *p;
|
||||
|
||||
#if __s390x__
|
||||
register unsigned long sp asm("%15");
|
||||
#else
|
||||
register unsigned long sp asm("sp");
|
||||
#endif
|
||||
|
||||
if (sp < (unsigned long)sstack ||
|
||||
sp >= (unsigned long)sstack + stack_size) {
|
||||
ksft_exit_fail_msg("SP is not on sigaltstack\n");
|
||||
|
Loading…
Reference in New Issue
Block a user