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]
Message-ID: <0e88250a-21ac-800b-e6e4-eb7dc459b04e@roeck-us.net>
Date:   Wed, 8 Sep 2021 09:34:08 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Daniel Bristot de Oliveira <bristot@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH] trace/osnoise: Do not use 'main' as variable name

On 9/8/21 8:53 AM, Steven Rostedt wrote:
> On Wed,  8 Sep 2021 08:14:07 -0700
> Guenter Roeck <linux@...ck-us.net> wrote:
> 
>> gcc 11.x may get a hiccup when encountering 'main' as variable name.
>>
>> kernel/trace/trace_osnoise.c: In function 'start_kthread':
>> kernel/trace/trace_osnoise.c:1515:8: error: 'main' is usually a function
>>
>> Use a different variable name to silence it.
> 
> Egad, no. NACK! Double NACK. Linus already NACK'd this.
> 
> (although it's ironic that he also added -Werror as the default :-/ )
> 
> The bug in is in gcc, go send them a patch.
> 
> THERE IS NO ISSUE WITH HAVING A LOCAL VARIABLE NAMED "main"!!!!
> 
> This has already been discussed:
> 
>    https://lore.kernel.org/all/CAHk-=whHxeUjaNrWOLb0qx=-nibRZzQomwkw9xMPH_aHCf=BWQ@mail.gmail.com/
> 
> For now, the workaround is this patch:
> 
>     https://lore.kernel.org/all/20210813224131.25803-1-rdunlap@infradead.org/
> 

No problem. Sorry, I didn't find the other patch.

FWIW, it wasn't gcc 11.x, it was gcc 8.1, which is the only gcc version
that I can get to compile nds32 images (more recent versions either fail
to compile gcc, or fail to build the kernel with assembler errors).
I'll just stop build testing nds32:allmodconfig instead.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ