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: <CALHNRZ9LUqTBf5_WBKVt1FR+aPrTk-HUR2jmgQMrWH8xjAHx8A@mail.gmail.com>
Date: Tue, 6 May 2025 05:12:23 -0500
From: Aaron Kling <webgeek1234@...il.com>
To: Jon Hunter <jonathanh@...dia.com>
Cc: Laxman Dewangan <ldewangan@...dia.com>, Mark Brown <broonie@...nel.org>, 
	Thierry Reding <thierry.reding@...il.com>, Mason Zhang <Mason.Zhang@...iatek.com>, 
	linux-spi@...r.kernel.org, linux-tegra@...r.kernel.org, 
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] spi: tegra114: Don't fail set_cs_timing when delays are zero

On Tue, May 6, 2025 at 5:06 AM Jon Hunter <jonathanh@...dia.com> wrote:
>
>
> On 06/05/2025 10:50, Aaron Kling wrote:
>
> ...
>
> >>> -     if (setup->unit != SPI_DELAY_UNIT_SCK ||
> >>> -         hold->unit != SPI_DELAY_UNIT_SCK ||
> >>> -         inactive->unit != SPI_DELAY_UNIT_SCK) {
> >>> +     if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
> >>> +         (hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
> >>> +         (inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
> >>
> >> The above does not look correct to me. For example, if 'setup->unit' is
> >> 0, this means that the unit is 'SPI_DELAY_UNIT_USECS' and does not
> >> indicate that the delay is 0.
> >>
> >> Shouldn't the above be ...
> >>
> >>    if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
> >>        (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
> >>        (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
> >
> > This is what the code looked like before 373c36b [0], which dropped
> > that check because the pointers can never be NULL. Should this check
> > if ->value is not 0 instead?
>
> What the code does now does not match what you describe and does not
> appear to be correct. Yes checking ->value is not 0 would make sense.

Alright, I will send in a new revision once I can verify the change.
Since this was already picked up, is there anything I need to do to
get the bad patch pulled?

Sincerely,
Aaron Kling

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ