[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230721185445.GS4253@hirez.programming.kicks-ass.net>
Date: Fri, 21 Jul 2023 20:54:45 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Jens Axboe <axboe@...nel.dk>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Darren Hart <dvhart@...radead.org>, dave@...olabs.net,
andrealmeid@...lia.com, Andrew Morton <akpm@...ux-foundation.org>,
urezki@...il.com, Christoph Hellwig <hch@...radead.org>,
Lorenzo Stoakes <lstoakes@...il.com>,
linux-api@...r.kernel.org, linux-mm@...ck.org,
Linux-Arch <linux-arch@...r.kernel.org>, malteskarupke@....de
Subject: Re: [PATCH v1 05/14] futex: Add sys_futex_wake()
On Fri, Jul 21, 2023 at 05:41:20PM +0200, Arnd Bergmann wrote:
> On Fri, Jul 21, 2023, at 12:22, Peter Zijlstra wrote:
> > --- a/arch/arm/tools/syscall.tbl
> > +++ b/arch/arm/tools/syscall.tbl
> > @@ -465,3 +465,4 @@
> > 449 common futex_waitv sys_futex_waitv
> > 450 common set_mempolicy_home_node sys_set_mempolicy_home_node
> > 451 common cachestat sys_cachestat
> > +452 common futex_wake sys_futex_wake
>
> This clashes with __NR_fchmodat2 in linux-next, which also wants number 452.
Yeah, I fully expected some collisions :/ Unavoidable.
> > --- a/arch/arm64/include/asm/unistd32.h
> > +++ b/arch/arm64/include/asm/unistd32.h
> > @@ -909,6 +909,8 @@ __SYSCALL(__NR_futex_waitv, sys_futex_wa
> > __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node)
> > #define __NR_cachestat 451
> > __SYSCALL(__NR_cachestat, sys_cachestat)
> > +#define __NR_futex_wake 452
> > +__SYSCALL(__NR_futex_wake, sys_futex_wake)
> >
> > /*
> > * Please add new compat syscalls above this comment and update
>
> Unfortunately, changing this file still requires updating __NR_compat_syscalls
> in arch/arm64/include/asm/unistd.h as well.
Bah I missed that. I'll go fix it up. Thanks!
> > --- a/kernel/sys_ni.c
> > +++ b/kernel/sys_ni.c
> > @@ -87,6 +87,7 @@ COND_SYSCALL_COMPAT(set_robust_list);
> > COND_SYSCALL(get_robust_list);
> > COND_SYSCALL_COMPAT(get_robust_list);
> > COND_SYSCALL(futex_waitv);
> > +COND_SYSCALL(futex_wake);
> > COND_SYSCALL(kexec_load);
> > COND_SYSCALL_COMPAT(kexec_load);
> > COND_SYSCALL(init_module);
>
> This is fine for the moment, but I wonder if we should start making
> futex mandatory at some point. Right now, sparc32 with CONFIG_SMP
> cannot support futex because of the lack of atomics in early
> sparc processors, but sparc32 glibc actually requires futexes
> and consequently only works on uniprocessor machines, on sparc64
> compat mode, or on Leon3 with out of tree patches.
PARISC is another 'fun' case.
Powered by blists - more mailing lists