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: <20241016-abdomen-agent-4f24e0f68fbf@spud>
Date: Wed, 16 Oct 2024 17:36:21 +0100
From: Conor Dooley <conor@...nel.org>
To: Conor Dooley <conor.dooley@...rochip.com>
Cc: Jamie Gibbons <jamie.gibbons@...rochip.com>,
	Daire McNamara <daire.mcnamara@...rochip.com>,
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] firmware: microchip: auto-update: fix poll_complete()
 to not report spurious timeout errors

On Wed, Oct 16, 2024 at 05:35:06PM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@...rochip.com>
> 
> fw_upload's poll_complete() is really intended for use with
> asynchronous write() implementations - or at least those where the
> write() loop may terminate without the kernel yet being aware of whether
> or not the firmware upload has succeeded. For auto-update, write() is
> only ever called once and will only return when uploading has completed,
> be that by passing or failing. The core fw_upload code only calls
> poll_complete() after the final call to write() has returned.
> 
> However, the poll_complete() implementation in the auto-update driver
> was written to expect poll_complete() to be called from another context,
> and it waits for a completion signalled from write(). Since
> poll_complete() is actually called from the same context, after the
> write() loop has terminated, wait_for_completion() never sees the
> completion get signalled and always times out, causing programming to
> always report a failing.
> 
> Since write() is full synchronous, and its return value will indicate
> whether or not programming passed or failed, poll_complete() serves no
> purpose and can be cut down to simply return FW_UPLOAD_ERR_NONE.
> 
> Fixes: ec5b0f1193ad4 ("firmware: microchip: add PolarFire SoC Auto Update support")
> Reported-by: Jamie Gibbons <jamie.gibbons@...rochip.com>
> Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>

note to self
CC: stable@...r.kernel.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ