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] [day] [month] [year] [list]
Message-ID: <20230805-murmuring-primate-42e9d91957f3@spud>
Date:   Sat, 5 Aug 2023 10:16:25 +0100
From:   Conor Dooley <conor@...nel.org>
To:     Rob Herring <robh@...nel.org>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt: dt-check-compatible: Find struct of_device_id
 instances with compiler annotations

On Fri, Aug 04, 2023 at 01:01:29PM -0600, Rob Herring wrote:
> The regex search for declarations of struct of_device_id was missing
> cases that had a compiler annotation such as "__maybe_unused". Improve
> the regex to allow for these. Use '\S' instead of specific characters to
> shorten the regex. That also finds some more compatibles using '.'
> characters.
> 
> Unfortunately, these changes add ~400 more compatibles without a
> schema.
> 
> Signed-off-by: Rob Herring <robh@...nel.org>

Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>

Thanks,
Conor.

> ---
>  scripts/dtc/dt-extract-compatibles | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/dtc/dt-extract-compatibles b/scripts/dtc/dt-extract-compatibles
> index a1119762ed08..9df9f1face83 100755
> --- a/scripts/dtc/dt-extract-compatibles
> +++ b/scripts/dtc/dt-extract-compatibles
> @@ -25,8 +25,8 @@ def parse_of_declare_macros(data):
>  def parse_of_device_id(data):
>  	""" Find all compatible strings in of_device_id structs """
>  	compat_list = []
> -	for m in re.finditer(r'of_device_id\s+[a-zA-Z0-9_]+\[\]\s*=\s*({.*?);', data):
> -		compat_list += re.findall(r'\.compatible\s+=\s+"([a-zA-Z0-9_\-,]+)"', m[1])
> +	for m in re.finditer(r'of_device_id(\s+\S+)?\s+\S+\[\](\s+\S+)?\s*=\s*({.*?);', data):
> +		compat_list += re.findall(r'\.compatible\s+=\s+"(\S+)"', m[3])
>  
>  	return compat_list
>  
> -- 
> 2.40.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ