[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114174325.GC29305@redhat.com>
Date: Tue, 14 Jan 2025 18:43:26 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Jiri Olsa <olsajiri@...il.com>, Aleksa Sarai <cyphar@...har.com>,
Eyal Birger <eyal.birger@...il.com>, mhiramat@...nel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-trace-kernel@...r.kernel.org,
BPF-dev-list <bpf@...r.kernel.org>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>, tglx@...utronix.de,
bp@...en8.de, x86@...nel.org, linux-api@...r.kernel.org,
Andrii Nakryiko <andrii@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii.nakryiko@...il.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>, rafi@....io,
Shmulik Ladkani <shmulik.ladkani@...il.com>
Subject: Re: Crash when attaching uretprobes to processes running in Docker
On 01/14, Peter Zijlstra wrote:
>
> On Tue, Jan 14, 2025 at 01:32:58PM +0100, Oleg Nesterov wrote:
>
> > OK, suppose we have
> >
> > void start_SECCOMP_MODE_STRICT(void)
> > {
> > // in particular nacks __NR_uretprobe
> > seccomp(SECCOMP_MODE_STRICT, ...);
> > }
> >
> > and we want to add uretprobe to this function.
> >
> > In this case prepare_uretprobe() can't know that sys_uretprobe() won't
> > work when this function returns?
>
> Indeed. But any further probes placed after seccomp() would be able to,
> and installing trampolines for them would be a waste, no?
But the probed task will crash when it returns from
start_SECCOMP_MODE_STRICT() above.
Even if, due to seccomp filtering, sys_uretprobe() doesn't kill the task
(I missed the fact it can) but just returns ENOSYS/whatever.
Oleg.
Powered by blists - more mailing lists