linux-stable/arch/s390/lib
Ilie Halip 0700eab4df s390/test_unwind: use raw opcode instead of invalid instruction
[ Upstream commit 53ae723091 ]

Building with clang & LLVM_IAS=1 leads to an error:
    arch/s390/lib/test_unwind.c:179:4: error: invalid register pair
                        "       mvcl    %%r1,%%r1\n"
                        ^

The test creates an invalid instruction that would trap at runtime, but the
LLVM inline assembler tries to validate it at compile time too.

Use the raw instruction opcode instead.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1421
Link: https://lore.kernel.org/r/20211117174822.3632412-1-ilie.halip@gmail.com
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[hca@linux.ibm.com: use illegal opcode, and update comment]
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-17 10:30:14 +01:00
..
delay.c s390/delay: get rid of not needed header includes 2021-07-27 09:39:22 +02:00
error-inject.c s390: enable HAVE_FUNCTION_ERROR_INJECTION 2020-07-27 10:33:28 +02:00
find.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile s390: enable HAVE_FUNCTION_ERROR_INJECTION 2020-07-27 10:33:28 +02:00
mem.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
probes.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock.c s390/spinlock: remove confusing comment in arch_spin_lock_wait 2019-12-11 19:53:23 +01:00
string.c s390: fix strrchr() implementation 2021-10-12 13:07:37 +02:00
test_unwind.c s390/test_unwind: use raw opcode instead of invalid instruction 2021-12-17 10:30:14 +01:00
uaccess.c arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
xor.c s390/lib,xor: get rid of register asm 2021-06-28 11:18:28 +02:00