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:	Mon, 12 Mar 2007 13:53:51 +0000
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	Takashi Iwai <tiwai@...e.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, perex@...e.cz,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [SOUND] hda_intel: build fix

On Mon, Mar 12, 2007 at 12:04:30PM +0100, Takashi Iwai wrote:

> It's no big problem to remove const in these cases, but allowing const
> with __devinitdata seems the right fix to me...

Gccs derives the readability of a section used with __attribute(section())
from the first use, which in case of this driver was a non-const use, so
gcc made .init.data a r/w section.  Later uses were marked with const,
so did conflict.  Having to ensure that all members of a section are const
or are not const is painful, so this is clearly less than desirable
behaviour on gcc's side.  I think gcc picking the most permissive
attributes for a section, that is r/w in this case would be far preferable.

Here is a small test case btw:

int foo __attribute__ ((__section__ (".init.data"))) = 23;
const int bar __attribute__ ((__section__ (".init.data"))) = 42;

Now I'm not a great fan of the patch I've posted but it reflects what real
world gcc is doing so for the time being I don't see much of a chance to
The Right Thing (TM).  And the gain from const in this case will be small
anyway.

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