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]
Date:	Thu, 24 Oct 2013 21:41:58 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Vineet Gupta <vineetg76@...il.com>
Cc:	Richard Weinberger <richard.weinberger@...il.com>,
	Chen Gang <gang.chen@...anux.com>,
	Joern Rennecke <joern.rennecke@...ecosm.com>,
	James Hogan <james.hogan@...tec.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Takashi Iwai <tiwai@...e.de>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>,
	"jeremy.bennett@...ecosm.com" <jeremy.bennett@...ecosm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Claudiu Zissulescu <Claudiu.Zissulescu@...opsys.com>,
	Francois Bedard <Francois.Bedard@...opsys.com>,
	Sam Ravnborg <sam@...nborg.org>, Joe Perches <joe@...ches.com>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: Portable assmbler code - newline (was Re: [PATCH]
 kernel/modsign_certificate.S: use real contents instead of macro GLOBAL())

On Thu, Oct 24, 2013 at 7:28 PM, Vineet Gupta <vineetg76@...il.com> wrote:
> +CC linux-arch
>
> On 10/24/2013 11:33 AM, Richard Weinberger wrote:
>> On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@...anux.com> wrote:
>>> > For some architectures, tool chain is not smart enough to recognize the
>>> > macro with multiple lines (e.g. arc tool chain), and for common ".S"
>>> > file, this kind of macro is also rarely used.
>> Does not "not smart enough" mean than the said toolchain is broken/buggy
>> or is the kernel using an unsupported notation?
>>
>
> IMHO this is not broken - rather the code is not fully portable - given that gas
> ports of arches have differnet notions of what to treat as comment and what newline.
>
> Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in
> the same way as ARC is.
>
> Historically ARC has had ';' as comment char, which Joern relatively recently
> augmented to have '#' as well. However there's legacy codebase which relies on ';'
> being a comment and we can't change that fact.
>
> So can we introduce an ARCH over-ridable newline annotation in linkage.h and other
> places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of
> #include it shd be pretty strightforward.
>
> Something like below. I can send the formal patch if people think the approach is OK.

By what are you gonna override __ARCH_NL on ARC?
I'm afraid cpp will still turn it into a single line.

> ----------------->
> diff --git a/include/linux/linkage.h b/include/linux/linkage.h
> index d3e8ad23a8e0..4188c632f2b8 100644
> --- a/include/linux/linkage.h
> +++ b/include/linux/linkage.h
> @@ -6,6 +6,10 @@
>  #include <linux/export.h>
>  #include <asm/linkage.h>
>
> +#ifndef __ARCH_NL
> +#define __ARCH_NL
> +#endif
> +
>  #ifdef __cplusplus
>  #define CPP_ASMLINKAGE extern "C"
>  #else
> @@ -75,7 +79,7 @@
>
>  #ifndef ENTRY
>  #define ENTRY(name) \
> -  .globl name; \
> +  .globl name; __ARCH_NL \
>    ALIGN; \
>    name:
>  #endif
> @@ -83,7 +87,7 @@
>
>  #ifndef WEAK
>  #define WEAK(name)        \
> -       .weak name;        \
> +       .weak name; __ARCH_NL \
>         name:
>  #endif

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ