diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2024-10-10 17:52:39 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-10-16 11:32:32 +0200 |
commit | 223e7fb979fa06934f1595b6ad0ae1d4ead1147f (patch) | |
tree | a00acb034ba3df3589ec35b58857caed869fba7c /arch | |
parent | dee3df68ab4b00fff6bdf9fc39541729af37307c (diff) |
s390: Initialize psw mask in perf_arch_fetch_caller_regs()
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@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/perf_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h index 66200d4a2134..29ee289108c5 100644 --- a/arch/s390/include/asm/perf_event.h +++ b/arch/s390/include/asm/perf_event.h @@ -49,6 +49,7 @@ struct perf_sf_sde_regs { }; #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); \ |