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: <ZKcW7yh4gGKUCRvS@shikoro>
Date:   Thu, 6 Jul 2023 21:33:03 +0200
From:   Wolfram Sang <wsa@...nel.org>
To:     Robert Hancock <robert.hancock@...ian.com>
Cc:     Michal Simek <michal.simek@....com>,
        Andi Shyti <andi.shyti@...nel.org>,
        Shubhrajyoti Datta <shubhraj@...inx.com>,
        Marek Vasut <marex@...x.de>,
        linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: xiic: Don't try to handle more interrupt events
 after error

On Tue, Jun 06, 2023 at 12:25:58PM -0600, Robert Hancock wrote:
> In xiic_process, it is possible that error events such as arbitration
> lost or TX error can be raised in conjunction with other interrupt flags
> such as TX FIFO empty or bus not busy. Error events result in the
> controller being reset and the error returned to the calling request,
> but the function could potentially try to keep handling the other
> events, such as by writing more messages into the TX FIFO. Since the
> transaction has already failed, this is not helpful and will just cause
> issues.
> 
> This problem has been present ever since:
> 
> commit 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr")
> 
> which allowed non-error events to be handled after errors, but became
> more obvious after:
> 
> commit 743e227a8959 ("i2c: xiic: Defer xiic_wakeup() and
> __xiic_start_xfer() in xiic_process()")
> 
> which reworked the code to add a WARN_ON which triggers if both the
> xfer_more and wakeup_req flags were set, since this combination is
> not supposed to happen, but was occurring in this scenario.
> 
> Skip further interrupt handling after error flags are detected to avoid
> this problem.
> 
> Fixes: 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr")
> Signed-off-by: Robert Hancock <robert.hancock@...ian.com>

Applied to for-current, thanks!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ