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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 03 Sep 2018 15:28:10 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jonathan Corbet <corbet@....net>,
        Heinrich Schuchardt <xypron.glpk@....de>
Cc:     linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] docs: kernel-doc: fix parsing of function pointers

On Mon, 2018-09-03 at 15:38 -0600, Jonathan Corbet wrote:
> On Mon, 3 Sep 2018 22:29:00 +0200
> Heinrich Schuchardt <xypron.glpk@....de> wrote:
> 
> > > >  	    # pointer-to-function
> > > >  	    $arg =~ tr/#/,/;
> > > > -	    $arg =~ m/[^\(]+\(\*?\s*([\w\.]*)\s*\)/;  
> > 
> > m/[^\(]+\(\*?\s*([\w\.]*)\s*\)/;
> >            ^
> > Here we allow for 0..1 asterixes.
> > 
> > If there is no asterix it is not a function pointer. Why should we care
> > for this case?
> 
> GCC seems to allow that asterisk (asterix is an indomitable Gaul :) to be
> missing; not sure if that's officially allowed by the language or not.  I
> also don't know if any code in the kernel elides it,

Many typedefs for function pointers do not use the *
Dunno if there are many others, I didn't look hard.

$ git grep -P '\w+\s*\*?\s*\(\s*\w+\w*\)\s*\(\w+' | \
  grep -w typedef


Powered by blists - more mailing lists