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: <c9c232a4-519a-108f-3651-5af6ba812dc8@linaro.org>
Date:   Tue, 30 May 2023 21:37:46 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Bjorn Andersson <quic_bjorande@...cinc.com>,
        Bjorn Andersson <andersson@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>
Cc:     linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: reserved-memory: rmtfs: Allow dynamic
 allocation



On 30.05.2023 21:34, Bjorn Andersson wrote:
> Allow instances of the qcom,rmtfs-mem either be defined as a
> reserved-memory regoin, or just standalone given just a size.
> 
> This relieve the DeviceTree source author the need to come up with a
> static memory region for the region.
> 
> Signed-off-by: Bjorn Andersson <quic_bjorande@...cinc.com>
> ---
>  .../reserved-memory/qcom,rmtfs-mem.yaml       | 23 ++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> index bab982f00485..8b5de033f9ac 100644
> --- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> +++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> @@ -14,13 +14,16 @@ description: |
>  maintainers:
>    - Bjorn Andersson <bjorn.andersson@...aro.org>
>  
> -allOf:
> -  - $ref: reserved-memory.yaml
> -
>  properties:
>    compatible:
>      const: qcom,rmtfs-mem
>  
> +  qcom,alloc-size:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Requested size of the rmtfs memory allocation, when not defined as a
> +      reserved-memory region.
> +
>    qcom,client-id:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description: >
> @@ -36,6 +39,11 @@ properties:
>  required:
>    - qcom,client-id
>  
> +oneOf:
> +  - $ref: reserved-memory.yaml
> +  - required:
> +      - qcom,alloc-size
> +
>  unevaluatedProperties: false
>  
>  examples:
> @@ -53,3 +61,12 @@ examples:
>              qcom,client-id = <1>;
>          };
>      };
> +  - |
> +    rmtfs {
> +        compatible = "qcom,rmtfs-mem";
> +
> +        qcom,alloc-size = <(2*1024*1024)>;
2 nitty nits:

- Most uses of DT arithmetic put spaces between the operands
- You could add a comment explaining what this example brings to
  the table

Konrad

> +        qcom,client-id = <1>;
> +        qcom,vmid = <15>;
> +    };
> +...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ