From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Darren Hart <dvhart@infradead.org>,
dave@stgolabs.net, andrealmeid@igalia.com,
Andrew Morton <akpm@linux-foundation.org>,
urezki@gmail.com, Christoph Hellwig <hch@infradead.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
linux-api@vger.kernel.org, linux-mm@kvack.org,
Linux-Arch <linux-arch@vger.kernel.org>,
malteskarupke@web.de
Subject: Re: [RFC][PATCH 04/10] futex: Add sys_futex_wake()
Date: Fri, 14 Jul 2023 16:47:49 +0200 [thread overview]
Message-ID: <20230714144749.GA3261758@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <c5a09710-a7a1-43df-ac25-42e8f3983f9c@app.fastmail.com>
On Fri, Jul 14, 2023 at 04:26:45PM +0200, Arnd Bergmann wrote:
> On Fri, Jul 14, 2023, at 15:39, Peter Zijlstra wrote:
> >
> > +++ b/include/linux/syscalls.h
> > @@ -563,6 +563,9 @@ asmlinkage long sys_set_robust_list(stru
> > asmlinkage long sys_futex_waitv(struct futex_waitv *waiters,
> > unsigned int nr_futexes, unsigned int flags,
> > struct __kernel_timespec __user *timeout, clockid_t clockid);
> > +
> > +asmlinkage long sys_futex_wake(void __user *uaddr, int nr, unsigned
> > int flags, u64 mask);
> > +
>
> You can't really use 'u64' arguments in portable syscalls, it causes
> a couple of problems, both with defining the user space wrappers,
> and with compat mode.
>
> Variants that would work include:
>
> - using 'unsigned long' instead of 'u64'
> - passing 'mask' by reference, as in splice()
> - passing the mask in two u32-bit arguments like in llseek()
>
> Not sure if any of the above work for you.
Durr, I was hoping they'd use register pairs, but yeah I can see how
that would be very hard to do in generic code.
Hurmph.. using 2 u32s is unfortunate on 64bit, while unsigned long
would limit 64bit futexes to 64bit machines (perhaps not too bad).
Using unsigned long would help with the futex_wait() thing as well.
I'll ponder things a bit.
Obviously I only did build x86_64 ;-)
next prev parent reply other threads:[~2023-07-14 14:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 13:38 [RFC][PATCH 00/10] futex: More Futex2 bits Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 01/10] futex: Clarify FUTEX2 flags Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 02/10] futex: Extend the " Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 03/10] futex: Flag conversion Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 04/10] futex: Add sys_futex_wake() Peter Zijlstra
2023-07-14 14:26 ` Arnd Bergmann
2023-07-14 14:47 ` Peter Zijlstra [this message]
2023-07-14 20:10 ` Arnd Bergmann
2023-07-14 13:39 ` [RFC][PATCH 05/10] mm: Add vmalloc_huge_node() Peter Zijlstra
2023-07-14 14:37 ` Matthew Wilcox
2023-07-14 15:09 ` Peter Zijlstra
2023-07-14 15:11 ` Matthew Wilcox
2023-07-14 15:26 ` Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 06/10] futex: Propagate flags into get_futex_key() Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 07/10] futex: Implement FUTEX2_NUMA Peter Zijlstra
2023-07-14 15:22 ` Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 08/10] futex: Propagate flags into futex_get_value_locked() Peter Zijlstra
2023-07-14 13:39 ` [RFC][PATCH 09/10] futex: Enable FUTEX2_{8,16} Peter Zijlstra
2023-07-14 13:39 ` [HACK][PATCH 10/10] futex: Munge size and numa into the legacy interface Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230714144749.GA3261758@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=andrealmeid@igalia.com \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=hch@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=malteskarupke@web.de \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox