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: <dcb7e5b0-fc88-2719-8b96-af8b84b7778a@bmw-carit.de>
Date:   Thu, 8 Dec 2016 15:47:22 +0100
From:   Daniel Wagner <daniel.wagner@...-carit.de>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Ming Lei <ming.lei@...onical.com>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     <linux-kernel@...r.kernel.org>, <linux-remoteproc@...r.kernel.org>
Subject: Re: [PATCH] firwmare: Correct handling of fw_state_wait() return
 value

On 12/07/2016 02:01 AM, Bjorn Andersson wrote:
> When request_firmware() finds an already open firmware object it will
> wait for that object to become fully loaded and then check the status.
> As __fw_state_wait_common() succeeds the timeout value returned will be
> truncated in _request_firmware_prepare() and interpreted as -EPERM.
>
> Prior to "firmware: do not use fw_lock for fw_state protection" the code
> did test if we where in the "done" state before sleeping, causing this
> particular code path to succeed, in some cases.
>
> As the callers are interested in the result of the wait and not the
> remaining timeout the return value of __fw_state_wait_common() is
> changed to signal "done" or "error", which simplifies the logic in
> _request_firmware_load() as well.

Oops, sorry about that one. With your fix the code starts to make sense.

> Fixes: 5b029624948d ("firmware: do not use fw_lock for fw_state protection")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>

Reviewed-by: Daniel Wagner <daniel.wagner@...-carit.de>

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ