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: <8c596aa4718fa66a949286f0686286a4024a4637.camel@ew.tq-group.com>
Date: Wed, 10 Dec 2025 09:51:07 +0100
From: Matthias Schiffer <matthias.schiffer@...tq-group.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Peter Korsgaard <peter@...sgaard.com>, Andi Shyti
 <andi.shyti@...nel.org>,  linux-i2c@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux@...tq-group.com
Subject: Re: [PATCH v2 1/2] i2c: ocores: increase poll timeout to total
 transfer timeout

On Thu, 2025-10-09 at 15:26 +0200, Matthias Schiffer wrote:
> On Thu, 2025-10-09 at 15:20 +0200, Andrew Lunn wrote:
> > On Thu, Oct 09, 2025 at 11:19:49AM +0200, Matthias Schiffer wrote:
> > > When a target makes use of clock stretching, a timeout of 1ms may not be
> > > enough. One extreme example is the NXP PTN3460 eDP to LVDS bridge, which
> > > takes ~320ms to send its ACK after a flash command has been
> > > submitted.
> > > 
> > > The behavior in the regular case is unchanged, spinning for up to 1ms,
> > > but the open-coded poll loop is replaced with read_poll_timeout_atomic()
> > > as suggested by Andrew Lunn. In cases where 1ms is not sufficient,
> > > read_poll_timeout() is used, allowing a total transfer time up to the
> > > timeout set in struct i2c_adapter (defaulting to 1s, configurable through
> > > the I2C_TIMEOUT ioctl).
> > 
> > Thanks
> > 
> > Did you test with CONFIG_DEBUG_ATOMIC_SLEEP enabled? I don't think it
> > is an issue, but the old code could be used in atomic context because
> > it never slept.
> 
> I did not, but there is only one call chain ocores_xfer_core ->
> ocores_process_polling -> ocores_poll_wait -> ocores_wait, which is definitely
> not used in atomic context (in IRQ mode, ocores_xfer_core calls
> wait_event_timeout, which might_sleep()).
> 
> Best,
> Matthias
> 
> 
> 
> > 
> > Reviewed-by: Andrew Lunn <andrew@...n.ch>
> > 
> >     Andrew
> 

Hi everyone,

are these patches still missing anything?

Best,
Matthias




-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ