[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <672a3c33-19b3-4451-a259-27b3931640b6@app.fastmail.com>
Date: Wed, 24 Jul 2024 10:11:49 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Dmitry V. Levin" <ldv@...ace.io>, "Jiri Olsa" <jolsa@...nel.org>
Cc: "Steven Rostedt" <rostedt@...dmis.org>,
"Masami Hiramatsu" <mhiramat@...nel.org>, "Oleg Nesterov" <oleg@...hat.com>,
"Peter Zijlstra" <peterz@...radead.org>,
"Andrii Nakryiko" <andrii@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-api@...r.kernel.org,
x86@...nel.org, bpf@...r.kernel.org, "Thomas Gleixner" <tglx@...utronix.de>,
"Borislav Petkov" <bp@...en8.de>, "Ingo Molnar" <mingo@...hat.com>,
"Andy Lutomirski" <luto@...nel.org>, "Deepak Gupta" <debug@...osinc.com>,
"Stephen Rothwell" <sfr@...b.auug.org.au>
Subject: Re: [PATCH 1/2] uprobe: Change uretprobe syscall scope and number
On Wed, Jul 24, 2024, at 09:46, Dmitry V. Levin wrote:
> On Fri, Jul 12, 2024 at 03:52:27PM +0200, Jiri Olsa wrote:
>> diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl
>> index 6452c2ec469a..dabf1982de6d 100644
>> --- a/arch/x86/entry/syscalls/syscall_64.tbl
>> +++ b/arch/x86/entry/syscalls/syscall_64.tbl
>> @@ -384,7 +384,7 @@
>> 460 common lsm_set_self_attr sys_lsm_set_self_attr
>> 461 common lsm_list_modules sys_lsm_list_modules
>> 462 common mseal sys_mseal
>> -463 64 uretprobe sys_uretprobe
>> +467 common uretprobe sys_uretprobe
>>
>> #
>> # Due to a historical design error, certain syscalls are numbered differently
>
> Isn't include/uapi/asm-generic/unistd.h expected to be updated as well?
> As of mainline commit v6.10-12246-g786c8248dbd3, it still contains
>
> #define __NR_uretprobe 463
The file is currently unused and replaced with scripts/syscall.tbl,
my plan was to remove the old file in the 6.12 syscall cleanups.
The number in scripts/syscall.tbl is now 467, so its users (arc,
arm64, csky, hegagon, loongarch, nios2 openrisc and riscv) have
the same number as on x86.
However, the corresponding change did not make it into the
other syscall.tbl files (alpha, arm, m68k, microblaze, parisc,
powerpc, s390, sh, sparc and xtensa), which is rather
inconsistent.
I think we should definitely make all non-x86 architectures
behave the same way, either with or without an entry for
uretprobe. There are three ways do do this:
a) remove it from both include/uapi/asm/unistd.h and
scripts/syscall.tbl, and change the x86-64 system call
to a private number such as 335
b) remove it from both include/uapi/asm/unistd.h and
scripts/syscall.tbl, but leave the number at 467
c) add the syscall to all other architectures for
consistency, but continue to have it return -ENOSYS.
>From Linus' earlier comments, I would guess that a) would
be the least bad of those. I'm also unsure about the status
of the xattrat patches, which were the reason for
changing uretprobe from 463 to 467. Those patches are still
not merged either, and disappeared from linux-next between
Friday and Monday.
Arnd
Powered by blists - more mailing lists