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] [day] [month] [year] [list]
Message-ID: <b50a7438-1c7c-bc54-a6e7-0ef1caa31a16@gmail.com>
Date:   Tue, 20 Jun 2023 11:23:41 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] misc: sram: Generate unique names for subpools

19.06.2023 10:11, Linus Walleij пишет:
> On Sun, Jun 18, 2023 at 11:33 PM Dmitry Osipenko <digetx@...il.com> wrote:
> 
>>>                       if (!label)
>>> -                             label = child->name;
>>> -
>>> -                     block->label = devm_kstrdup(sram->dev,
>>> -                                                 label, GFP_KERNEL);
>>> +                             block->label = devm_kasprintf(sram->dev, GFP_KERNEL,
>>> +                                                           "%s", dev_name(sram->dev));
>>
>> This broke device-trees that have no label property.
> 
> Which system is affected? Asking so I can inspect the DTS file
> and figure out how this needs to work.

NVIDIA Tegra2/3 video decoder driver fails to probe with this change.

https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/nvidia/tegra-vde/vde.c#L312

https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/tegra20.dtsi#L347

>>  The SRAM DT binding says:
>>
>> "
>> label:
>> description:
>>         The name for the reserved partition, if omitted, the label is taken
>>         from the node name excluding the unit address.
>> "
>>
>> Not sure whether breakage was on purpose, otherwise doc needs to be
>> updated or there should be explicit check for the duplicated node names.
>>
>> Secondly, AFAICS, the dev_name(sram->dev) is the name of the parent SRAM
>> device and not of the children sub-nodes, hence it's now always the same
>> dev_name(sram->dev) for all sub-nodes.
> 
> Sounds like I should go back to the original approach in patch v1:
> https://lore.kernel.org/linux-devicetree/20230417-ux500-sram-v1-2-5924988bb835@linaro.org/
> 
> and also augment the DTS binding text to say it uses the full node name
> including the address.
> 
> Does that look OK to you, or will this regress your system as well?

That may work, but then seems you'll also need to update
of_gen_pool_get() to use np_pool->full_name instead of np_pool->name.

https://elixir.bootlin.com/linux/latest/source/lib/genalloc.c#L898

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ