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: <b9972273-97c7-4b70-833d-c4842cd612d5@linaro.org>
Date:   Mon, 28 Aug 2023 14:02:00 +0200
From:   Neil Armstrong <neil.armstrong@...aro.org>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Marc Zyngier <maz@...nel.org>
Cc:     "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it
 is not available

On 28/08/2023 12:18, Dmitry Baryshkov wrote:
> On Mon, 28 Aug 2023 at 13:04, Marc Zyngier <maz@...nel.org> wrote:
>>
>> On Mon, 28 Aug 2023 10:46:10 +0100,
>> Dmitry Baryshkov <dmitry.baryshkov@...aro.org> wrote:
>>>
>>> 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.
>>
>> You're missing the point: all existing PDC HW have version register.
>> The fact that the DT is crap doesn't invalidate this simple fact. It
>> is thus perfectly possible for the driver to *ignore* the crap and do
>> the right thing by expanding the size of the mapping, rather than
>> falling back to the non-versioned code.
> 
> Ah. Interesting idea. If that's the overall consensus I can send v2
> doing this. Not sure what is better though.

Please take my PDC 3.2 patch in the same set!

Neil

> 
>>
>> There is definitely precedents for this sort of behaviour, such as the
>> ARM GICv2 probe code.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ