Thread (47 messages) 47 messages, 9 authors, 2025-01-17

Re: Crash when attaching uretprobes to processes running in Docker

From: Eyal Birger <hidden>
Date: 2025-01-15 13:24:33
Also in: bpf, linux-trace-kernel, lkml

Hi,

On Wed, Jan 15, 2025 at 1:36 AM Jiri Olsa [off-list ref] wrote:
On Tue, Jan 14, 2025 at 06:25:20PM +0100, Oleg Nesterov wrote:
quoted
On 01/14, Jiri Olsa wrote:
quoted
ugh.. could we just 'disable' uretprobe trampoline when seccomp gets enabled?
overwrite first byte with int3.. and similarly check on seccomp when installing
uretprobe and switch to int3
Sorry, I don't understand... What exactly we can do? Aside from checking
IS_ENABLED(CONFIG_SECCOMP) in arch_uprobe_trampoline() ?
I need to check more on seccomp, but I imagine we could do following:
  - when seccomp filter is installed we could check uprobe trampoline
    and if it's already installed we change it to int3 trampoline
  - when uprobe trampoline is getting installed we check if there's
    seccomp filter installed for task and we use int3 trampoline
Sounds reasonable to me.
I'm wondering how hard it is to figure out the seccomp installation
given that from what I understand it's inherited.
other than that I guess we will have to add sysctl to enable uretprobe
trampoline..
I'm wondering when one would enable/disable such sysctl.
"Give me speed but potentially crash processes I don't control"
is a curious semantic...

Eyal
jirka
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help