[PATCH] powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()
Naveen N. Rao
naveen.n.rao at linux.vnet.ibm.com
Wed Oct 12 20:52:51 AEDT 2022
Li Huafei wrote:
>>>
>>> # echo 'p cmdline_proc_show' > kprobe_events
>>> # echo 'p cmdline_proc_show+16' >> kprobe_events
>>
>> I think we should extend multiple_kprobes selftest to also place
>> contiguous probes to catch such errors.
>>
> Yes. But each architecture implementation is different and it looks a
> little difficult to decide which offsets need to be tested.
I don't think we need to be accurate here. A test to simply try putting
a probe at every byte within the first 256 bytes of a kernel function
should help catch many such issues. Some of those probes will be
rejected, but we can ignore errors.
- Naveen
More information about the Linuxppc-dev
mailing list