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: <dfc7ec00-5216-4590-9347-ee10cd1e8380@xenosoft.de>
Date: Thu, 4 Jul 2024 20:59:16 +0200
From: Christian Zigotzky <chzigotzky@...osoft.de>
To: Michael Ellerman <mpe@...erman.id.au>, Marc Zyngier <maz@...nel.org>
Cc: Rob Herring <robh@...nel.org>, apatel@...tanamicro.com,
 DTML <devicetree@...r.kernel.org>,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
 mad skateman <madskateman@...il.com>, "R.T.Dickinson" <rtd2@...a.co.nz>,
 Matthew Leaman <matthew@...on.biz>, Darren Stevens
 <darren@...vens-zone.net>, Christian Zigotzky <info@...osoft.de>
Subject: Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives
 after the of/irq updates 2024-05-29

On 04.07.24 20:27, Christian Zigotzky wrote:
> On 04.07.24 13:53, Michael Ellerman wrote:
>> Christian Zigotzky <chzigotzky@...osoft.de> writes:
>>> On 02.07.24 18:54, Marc Zyngier wrote:
>>>> On Sun, 30 Jun 2024 11:21:55 +0100,
>>>> Christian Zigotzky <chzigotzky@...osoft.de> wrote:
>>>>> Hello,
>>>>>
>>>>> There is an issue with the identification of ATA drives with our
>>>>> P.A. Semi Nemo boards [1] after the
>>>>> commit "of/irq: Factor out parsing of interrupt-map parent
>>>>> phandle+args from of_irq_parse_raw()" [2].
>> ...
>>>> --- a/drivers/of/irq.c
>>>> +++ b/drivers/of/irq.c
>>>> @@ -282,8 +282,10 @@ int of_irq_parse_raw(const __be32 *addr, 
>>>> struct of_phandle_args *out_irq)
>>>>                   oldimap = imap;
>>>>                imap = of_irq_parse_imap_parent(oldimap, imaplen, 
>>>> out_irq);
>>>> -            if (!imap)
>>>> -                goto fail;
>>>> +            if (!imap) {
>>>> +                match = 0;
>>>> +                break;
>>>> +            }
>>>>                   match &= of_device_is_available(out_irq->np);
>>>>                if (match)
>>>>
>>>>
>>> We tested this patch yesterday and it solves the boot problem.
>> Hi Christian,
>>
>> Instead of that patch, can you try the one below. AFAICS the device tree
>> fixups done in early boot mean the interrupt-map is not needed, and also
>> has the wrong content, so if we can remove it entirely that might avoid
>> the problems in the parsing code.
>>
>> I don't know if your firmware actually implements those methods, I
>> couldn't find anything online to confirm or deny it. Seems the only
>> option is to test it.
>>
>> cheers
>>
>>
>> diff --git a/arch/powerpc/kernel/prom_init.c 
>> b/arch/powerpc/kernel/prom_init.c
>> index fbb68fc28ed3..28fe082ede57 100644
>> --- a/arch/powerpc/kernel/prom_init.c
>> +++ b/arch/powerpc/kernel/prom_init.c
>> @@ -3138,6 +3138,14 @@ static void __init fixup_device_tree_pasemi(void)
>>         prom_setprop(iob, name, "interrupt-controller", &val, 0);
>>   +    prom_printf("nemo: deleting interrupt-map properties\n");
>> +    rc = call_prom("interpret", 1, 1,
>> +              " s\" /pxp@0,e0000000\" find-device"
>> +              " s\" interrupt-map\" delete-property"
>> +              " s\" interrupt-map-mask\" delete-property"
>> +              " device-end");
>> +    prom_printf("nemo: interpret returned %d\n", rc);
>> +
>>       pci_name = "/pxp@0,e0000000/pci@11";
>>       node = call_prom("finddevice", 1, 1, ADDR(pci_name));
>>       parent = ADDR(iob);
> Hi Michael,
>
> Many thanks for your patch. We will test it as soon as possible.
>
> Christian
Michael,

Unfortunately, the kernel 6.10-rc6 doesn't compile with your patch. "rc" 
is undeclared.

Error messages:

arch/powerpc/kernel/prom_init.c: In function ‘fixup_device_tree_pasemi’:
arch/powerpc/kernel/prom_init.c:3142:2: error: ‘rc’ undeclared (first 
use in this function); did you mean ‘rq’?
  3142 |  rc = call_prom("interpret", 1, 1,
       |  ^~
       |  rq

Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ