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]
Date:   Tue, 9 Feb 2021 15:40:58 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Rob Herring <robh@...nel.org>
Cc:     Frank Rowand <frowand.list@...il.com>,
        Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Anmar Oueja <anmar.oueja@...aro.org>,
        Bill Mills <bill.mills@...aro.org>,
        David Gibson <david@...son.dropbear.id.au>,
        devicetree@...r.kernel.org, Michal Marek <michal.lkml@...kovi.net>
Subject: Re: [PATCH V7 6/6] of: unittest: Statically apply overlays using
 fdtoverlay

On 08-02-21, 08:21, Rob Herring wrote:
> We may need to turn off
> checks in overlays for required properties as they may be incomplete.
> We already do that on disabled nodes.

And after decent amount of effort understanding how to do this, I
finally did it in a not so efficient way, I am sure you can help
improving it :)

Author: Viresh Kumar <viresh.kumar@...aro.org>
Date:   Tue Feb 9 12:19:50 2021 +0530

    dt-validate: Skip "required property" checks for overlays
    
    The overlays may not carry the required properties and would depend on
    the base dtb to carry those, there is no point raising those errors
    here.
    
    Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
 tools/dt-validate | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/dt-validate b/tools/dt-validate
index 410b0538ef47..c6117504f1d1 100755
--- a/tools/dt-validate
+++ b/tools/dt-validate
@@ -80,6 +80,23 @@ show_unmatched = False
                                   (filename, line, col, fullname, node['compatible']), file=sys.stderr)
                             continue
 
+                        if nodename == '/':
+                            is_fragment = False
+                            for name in node.items():
+                                if name[0] == 'fragment@0':
+                                    is_fragment = True
+                                    break;
+
+                            if is_fragment == True:
+                                if 'required property' in error.message:
+                                    continue
+                                elif error.context:
+                                    for e in error.context:
+                                        if not 'required property' in e.message:
+                                            break
+                                    else:
+                                        continue
+
                         print(dtschema.format_error(filename, error, nodename=nodename, verbose=verbose) +
                             '\n\tFrom schema: ' + schema['$filename'],
                             file=sys.stderr)

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ