[PATCH 01/13] syscalls: compat: Fix the missing part for __SYSCALL_COMPAT
Arnd Bergmann
arnd at arndb.de
Wed Dec 22 03:24:52 PST 2021
On Wed, Dec 22, 2021 at 12:16 PM Guo Ren <guoren at kernel.org> wrote:
> On Wed, Dec 22, 2021 at 1:09 AM Arnd Bergmann <arnd at arndb.de> wrote:
> > On Tue, Dec 21, 2021 at 5:35 PM <guoren at kernel.org> wrote:
> > > /* 295 through 402 are unassigned to sync up with generic numbers, don't use */
> > > -#if __BITS_PER_LONG == 32
> > > +#if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32
> > > #define __NR_clock_gettime64 403
> > > __SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
> >
> > This part looks wrong, you expose clock_gettime64 to user space this way, both
> > in asm/unistd.h and in the table.
> >
>
> No, we only define __SYSCALL_COMPAT in compat_syscall_table.c. It
> won't be expose to user space, because there is no __SYSCALL_COMPAT.
Ok, it looks good then. It feels like we should have a macro to wrap this, but
in reality what we should actually do is to convert the entire file to the
more modern syscall.tbl format, so let's just stay with your version.
Arnd
More information about the linux-riscv
mailing list