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: <20240406163928.1ea36f04@jic23-huawei>
Date: Sat, 6 Apr 2024 16:39:28 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Ramona Gradinariu <ramona.gradinariu@...log.com>
Cc: <linux-kernel@...r.kernel.org>, <nuno.sa@...log.com>,
 <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting

On Wed, 3 Apr 2024 14:13:57 +0300
Ramona Gradinariu <ramona.gradinariu@...log.com> wrote:

> Fix sync mode setting by applying the necessary shift bits.
> 
> Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
> Signed-off-by: Ramona Gradinariu <ramona.gradinariu@...log.com>
> ---
>  drivers/iio/imu/adis16475.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> index 01f55cc902fa..bd30c3469d9a 100644
> --- a/drivers/iio/imu/adis16475.c
> +++ b/drivers/iio/imu/adis16475.c
> @@ -1351,7 +1351,8 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
>  	 * in chip_info.
>  	 */
>  	ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
> -				 ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
> +				 ADIS16475_SYNC_MODE_MASK,
> +				 ADIS16475_SYNC_MODE(sync->sync_mode));
As per the build bots, this is triggering a check on the size the last variable.
See definition of adis_update_bits()
There is even a comment in there to 'beware' of what you hit here.

Easiest is probably to force that with 
 (u16)ADIS16475_SYNC_MODE(sync->sync_mode));
or a local variable.


>  	if (ret)
>  		return ret;
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ