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: <CADUfDZpW-8e+tkPJZX29w9Rs1vWc5T3t7qZQXWpyygKh42WKbA@mail.gmail.com>
Date: Mon, 22 Dec 2025 10:37:17 -0500
From: Caleb Sander Mateos <csander@...estorage.com>
To: Ming Lei <ming.lei@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>, Shuah Khan <shuah@...nel.org>, linux-block@...r.kernel.org, 
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Stanley Zhang <stazhang@...estorage.com>, Uday Shankar <ushankar@...estorage.com>
Subject: Re: [PATCH 08/20] ublk: add ublk_copy_user_bvec() helper

On Mon, Dec 22, 2025 at 9:53 AM Ming Lei <ming.lei@...hat.com> wrote:
>
> On Tue, Dec 16, 2025 at 10:34:42PM -0700, Caleb Sander Mateos wrote:
> > Factor a helper function ublk_copy_user_bvec() out of
> > ublk_copy_user_pages(). It will be used for copying integrity data too.
> >
> > Signed-off-by: Caleb Sander Mateos <csander@...estorage.com>
> > ---
> >  drivers/block/ublk_drv.c | 52 +++++++++++++++++++++++-----------------
> >  1 file changed, 30 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
> > index d3652ceba96d..0499add560b5 100644
> > --- a/drivers/block/ublk_drv.c
> > +++ b/drivers/block/ublk_drv.c
> > @@ -987,10 +987,39 @@ static const struct block_device_operations ub_fops = {
> >       .open =         ublk_open,
> >       .free_disk =    ublk_free_disk,
> >       .report_zones = ublk_report_zones,
> >  };
> >
> > +static bool ublk_copy_user_bvec(struct bio_vec bv, unsigned *offset,
>
> bv could be better to define as `const struct bio_vec *` for avoiding copy,
> otherwise this patch looks fine.

I was thinking it probably didn't matter much as the compiler was
likely to inline the function call. But sure, I can pass it by
pointer.

Thanks,
Caleb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ