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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJppmn5hM5=zdkQoaGAYghw822vP8YoW0wQsNmAZY0v7dtA@mail.gmail.com>
Date:   Mon, 28 Aug 2023 12:46:10 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Neil Armstrong <neil.armstrong@...aro.org>
Subject: Re: [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it
 is not available

On Mon, 28 Aug 2023 at 12:36, Maulik Shah (mkshah)
<quic_mkshah@...cinc.com> wrote:
>
> Hi Dmitry,
>
> This patch may be useful if there was a case where some PDCs don't have
> version register populated/available,
> In all PDC versions, version register is always available but due to reg
> size not good enough in device tree for SM8150 it failed to read.
>
> reg size in device node must be expanded if its too small to access all
> registers and i think
> additional check in driver to check if size is good enough would not be
> of much use.

Unfortunately, it doesn't work this way. DT files are ABI. Even if we
change the DT, the kernel should continue working with the older
version.
Thus, we have to add such bandaid code, which will keep the kernel
from crashing if old DT was used.

P.S. Can I please bring to your attention that top-posting is a
frowned upon practice.

>
> Thanks,
> Maulik
>
> On 8/26/2023 3:05 AM, Dmitry Baryshkov wrote:
>
> > On Qualcomm SM8150 the PDC resource has size 0x400. When PDC driver
> > tries to read the version register (0x1000), it reads past the end of
> > this resource, causing kernel crash.
> >
> > Check the size of PDC resource before reading the PDC_VERSION register.
> >
> > Fixes: bc82cc42644b ("irqchip/qcom-pdc: Add support for v3.2 HW")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> >



-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ