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: <20241009215046.1449389-2-CFSworks@gmail.com>
Date: Wed,  9 Oct 2024 14:50:44 -0700
From: Sam Edwards <cfsworks@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
	Rafał Miłecki <rafal@...ecki.pl>,
	William Zhang <william.zhang@...adcom.com>,
	Anand Gore <anand.gore@...adcom.com>,
	Kursad Oney <kursad.oney@...adcom.com>
Cc: Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Sam Edwards <CFSworks@...il.com>
Subject: [PATCH 1/3] dt-bindings: mtd: Relax BCM4908 partition schema

The BCM4908 partition "parser" is really just a fixed partitions table,
with a special partition compatible (`brcm,bcm4908-firmware`) that
automatically labels the partition as "firmware" or "backup" depending
on what CFE is communicating as the selected active partition.

The bcm4908-partitions schema is currently too restrictive, requiring
that all child nodes use this special compatible or none at all. This
not only contracits what is allowed by the "parser" but also causes
warnings for an existing file ("bcm4908-asus-gt-ac5300.dts").

Modify the schema to be strict only for child partitions that use the
-firmware compatible. Also update the child name regex to agree with
fixed-partitions, so that these differences apply consistently.

Signed-off-by: Sam Edwards <CFSworks@...il.com>
---
 .../mtd/partitions/brcm,bcm4908-partitions.yaml | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
index 94f0742b375c..aed37922a5fc 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -30,12 +30,17 @@ properties:
     enum: [ 1, 2 ]
 
 patternProperties:
-  "^partition@[0-9a-f]+$":
-    $ref: partition.yaml#
-    properties:
-      compatible:
-        const: brcm,bcm4908-firmware
-    unevaluatedProperties: false
+  "^partition(-.+|@[0-9a-f]+)$":
+    type: object
+    if:
+      properties:
+        compatible:
+          const: brcm,bcm4908-firmware
+    then:
+      $ref: partition.yaml#
+      properties:
+        compatible: true
+      unevaluatedProperties: false
 
 required:
   - "#address-cells"
-- 
2.44.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ