Re: KRETPROBES are broken since kernel 5.8

2020-12-10 Thread Masami Hiramatsu
On Thu, 10 Dec 2020 18:14:30 +0100 Adam Zabrocki wrote: > Hi, > > > > However, there might be another issue which I wanted to brought / discuss > > > - > > > problem with optimizer. Until kernel 5.9 KRETPROBE on e.g. > > > 'ftrace_enable_sysctl' function was correctly optimized without any

Re: KRETPROBES are broken since kernel 5.8

2020-12-10 Thread Adam Zabrocki
Hi, > > However, there might be another issue which I wanted to brought / discuss - > > problem with optimizer. Until kernel 5.9 KRETPROBE on e.g. > > 'ftrace_enable_sysctl' function was correctly optimized without any > > problems. > > Did you check it on other functions? Did you see it

Re: KRETPROBES are broken since kernel 5.8

2020-12-10 Thread Masami Hiramatsu
Hi Adam, On Thu, 10 Dec 2020 08:17:42 +0100 Adam Zabrocki wrote: > Hi, > > On Thu, Dec 10, 2020 at 10:25:07AM +0900, Masami Hiramatsu wrote: > > Hi Adam, > > > > Thank you for reporting and debugging, actually we had investigated this > > issue in Aug. Please read this thread. > > > >

Re: KRETPROBES are broken since kernel 5.8

2020-12-09 Thread Adam Zabrocki
Hi, On Thu, Dec 10, 2020 at 10:25:07AM +0900, Masami Hiramatsu wrote: > Hi Adam, > > Thank you for reporting and debugging, actually we had investigated this > issue in Aug. Please read this thread. > > https://lkml.kernel.org/r/8816bdbbc55c4d2397e0b02aad282...@trendmicro.com > Thanks for the

Re: KRETPROBES are broken since kernel 5.8

2020-12-09 Thread Masami Hiramatsu
Hi Adam, Thank you for reporting and debugging, actually we had investigated this issue in Aug. Please read this thread. https://lkml.kernel.org/r/8816bdbbc55c4d2397e0b02aad282...@trendmicro.com We finally fixed this issue by commit e03b4a084ea6 ("kprobes: Remove NMI context check") and commit

KRETPROBES are broken since kernel 5.8

2020-12-09 Thread Adam Zabrocki
Hello, Starting from kernel 5.8 all non-optimized kretprobes don't work. Until 5.8, when #DB exception was raised, entry to the NMI was not fully performed. Among others, the following logic was executed: https://elixir.bootlin.com/linux/v5.7.19/source/arch/x86/kernel/traps.c#L589 if