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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Mar 2023 15:00:36 +0100
From:   Roger Pau Monné <roger.pau@...rix.com>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH 4/4] xen/blkback: move blkif_get_x86_*_req() into
 blkback.c

On Fri, Dec 16, 2022 at 03:58:16PM +0100, Juergen Gross wrote:
> There is no need to have the functions blkif_get_x86_32_req() and
> blkif_get_x86_64_req() in a header file, as they are used in one place
> only.
> 
> So move them into the using source file and drop the inline qualifier.
> 
> While at it fix some style issues, and simplify the code by variable
> reusing and using min() instead of open coding it.
> 
> Instead of using barrier() use READ_ONCE() for avoiding multiple reads
> of nr_segments.
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>  drivers/block/xen-blkback/blkback.c | 104 ++++++++++++++++++++++++++++
>  drivers/block/xen-blkback/common.h  |  96 -------------------------
>  2 files changed, 104 insertions(+), 96 deletions(-)
> 
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index 243712b59a05..7561fdb72c13 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -1072,7 +1072,111 @@ static void end_block_io_op(struct bio *bio)
>  	bio_put(bio);
>  }
>  
> +static void blkif_get_x86_32_req(struct blkif_request *dst,
> +				 struct blkif_x86_32_request *src)

src can be const.

> +{
> +	int i, n;

Could we also take the opportunity to convert i and n to unsigned?

With that:

Acked-by: Roger Pau Monné <roger.pau@...rix.com>

Thanks, Roger.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ