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: <20201113152106.7b4a07ee@lwn.net>
Date:   Fri, 13 Nov 2020 15:21:06 -0700
From:   Jonathan Corbet <corbet@....net>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        Eduardo Habkost <ehabkost@...hat.com>
Subject: Re: [PATCH 2/2] kernel-doc: Handle function typedefs without
 asterisks

On Fri, 30 Oct 2020 15:47:13 +0100
Paolo Bonzini <pbonzini@...hat.com> wrote:

> From: Eduardo Habkost <ehabkost@...hat.com>
> 
> Example of typedef that was not parsed by kernel-doc:
> 
>   typedef void (ObjectUnparent)(Object *obj);
> 
> Signed-off-by: Eduardo Habkost <ehabkost@...hat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>

So as you've undoubtedly noticed, reading those kernel-doc regexes is ... a
wee bit on the painful side.  Trying to compare two of them in a patch to
figure out what you have done is even worse.  I suspect we want these
patches, but can you please supply a changelog that describes the change? 

> ---
>  scripts/kernel-doc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 5b5caa7642f7..1a9c918aa653 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -1302,7 +1302,7 @@ sub dump_typedef($$) {
>      $x =~ s@/\*.*?\*/@@gos;	# strip comments.
>  
>      # Parse function prototypes
> -    if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/ ||
> +    if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*?\s*(\w\S+)\s*\)\s*\((.*)\);/ ||

Here it appears that you are making the "*" before the function-pointer
name optional, right?  It really would help to say so in the changelog.

This is true for the other patch as well.

>  	$x =~ /typedef\s+(\w+\s*\**)\s*(\w\S+)\s*\s*\((.*)\);/) {
>  
>  	# Function typedefs

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ