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:	Wed, 19 Oct 2011 21:05:17 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: Please include const-sections into linux-next

On Wed, Oct 19, 2011 at 01:55:57PM -0500, James Bottomley wrote:
> On Wed, 2011-10-19 at 18:33 +0200, Andi Kleen wrote:
> > > OK, look at it another way: why do we need the type annotations?  I
> > > think it's only for section conflict checking, right?  If the compiler
> > > gets it wrong anyway, why not just dump all the type annotations, then
> > > it should have no type conflicts (spurious or otherwise) to complain
> > > about.  We already have link time section checking scripts (they're the
> > > useless ones that complain about section mismatches in dev annoations)
> > > so why not put them to work to make up for compiler deficiencies?
> > 
> > You mean removing all the init sections stuff?  I think it has been proposed
> > in the past, but it's a couple of hundred KB of memory usually.
> > Would you accept that for PA-RISC? 
> > 
> > If you have init sections you need to annotate them correctly because
> > a section is defined by its rwx attributes plus name and both need
> > to match. We didn't always check this, so there was some bitrot,
> > but it ultimatively has to be correct.
> 
> We're talking at cross purposes. But it doesn't matter, the error
> doesn't seem to be anything to do with type.  This simple patch is
> what's causing it (I can apply it alone to the working tree) and get the
> error.
> 
> What I can't see is why.

For some reason your compiler sets the const section read/write:

.section        .devinit.data,"aw",@progbits     <---- writable
        .align 8
        .type   skel_netdrv_tbl, @object
        .size   skel_netdrv_tbl, 48
skel_netdrv_tbl:
; chip_name:
        .dword  .LC56

while my x86 toolchain sets it to read only

        .string "1000/100/10M Ethernet PCI Adapter"
        .section        .devinit.data,"a",@progbits   <---- not writable
        .align 16
        .type   skel_netdrv_tbl, @object
        .size   skel_netdrv_tbl, 48
skel_netdrv_tbl:
# chip_name:
        .quad   .LC32
# flags:
        .long   0
        .zero   4

If you check a few other const symbols with own
section are they all also writable?

-andi

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