Re: [PATCH] x86/syscalls: shrink entry/syscall_32.i via IWYU

Nick Desaulniers
2024-01-03T16:50:36Z

On Wed, Dec 27, 2023 at 4:45 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Wed, Dec 27, 2023 at 11:34:44PM +0000, Al Viro wrote:
>
> > That's _it_. The same goes for syscall_64.c and syscall_x32.c.
> > Oh, and lose the __visible/asmlinkage junk in there - none of that
> > stuff is used from asm these days. See the patch below -
> > Untested But Should Work(tm):
>
> Unfortunately, there's this in kernel/trace/trace_syscalls.c:
>
> unsigned long __init __weak arch_syscall_addr(int nr)
> {
> return (unsigned long)sys_call_table[nr];
> }
>
> How is that supposed to work for anything biarch? Including
> amd64 with CONFIG_COMPAT enabled?

commit f431b634f24d ("tracing/syscalls: Allow archs to ignore tracing
compat syscalls")

added a comment block about ARCH_TRACE_IGNORE_COMPAT_SYSCALLS, which
is defined for x86 in arch/x86/include/asm/ftrace.h.

The implementation of arch_syscall_addr for mips is quite complex;
dependent on quite a few different configs.

--
Thanks,
~Nick Desaulniers