public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Ming Lei <[email protected]>,
	[email protected], [email protected]
Cc: Gabriel Krisman Bertazi <[email protected]>
Subject: Re: [PATCH V3 1/2] io_uring: retain top 8bits of uring_cmd flags for kernel internal use
Date: Fri, 22 Sep 2023 10:29:46 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 9/22/23 10:09 AM, Ming Lei wrote:
> diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
> index 537795fddc87..52a455b67163 100644
> --- a/io_uring/uring_cmd.c
> +++ b/io_uring/uring_cmd.c
> @@ -90,7 +90,7 @@ int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
>  	if (sqe->__pad1)
>  		return -EINVAL;
>  
> -	ioucmd->flags = READ_ONCE(sqe->uring_cmd_flags);
> +	ioucmd->flags = READ_ONCE(sqe->uring_cmd_flags) & IORING_URING_CMD_MASK;
>  	if (ioucmd->flags & ~IORING_URING_CMD_FIXED)
>  		return -EINVAL;
>  

Do we want to mask it here? If any of the upper bits are set at prep
time, that should be an EINVAL condition.

-- 
Jens Axboe


  reply	other threads:[~2023-09-22 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 16:09 [PATCH V3 0/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-22 16:09 ` [PATCH V3 1/2] io_uring: retain top 8bits of uring_cmd flags for kernel internal use Ming Lei
2023-09-22 16:29   ` Jens Axboe [this message]
2023-09-22 16:09 ` [PATCH V3 2/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-22 16:28   ` 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