Patch "s390/test_unwind: use raw opcode instead of invalid instruction" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/test_unwind: use raw opcode instead of invalid instruction

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-test_unwind-use-raw-opcode-instead-of-invalid-i.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1b142fd2cd59c1d27a40ad6e8d5cc45050cf4624
Author: Ilie Halip <ilie.halip@xxxxxxxxx>
Date:   Wed Nov 17 19:48:21 2021 +0200

    s390/test_unwind: use raw opcode instead of invalid instruction
    
    [ Upstream commit 53ae7230918154d1f4281d7aa3aae9650436eadf ]
    
    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@xxxxxxxxxx>
    Signed-off-by: Ilie Halip <ilie.halip@xxxxxxxxx>
    Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Suggested-by: Ulrich Weigand <Ulrich.Weigand@xxxxxxxxxx>
    Link: https://github.com/ClangBuiltLinux/linux/issues/1421
    Link: https://lore.kernel.org/r/20211117174822.3632412-1-ilie.halip@xxxxxxxxx
    Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
    Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
    [hca@xxxxxxxxxxxxx: use illegal opcode, and update comment]
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c
index ecf327d743a03..c0635cf787e31 100644
--- a/arch/s390/lib/test_unwind.c
+++ b/arch/s390/lib/test_unwind.c
@@ -171,10 +171,11 @@ static noinline int unwindme_func4(struct unwindme *u)
 		}
 
 		/*
-		 * trigger specification exception
+		 * Trigger operation exception; use insn notation to bypass
+		 * llvm's integrated assembler sanity checks.
 		 */
 		asm volatile(
-			"	mvcl	%%r1,%%r1\n"
+			"	.insn	e,0x0000\n"	/* illegal opcode */
 			"0:	nopr	%%r7\n"
 			EX_TABLE(0b, 0b)
 			:);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux