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] [day] [month] [year] [list]
Message-ID: <2024062408-stash-gluten-ef19@gregkh>
Date: Mon, 24 Jun 2024 15:17:43 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Abhinav Jain <jain.abhinav177@...il.com>
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
	skhan@...uxfoundation.org, javier.carrasco.cruz@...il.com
Subject: Re: [PATCH] staging: rtl8723bs: Align address to 4-byte boundary

On Fri, Jun 14, 2024 at 10:42:56PM +0000, Abhinav Jain wrote:
> Add address alignment in sdio_local_read, _sdio_local_read &
> sdio_local_write functions as per the TODO.

How was this tested?

> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@...il.com>
> ---
>  drivers/staging/rtl8723bs/hal/sdio_ops.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> index 107f427ee4aa..caee2d2043b3 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> @@ -478,9 +478,6 @@ void sdio_set_intf_ops(struct adapter *adapter, struct _io_ops *ops)
>  	ops->_write_port = &sdio_write_port;
>  }
>  
> -/*
> - * Todo: align address to 4 bytes.
> - */
>  static s32 _sdio_local_read(
>  	struct adapter *adapter,
>  	u32 addr,
> @@ -494,6 +491,7 @@ static s32 _sdio_local_read(
>  	u8 *tmpbuf;
>  	u32 n;
>  
> +	addr = addr & ~3;

Are you sure you are allowed to do this?  Why?  And a comment about what
you are doing, and why it is required to do so, is needed for this to be
acceptable.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ