Patch "s390: Mark psw in __load_psw_mask() as __unitialized" has been added to the 6.1-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: Mark psw in __load_psw_mask() as __unitialized

to the 6.1-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-mark-psw-in-__load_psw_mask-as-__unitialized.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 2798f70f8a25a0f85b182c2d2ab9a66d035c8f2a
Author: Sven Schnelle <svens@xxxxxxxxxxxxx>
Date:   Tue Apr 30 16:30:01 2024 +0200

    s390: Mark psw in __load_psw_mask() as __unitialized
    
    [ Upstream commit 7278a8fb8d032dfdc03d9b5d17e0bc451cdc1492 ]
    
    Without __unitialized, the following code is generated when
    INIT_STACK_ALL_ZERO is enabled:
    
    86: d7 0f f0 a0 f0 a0     xc      160(16,%r15), 160(%r15)
    8c: e3 40 f0 a0 00 24     stg     %r4, 160(%r15)
    92: c0 10 00 00 00 08     larl    %r1, 0xa2
    98: e3 10 f0 a8 00 24     stg     %r1, 168(%r15)
    9e: b2 b2 f0 a0           lpswe   160(%r15)
    
    The xc is not adding any security because psw is fully initialized
    with the following instructions. Add __unitialized to the psw
    definitiation to avoid the superfluous clearing of psw.
    
    Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
    Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index c907f747d2a04..26861b09293f1 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -250,8 +250,8 @@ static inline void __load_psw(psw_t psw)
  */
 static __always_inline void __load_psw_mask(unsigned long mask)
 {
+	psw_t psw __uninitialized;
 	unsigned long addr;
-	psw_t psw;
 
 	psw.mask = mask;
 




[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