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: <20240803160417.05e18d56@jic23-huawei>
Date: Sat, 3 Aug 2024 16:04:17 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dumitru Ceclan <mitrutzceclan@...il.com>
Cc: Stefan Popa <stefan.popa@...log.com>, Alexandru Tachici
 <alexandru.tachici@...log.com>, Jonathan Cameron
 <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org, Dumitru Ceclan <dumitru.ceclan@...log.com>
Subject: Re: [PATCH 2/4] iio: adc: ad7124: fix config comparison

On Wed, 31 Jul 2024 15:37:23 +0300
Dumitru Ceclan <mitrutzceclan@...il.com> wrote:

> The ad7124_find_similar_live_cfg() computes the compare size by
> substracting the address of the cfg struct from the address of the live
> field. Because the live field is the first field in the struct, the
> result is 0.
> 
> Also, the memcmp() call is made from the start of the cfg struct, which
> includes the live and cfg_slot fields, which are not relevant for the
> comparison.
> 
> Fix by grouping the relevant fields with struct_group() and use the
> size of the group to compute the compare size; make the memcmp() call
> from the address of the group.
> 
> Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels")
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@...log.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ