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: <e19fc109-9711-4a3d-9aaf-4a7159946a2b@acm.org>
Date: Wed, 11 Sep 2024 18:32:03 -0700
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ufs: Zero utp_upiu_req at the beginning of each
 command

On 9/10/24 10:39 PM, Avri Altman wrote:
> +static void zero_utp_upiu(struct utp_upiu_req *req)
> +{
> +	memset(&req->utp_upiu, 0, sizeof(req->utp_upiu));
> +}

Introducing a function that only calls memset() seems like overkill to
me. Please call memset() directly.

> diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h
> index 8c29e498ef98..b0d60d54d6c9 100644
> --- a/include/uapi/scsi/scsi_bsg_ufs.h
> +++ b/include/uapi/scsi/scsi_bsg_ufs.h
> @@ -162,11 +162,13 @@ struct utp_upiu_cmd {
>    */
>   struct utp_upiu_req {
>   	struct utp_upiu_header header;
> -	union {
> -		struct utp_upiu_cmd		sc;
> -		struct utp_upiu_query		qr;
> -		struct utp_upiu_query		uc;
> -	};
> +	struct_group(utp_upiu,
> +		union {
> +			struct utp_upiu_cmd	sc;
> +			struct utp_upiu_query	qr;
> +			struct utp_upiu_query	uc;
> +		};
> +	);
>   };

Is the above change perhaps independent of the rest of this patch? I
think that this change can be left out.

Thanks,

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ