Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management
From: Oleg Nesterov <oleg@redhat.com>
Date: 2024-07-09 21:33:27
Also in:
bpf
From: Oleg Nesterov <oleg@redhat.com>
Date: 2024-07-09 21:33:27
Also in:
bpf
On 07/09, Andrii Nakryiko wrote:
On Tue, Jul 9, 2024 at 11:49 AM Oleg Nesterov [off-list ref] wrote:quoted
quoted
Yep, that would be unfortunate (just like SIGILL sent when uretprobe detects "improper" stack pointer progression, for example),In this case we a) assume that user-space tries to fool the kernel andWell, it's a bad assumption. User space might just be using fibers and managing its own stack.
Do you mean something like the "go" language? Yes, not supported. And from the kernel perspective it still looks as if user-space tries to fool the kernel. I mean, if you insert a ret-probe, the kernel assumes that it "owns" the stack, if nothing else the kernel has to change the ret-address on stack. I agree, this is not good. But again, what else the kernel can do in this case?
quoted
Not really expected, and that is why the "TODO" comment in _unregister() was never implemented. Although the real reason is that we are lazy ;)Worked fine for 10+ years, which says something ;)
Or may be it doesn't but we do not know because this code doesn't do uprobe_warn() ;) Oleg.