Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'riscv-for-linus-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:
"A handful of fixes:

- a fix to properly select SPARSEMEM_STATIC on rv32

- a few fixes to kprobes

I don't generally like sending stuff this late, but these all seem
pretty safe"

* tag 'riscv-for-linus-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: keep interrupts disabled for BREAKPOINT exception
riscv: kprobes/ftrace: Add recursion protection to the ftrace callback
riscv: add do_page_fault and do_trap_break into the kprobes blacklist
riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM"

+16 -2
+1 -1
arch/riscv/Kconfig
··· 153 153 config ARCH_SPARSEMEM_ENABLE 154 154 def_bool y 155 155 depends on MMU 156 - select SPARSEMEM_STATIC if 32BIT && SPARSMEM 156 + select SPARSEMEM_STATIC if 32BIT && SPARSEMEM 157 157 select SPARSEMEM_VMEMMAP_ENABLE if 64BIT 158 158 159 159 config ARCH_SELECT_MEMORY_MODEL
+3
arch/riscv/kernel/entry.S
··· 130 130 */ 131 131 andi t0, s1, SR_PIE 132 132 beqz t0, 1f 133 + /* kprobes, entered via ebreak, must have interrupts disabled. */ 134 + li t0, EXC_BREAKPOINT 135 + beq s4, t0, 1f 133 136 #ifdef CONFIG_TRACE_IRQFLAGS 134 137 call trace_hardirqs_on 135 138 #endif
+10 -1
arch/riscv/kernel/probes/ftrace.c
··· 9 9 struct kprobe *p; 10 10 struct pt_regs *regs; 11 11 struct kprobe_ctlblk *kcb; 12 + int bit; 12 13 14 + bit = ftrace_test_recursion_trylock(ip, parent_ip); 15 + if (bit < 0) 16 + return; 17 + 18 + preempt_disable_notrace(); 13 19 p = get_kprobe((kprobe_opcode_t *)ip); 14 20 if (unlikely(!p) || kprobe_disabled(p)) 15 - return; 21 + goto out; 16 22 17 23 regs = ftrace_get_regs(fregs); 18 24 kcb = get_kprobe_ctlblk(); ··· 51 45 */ 52 46 __this_cpu_write(current_kprobe, NULL); 53 47 } 48 + out: 49 + preempt_enable_notrace(); 50 + ftrace_test_recursion_unlock(bit); 54 51 } 55 52 NOKPROBE_SYMBOL(kprobe_ftrace_handler); 56 53
+1
arch/riscv/kernel/traps.c
··· 178 178 else 179 179 die(regs, "Kernel BUG"); 180 180 } 181 + NOKPROBE_SYMBOL(do_trap_break); 181 182 182 183 #ifdef CONFIG_GENERIC_BUG 183 184 int is_valid_bugaddr(unsigned long pc)
+1
arch/riscv/mm/fault.c
··· 328 328 } 329 329 return; 330 330 } 331 + NOKPROBE_SYMBOL(do_page_fault);