public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Peter Zijlstra <[email protected]>
Cc: [email protected], [email protected],
	[email protected]
Subject: Re: [PATCH 06/10] io_uring: add support for futex wake and wait
Date: Fri, 21 Jul 2023 08:43:48 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 7/21/23 5:37?AM, Peter Zijlstra wrote:
> On Fri, Jul 21, 2023 at 01:30:31PM +0200, Peter Zijlstra wrote:
> 
> Sorry, I was too quick..
> 
> 	iof->uaddr = sqe->addr;
> 	iof->val   = sqe->futex_val;
> 	iof->mask  = sqe->futex_mask;
> 	flags      = sqe->futex_flags;
> 
> 	if (flags & ~FUTEX2_MASK)
> 		return -EINVAL;
> 
> 	iof->flags = futex2_to_flags(flags);
> 	if (!futex_flags_valid(iof->flags))
> 		return -EINVAL;
> 
> 	if (!futex_validate_input(iof->flags, iof->val) ||
> 	    !futex_validate_input(iof->flags, iof->mask))
> 		return -EINVAL

Something like that should work, with some variable names fixed up. I
just went with 'addr' for the futex address, addr2 for the value, and
addr3 for the mask.

Rebased on top of your first 4 updated patches, and added a single patch
that moves FUTEX2_MASK, will run some testing to validate it's all still
sane.

-- 
Jens Axboe


  reply	other threads:[~2023-07-21 14:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 22:18 [PATCHSET v3 0/10] Add io_uring futex/futexv support Jens Axboe
2023-07-20 22:18 ` [PATCH 01/10] futex: Clarify FUTEX2 flags Jens Axboe
2023-07-20 22:18 ` [PATCH 02/10] futex: Extend the " Jens Axboe
2023-07-20 22:18 ` [PATCH 03/10] futex: Flag conversion Jens Axboe
2023-07-20 22:18 ` [PATCH 04/10] futex: factor out the futex wake handling Jens Axboe
2023-07-20 22:18 ` [PATCH 05/10] futex: abstract out a __futex_wake_mark() helper Jens Axboe
2023-07-20 22:18 ` [PATCH 06/10] io_uring: add support for futex wake and wait Jens Axboe
2023-07-21 11:30   ` Peter Zijlstra
2023-07-21 11:37     ` Peter Zijlstra
2023-07-21 14:43       ` Jens Axboe [this message]
2023-07-21 15:29         ` Jens Axboe
2023-07-25 13:00           ` Peter Zijlstra
2023-07-25 13:48             ` Jens Axboe
2023-07-25 13:57               ` Jens Axboe
2023-07-25 15:19                 ` Peter Zijlstra
2023-07-25 20:42                   ` Jens Axboe
2023-07-25 21:24                     ` Jens Axboe
2023-07-25 14:06               ` Peter Zijlstra
2023-07-20 22:18 ` [PATCH 07/10] futex: add wake_data to struct futex_q Jens Axboe
2023-07-20 22:18 ` [PATCH 08/10] futex: make futex_parse_waitv() available as a helper Jens Axboe
2023-07-20 22:18 ` [PATCH 09/10] futex: make the vectored futex operations available Jens Axboe
2023-07-20 22:18 ` [PATCH 10/10] io_uring: add support for vectored futex waits Jens Axboe

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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