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: <11fbbafd-e7ce-f921-2073-146e96f01f6b@linaro.org>
Date:   Sun, 1 May 2022 18:17:24 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Mikhail Zhilkin <csharper2005@...il.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>
Cc:     NOGUCHI Hiroshi <drvlabo@...il.com>, Karim <Karimdplay@...il.com>,
        M <x1@...root.org>, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for
 Sercomm parser

On 01/05/2022 16:51, Mikhail Zhilkin wrote:
> On 5/1/2022 11:17 AM, Krzysztof Kozlowski wrote:
> 
>> On 30/04/2022 20:54, Mikhail Zhilkin wrote:
>>>  patternProperties:
>>>    "@[0-9a-f]+$":
>>> -    $ref: "partition.yaml#"
>>> +    allOf:
>>> +      - $ref: "partition.yaml#"
>>> +      - if:
>>> +          properties:
>>> +            compatible:
>>> +              contains:
>>> +                const: sercomm,sc-partitions
>>> +        then:
>>> +          properties:
>>> +            sercomm,scpart-id:
>>> +              description: Partition id in Sercomm partition map. Parser
>>> +                uses this id to get partition offset and size values from
>>> +                dynamic partition map.
>> Partition offset and size values are not derived from scpart-id. I am
>> sorry but after all these questions - it's the third time now - you
>> never answer why do you need this property and what is it used for. From
>> all the examples it could be simply removed and the partition map will
>> be exactly the same.
> scpart-id is necessary to get (using mtd parser) partition offset and
> size from dynamic partition map (NOT from the reg property):
> 
> ❯ xxd -e -c 12 -s $((0x800)) -l $((0x78)) mtd1
> 00000800: 00000000 00000000 00100000  ............
> 0000080c: 00000001 00100000 00100000  ............
> 00000818: 00000002 00200000 00100000  ...... .....
> 00000824: 00000003 00300000 00100000  ......0.....
> 00000830: 00000004 00400000 00600000  ......@...`.
> 0000083c: 00000005 00a00000 00600000  ..........`.
> 00000848: 00000006 01000000 02000000  ............
> 00000854: 00000007 03000000 02000000  ............
> 00000860: 00000008 05000000 01400000  ..........@.
> 0000086c: 00000009 06400000 01b80000  ......@.....
>           scpart-id  offset      size
> 
> With sercomm,sc-partitions the reg property will be ignored (offset =
> 0x200000, size = 0x100000) and the values will be taken from partition map.
> 
> For example we have this is dts:
> 
> partition@...000 {
>             label = "Factory";
>             reg = <0x200000 0x100000>;
>             sercomm,scpart-id = <2>;
>             read-only;
>         };
> 
> Dynamic partition map:
> 
> scpart-id = 2; offset = 0x00200000; size = 0x00100000
> 
> 00000002 00200000 00100000  ...... .....
> 
> In this example the offset and size are the same in reg and dynamic
> partition map. If device have bad blocks on NAND the values will be a
> little different. And we have to take partition offsets from partition
> map to avoid boot loops, wrong eeprom location and other bad things.
> 
> Is there anything that needs to be explained in more detail?

Thanks a lot, this clarifies the topic. Looks good. Maybe you could put
parts of this into the scpart-id field description?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ