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: <20150408153554.65c87de78f1c2289483f67e8@linux-foundation.org>
Date:	Wed, 8 Apr 2015 15:35:54 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/2] test-hexdump.c: Fix initconst confusion

On Wed,  8 Apr 2015 06:06:45 -0700 Andi Kleen <andi@...stfloor.org> wrote:

> From: Andi Kleen <ak@...ux.intel.com>
> 
> const char *...[]  is not const, but an array of pointer to const.
> So these arrays cannot be __initconst, but must be __initdata
> 
> This fixes section conflicts with LTO.
> 
> --- a/lib/test-hexdump.c
> +++ b/lib/test-hexdump.c
> @@ -18,26 +18,26 @@ static const unsigned char data_b[] = {
>  
>  static const unsigned char data_a[] = ".2.{....p..$}.4...1.....L...C...";
>  
> -static const char *test_data_1_le[] __initconst = {
> +static const char * const test_data_1_le[] __initconst = {

const char * const __initconst

>  	"be", "32", "db", "7b", "0a", "18", "93", "b2",
>  	"70", "ba", "c4", "24", "7d", "83", "34", "9b",
>  	"a6", "9c", "31", "ad", "9c", "0f", "ac", "e9",
>  	"4c", "d1", "19", "99", "43", "b1", "af", "0c",
>  };
>  
> +static const char *test_data_2_le[] __initdata = {
> +static const char *test_data_4_le[] __initdata = {
> +static const char *test_data_8_le[] __initdata = {

const char * __initdata

Why is test_data_1_le[] different?

Can we make them all "const char * const __initconst"?  That would make
checkpatch happy ;)

--
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