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: <CAL_JsqJ5+vt-1xU4eo+pAWJbVQyA7=-fNquh32kqjLusvr1O6Q@mail.gmail.com>
Date:   Mon, 13 Jun 2022 15:30:08 -0600
From:   Rob Herring <robh@...nel.org>
To:     Tom Lendacky <thomas.lendacky@....com>
Cc:     "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" 
        <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        John Allen <john.allen@....com>, Marc Zyngier <maz@...nel.org>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH] crypto: ccp - Fix device IRQ counting by using platform_irq_count()

On Mon, Jun 13, 2022 at 1:16 PM Tom Lendacky <thomas.lendacky@....com> wrote:
>
> The ccp driver loops through the platform device resources array to get
> the IRQ count for the device. With commit a1a2b7125e10 ("of/platform: Drop
> static setup of IRQ resource from DT core"), the IRQ resources are no
> longer stored in the platform device resource array. As a result, the IRQ
> count is now always zero. This causes the driver to issue a second call to
> platform_get_irq(), which fails if the IRQ count is really 1, causing the
> loading of the driver to fail.
>
> Replace looping through the resources array to count the number of IRQs
> with a call to platform_irq_count().
>
> Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
> Signed-off-by: Tom Lendacky <thomas.lendacky@....com>
> ---
>  drivers/crypto/ccp/sp-platform.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)

Reviewed-by: Rob Herring <robh@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ