Re: [RFC PATCH 01/19] powerpc/perf: callchain validate kernel stack pointer bounds

2022-11-04 Thread Segher Boessenkool
On Mon, Oct 31, 2022 at 03:54:22PM +1000, Nicholas Piggin wrote: > Could the user set r1 to be equal to the address matching the first > interrupt frame - STACK_INT_FRAME_SIZE, which is in the previous page > due to the kernel redzone, and induce the kernel to load the marker from > there? Possibly

[RFC PATCH 01/19] powerpc/perf: callchain validate kernel stack pointer bounds

2022-10-30 Thread Nicholas Piggin
The interrupt frame detection and loads from the hypothetical pt_regs are not bounds-checked. The next-frame validation only bounds-checks STACK_FRAME_OVERHEAD, which does not include the pt_regs. Add another test for this. Signed-off-by: Nicholas Piggin --- Could the user set r1 to be equal to