History

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

Linus Torvalds committed 5 years ago

Commit b84a7c22 parents 913ec3c 60b7ed54 files · +7 −7Browse files

Unified · Split

4 files
  1. arch/powerpc/include/asm/jump_label.h +1 −1
  2. arch/powerpc/kernel/signal_64.c +4 −5
  3. arch/powerpc/mm/mem.c +1 −0
  4. arch/powerpc/perf/core-book3s.c +1 −1
arch/powerpc/include/asm/jump_label.h+1−1
@@ -50,7 +50,7 @@ l_yes: · 49 unmodified lines
501098: nop; \501098: nop; \
51 .pushsection __jump_table, "aw"; \51 .pushsection __jump_table, "aw"; \
52 .long 1098b - ., LABEL - .; \52 .long 1098b - ., LABEL - .; \
53 FTR_ENTRY_LONG KEY; \53 FTR_ENTRY_LONG KEY - .; \
54 .popsection54 .popsection
55#endif55#endif
56 56
arch/powerpc/kernel/signal_64.c+4−5
@@ -902,6 +902,10 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, · 901 unmodified lines
902 unsafe_copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set), badframe_block);902 unsafe_copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set), badframe_block);
903 user_write_access_end();903 user_write_access_end();
904 904
905 /* Save the siginfo outside of the unsafe block. */
906 if (copy_siginfo_to_user(&frame->info, &ksig->info))
907 goto badframe;
908
905 /* Make sure signal handler doesn't get spurious FP exceptions */909 /* Make sure signal handler doesn't get spurious FP exceptions */
906 tsk->thread.fp_state.fpscr = 0;910 tsk->thread.fp_state.fpscr = 0;
907 911
@@ -915,11 +919,6 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, · 7 unmodified lines
915 regs->nip = (unsigned long) &frame->tramp[0];919 regs->nip = (unsigned long) &frame->tramp[0];
916 }920 }
917 921
918
919 /* Save the siginfo outside of the unsafe block. */
920 if (copy_siginfo_to_user(&frame->info, &ksig->info))
921 goto badframe;
922
923 /* Allocate a dummy caller frame for the signal handler. */922 /* Allocate a dummy caller frame for the signal handler. */
924 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;923 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
925 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);924 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
arch/powerpc/mm/mem.c+1−0
@@ -20,6 +20,7 @@ · 19 unmodified lines
20#include <asm/machdep.h>20#include <asm/machdep.h>
21#include <asm/rtas.h>21#include <asm/rtas.h>
22#include <asm/kasan.h>22#include <asm/kasan.h>
23#include <asm/sparsemem.h>
23#include <asm/svm.h>24#include <asm/svm.h>
24 25
25#include <mm/mmu_decl.h>26#include <mm/mmu_decl.h>
arch/powerpc/perf/core-book3s.c+1−1
@@ -2254,7 +2254,7 @@ unsigned long perf_instruction_pointer(struct pt_regs *regs) · 2253 unmodified lines
2254 bool use_siar = regs_use_siar(regs);2254 bool use_siar = regs_use_siar(regs);
2255 unsigned long siar = mfspr(SPRN_SIAR);2255 unsigned long siar = mfspr(SPRN_SIAR);
2256 2256
2257 if (ppmu->flags & PPMU_P10_DD1) {2257 if (ppmu && (ppmu->flags & PPMU_P10_DD1)) {
2258 if (siar)2258 if (siar)
2259 return siar;2259 return siar;
2260 else2260 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t