lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4812e4b2-b7e0-45e6-b465-e160ac267939@kernel.dk>
Date: Mon, 8 Sep 2025 13:20:29 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
 syzbot@...kaller.appspotmail.com
Subject: Re: [PATCH v2 5/5] io_uring: avoid uring_lock for
 IORING_SETUP_SINGLE_ISSUER

On 9/4/25 11:09 AM, Caleb Sander Mateos wrote:
> diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
> index a0580a1bf6b5..7296b12b0897 100644
> --- a/io_uring/io_uring.h
> +++ b/io_uring/io_uring.h
> @@ -121,20 +121,34 @@ bool io_match_task_safe(struct io_kiocb *head, struct io_uring_task *tctx,
>  
>  void io_activate_pollwq(struct io_ring_ctx *ctx);
>  
>  static inline void io_ring_ctx_lock(struct io_ring_ctx *ctx)
>  {
> +	if (ctx->flags & IORING_SETUP_SINGLE_ISSUER) {
> +		WARN_ON_ONCE(current != ctx->submitter_task);
> +		return;
> +	}
> +
>  	mutex_lock(&ctx->uring_lock);
>  }
>  
>  static inline void io_ring_ctx_unlock(struct io_ring_ctx *ctx)
>  {
> +	if (ctx->flags & IORING_SETUP_SINGLE_ISSUER) {
> +		WARN_ON_ONCE(current != ctx->submitter_task);
> +		return;
> +	}
> +
>  	mutex_unlock(&ctx->uring_lock);
>  }

I do want to get rid of these WARN_ON_ONCE() down the line, but it's
prudent to keep them there for now.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ