[PATCH] module: invoke kobject uevent before sending LIVE notification

2021-01-12 Thread Adam Zabrocki
nt and can be integrity-checked as soon as the module is LIVE. To make all of these projects happy at once, move the kobject KOBJ_ADD uevent to just before sending the MODULE_STATE_LIVE notification. Fixes: 38dc717e9715 ("module: delay kobject uevent until after module init call")

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: [PATCH] x86/kprobes: Fix optprobe to detect padding int3 correctly

2020-12-11 Thread Adam Zabrocki
e from the linker. In that case, > > optprobe continues jump optimization. > > > > Fixes: 7705dc855797 ("x86/vmlinux: Use INT3 instead of NOP for linker fill > > bytes") > > Cc: sta...@vger.kernel.org > > Reported-by: Adam Zabrocki > > Signed-of

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

Re: KRETPROBES are broken since kernel 5.8

2020-12-09 Thread Adam Zabrocki
imize such functions when they are padded with INT3? > If it is OK, we should backport those to stable tree. Agreed. Thanks, Adam > Thank you, > > On Wed, 9 Dec 2020 22:50:01 +0100 > Adam Zabrocki wrote: > > > Hello, > > > > Starting from kernel

Re: Linux Kernel module notification bug

2021-01-11 Thread Adam Zabrocki
Hello, On Mon, Jan 11, 2021 at 03:20:48PM +0100, Jessica Yu wrote: > +++ Adam Zabrocki [10/01/21 18:54 +0100]: > > Hello, > > > > I believe that the following commit does introduce a gentle "functionality > > bug": > > > > "module: delay k

Linux Kernel module notification bug

2021-01-10 Thread Adam Zabrocki
Hello, I believe that the following commit does introduce a gentle "functionality bug": "module: delay kobject uevent until after module init call": https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/kernel/module.c?id=38dc717e97153e46375ee21797aa54777e5498f3 The official