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: <aLZRmowkkbEQ1tlh@fedora>
Date: Tue, 2 Sep 2025 10:08:26 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ublk: inline __ublk_ch_uring_cmd()

On Mon, Sep 01, 2025 at 06:42:31PM -0700, Caleb Sander Mateos wrote:
> On Fri, Aug 8, 2025 at 8:32 AM Caleb Sander Mateos
> <csander@...estorage.com> wrote:
> >
> > ublk_ch_uring_cmd_local() is a thin wrapper around __ublk_ch_uring_cmd()
> > that copies the ublksrv_io_cmd from user-mapped memory to the stack
> > using READ_ONCE(). This ublksrv_io_cmd is passed by pointer to
> > __ublk_ch_uring_cmd() and __ublk_ch_uring_cmd() is a large function
> > unlikely to be inlined, so __ublk_ch_uring_cmd() will have to load the
> > ublksrv_io_cmd fields back from the stack. Inline __ublk_ch_uring_cmd()
> > into ublk_ch_uring_cmd_local() and load the ublksrv_io_cmd fields into
> > local variables with READ_ONCE(). This allows the compiler to delay
> > loading the fields until they are needed and choose whether to store
> > them in registers or on the stack.
> 
> Ming, thoughts on this patch? Do you see any value I'm missing in
> keeping ublk_ch_uring_cmd_local() and __ublk_ch_uring_cmd() as
> separate functions?

oops, looks I missed your patch, sorry!

Will take a look later.


Thanks, 
Ming


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ