Patch "s390: Initialize psw mask in perf_arch_fetch_caller_regs()" has been added to the 6.6-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: Initialize psw mask in perf_arch_fetch_caller_regs()

to the 6.6-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-initialize-psw-mask-in-perf_arch_fetch_caller_r.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 9d41d3560575dc9fce646fb9c176716088ddcf81
Author: Heiko Carstens <hca@xxxxxxxxxxxxx>
Date:   Thu Oct 10 17:52:39 2024 +0200

    s390: Initialize psw mask in perf_arch_fetch_caller_regs()
    
    [ Upstream commit 223e7fb979fa06934f1595b6ad0ae1d4ead1147f ]
    
    Also initialize regs->psw.mask in perf_arch_fetch_caller_regs().
    This way user_mode(regs) will return false, like it should.
    
    It looks like all current users initialize regs to zero, so that this
    doesn't fix a bug currently. However it is better to not rely on callers
    to do this.
    
    Fixes: 914d52e46490 ("s390: implement perf_arch_fetch_caller_regs")
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h
index 9917e2717b2b4..66aff768f8151 100644
--- a/arch/s390/include/asm/perf_event.h
+++ b/arch/s390/include/asm/perf_event.h
@@ -73,6 +73,7 @@ struct perf_sf_sde_regs {
 #define SAMPLE_FREQ_MODE(hwc)	(SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FREQ_MODE)
 
 #define perf_arch_fetch_caller_regs(regs, __ip) do {			\
+	(regs)->psw.mask = 0;						\
 	(regs)->psw.addr = (__ip);					\
 	(regs)->gprs[15] = (unsigned long)__builtin_frame_address(0) -	\
 		offsetof(struct stack_frame, back_chain);		\




[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