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:   Tue, 29 Oct 2019 09:07:01 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Ramsay Jones <ramsay@...sayjones.plus.com>
Cc:     Joe Perches <joe@...ches.com>,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        linux-sparse@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all
 __attribute__ #defines

On Tue, Oct 29, 2019 at 02:38:54AM +0000, Ramsay Jones wrote:
> On 28/10/2019 23:03, Luc Van Oostenryck wrote:
> > diff --git a/parse.c b/parse.c
> > index 4464e2667..4b0a1566c 100644
> > --- a/parse.c
> > +++ b/parse.c
> > @@ -345,6 +345,7 @@ static struct symbol_op goto_op = {
> >  
> >  static struct symbol_op __context___op = {
> >  	.statement = parse_context_statement,
> > +	.attribute = attribute_context,
> 
> Hmm, so why is do we have a context_op and a __context___op?
> 
> >  };
> >  
> >  static struct symbol_op range_op = {
> > @@ -537,6 +538,7 @@ static struct init_keyword {
> >  	{ "while",	NS_KEYWORD, .op = &while_op },
> >  	{ "do",		NS_KEYWORD, .op = &do_op },
> >  	{ "goto",	NS_KEYWORD, .op = &goto_op },
> > +	{ "context",	NS_KEYWORD, .op = &context_op },
> >  	{ "__context__",NS_KEYWORD, .op = &__context___op },
> 
> So, can '__context__' be used in a statement, as well as an
> attribute, while 'context' can only be used in an attribute?

Yes, indeed.
'__context__' was only parsed as a statement and 'context'
only as an attribute. But now we also want to be able to use
'__context__' as an attribute (because 'context' is not a
reserved keyword and can thus be a used defined macro).

There is no reason, though, we should now also want to use
'context' as a statement since it's a sparse extension. Hence
adding attribute_context to '__context___op' and keeping
'context_op' as such (but moving them together).

-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ