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: <20250211201230.GA600687-robh@kernel.org>
Date: Tue, 11 Feb 2025 14:12:30 -0600
From: Rob Herring <robh@...nel.org>
To: Dharma.B@...rochip.com
Cc: neil.armstrong@...aro.org, ulf.hansson@...aro.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, khilman@...libre.com, jbrunet@...libre.com,
	martin.blumenstingl@...glemail.com, linux-mmc@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2] dt-bindings: mmc: mmc-slot: make compatible
 property optional

On Mon, Feb 10, 2025 at 05:28:27AM +0000, Dharma.B@...rochip.com wrote:
> On 07/02/25 2:47 pm, neil.armstrong@...aro.org wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know 
> > the content is safe
> > 
> > On 07/02/2025 10:02, Dharma.B@...rochip.com wrote:
> >> On 07/02/25 2:25 pm, Neil Armstrong wrote:
> >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know
> >>> the content is safe
> >>>
> >>> On 05/02/2025 04:48, Dharma Balasubiramani wrote:
> >>>> Remove the compatible property from the list of required properties and
> >>>> mark it as optional.

The diff tells us that. Please say why 'compatible' being required is a 
problem and needs to not be required.

> >>>>
> >>>> Signed-off-by: Dharma Balasubiramani <dharma.b@...rochip.com>
> >>>> ---
> >>>> Changes in v2:
> >>>> - Instead of moving the compatible string to the other binding, just
> >>>> make it
> >>>>     optional (remove from required list).
> >>>> - Link to v1: https://lore.kernel.org/r/20241219-mmc-slot-v1-1-
> >>>> dfc747a3d3fb@...rochip.com
> >>>> ---
> >>>>    Documentation/devicetree/bindings/mmc/mmc-slot.yaml | 1 -
> >>>>    1 file changed, 1 deletion(-)
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/mmc/mmc-slot.yaml b/
> >>>> Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> >>>> index 1f0667828063..ca3d0114bfc6 100644
> >>>> --- a/Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> >>>> +++ b/Documentation/devicetree/bindings/mmc/mmc-slot.yaml
> >>>> @@ -29,7 +29,6 @@ properties:
> >>>>        maxItems: 1
> >>>>
> >>>>    required:
> >>>> -  - compatible
> >>>>      - reg
> >>>
> >>> If you remove it from here then it's still required in Documentation/
> >>> devicetree/bindings/mmc/amlogic,meson-mx-sdio.yaml
> >>> so please add it.
> >>
> >> If moving the compatible to its specific binding isn't appropriate (as
> >> per Conor),
> >> and if removing it from the required list here doesn’t seem reasonable
> >> to you,
> >> then adding an unnecessary compatible string in our DTS files doesn’t
> >> make sense to me.
> >>
> >> What could be the solution then?
> > 
> > The solution is right but you modify the meson-mx-sdio bindings, so
> > simply add compatible in a required list for the slot node.
> 
> Okay, we declare compatible as optional in the generic mmc-slot binding 
> but make it required in the meson-mx-sdio binding, which inherits from it.
> 
> So why not define the property directly in the meson-mx-sdio binding 
> instead?

Because mmc-slot.yaml is designed to be complete (hence 
"unevaluatedProperties: false"). There's at least 2 bindings which use 
it (with "mmc-slot" compatible). Leaving it at least prevents folks from 
coming up with their own random compatible strings for mmc-slot.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ