mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 09:51:21 -04:00
Merge tag 'powerpc-5.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: "Fix initrd corruption caused by our recent change to use relative jump labels. Fix a crash using perf record on systems without a hardware PMU backend. Rework our 64-bit signal handling slighty to make it more closely match the old behaviour, after the recent change to use unsafe user accessors. Thanks to Anastasia Kovaleva, Athira Rajeev, Christophe Leroy, Daniel Axtens, Greg Kurz, and Roman Bolshakov" * tag 'powerpc-5.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set powerpc: Fix initrd corruption with relative jump labels powerpc/signal64: Copy siginfo before changing regs->nip powerpc/mem: Add back missing header to fix 'no previous prototype' error
This commit is contained in:
@@ -50,7 +50,7 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, bool
|
||||
1098: nop; \
|
||||
.pushsection __jump_table, "aw"; \
|
||||
.long 1098b - ., LABEL - .; \
|
||||
FTR_ENTRY_LONG KEY; \
|
||||
FTR_ENTRY_LONG KEY - .; \
|
||||
.popsection
|
||||
#endif
|
||||
|
||||
|
||||
@@ -902,6 +902,10 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
|
||||
unsafe_copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set), badframe_block);
|
||||
user_write_access_end();
|
||||
|
||||
/* Save the siginfo outside of the unsafe block. */
|
||||
if (copy_siginfo_to_user(&frame->info, &ksig->info))
|
||||
goto badframe;
|
||||
|
||||
/* Make sure signal handler doesn't get spurious FP exceptions */
|
||||
tsk->thread.fp_state.fpscr = 0;
|
||||
|
||||
@@ -915,11 +919,6 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
|
||||
regs->nip = (unsigned long) &frame->tramp[0];
|
||||
}
|
||||
|
||||
|
||||
/* Save the siginfo outside of the unsafe block. */
|
||||
if (copy_siginfo_to_user(&frame->info, &ksig->info))
|
||||
goto badframe;
|
||||
|
||||
/* Allocate a dummy caller frame for the signal handler. */
|
||||
newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
|
||||
err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/rtas.h>
|
||||
#include <asm/kasan.h>
|
||||
#include <asm/sparsemem.h>
|
||||
#include <asm/svm.h>
|
||||
|
||||
#include <mm/mmu_decl.h>
|
||||
|
||||
@@ -2254,7 +2254,7 @@ unsigned long perf_instruction_pointer(struct pt_regs *regs)
|
||||
bool use_siar = regs_use_siar(regs);
|
||||
unsigned long siar = mfspr(SPRN_SIAR);
|
||||
|
||||
if (ppmu->flags & PPMU_P10_DD1) {
|
||||
if (ppmu && (ppmu->flags & PPMU_P10_DD1)) {
|
||||
if (siar)
|
||||
return siar;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user