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: <1365156435.1970.31.camel@dabdike>
Date:	Fri, 05 Apr 2013 12:07:15 +0200
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Sebastian Wankerl <sisewank@....cs.fau.de>,
	linux-kernel@...r.kernel.org,
	Philip Kranz <philip.kranz@...glemail.com>,
	i4passt@...ts.informatik.uni-erlangen.de,
	linux-parisc@...r.kernel.org
Subject: Re: [PATCH] Add non-zero module sections to sysfs

On Fri, 2013-04-05 at 14:30 +1030, Rusty Russell wrote:
> Sebastian Wankerl <sisewank@....cs.fau.de> writes:
> > On 04/04/13 03:00, Rusty Russell wrote:
> >> Sebastian Wankerl <sisewank@....cs.fau.de> writes:
> >>> Add non-zero module sections to sysfs on architectures unequal to PARISC.
> >>> KGDB needs all module sections for proper module debugging. Therefore, commit 
> >>> 35dead4235e2b67da7275b4122fed37099c2f462 is revoked except for PARISC
> >>> architecture.

Thanks for actually cc'ing us.

> >> #ifdef CONFIG_PARISC in the middle of kernel/module.c is super-ugly, and
> >> wrong.
> >
> > I don't see why this is wrong. It used to load all sections to sysfs
> > until the patch mentioned. Actually, it is the PARISC build chain which
> > is broken.
> 
> Exactly.  Don't workaround it here, revert it and put the
> duplicate-section-name fixup in parisc where it belongs.
> 
> Assuming parisc still produces these dup sections: that patch is 4 years
> old now.

Just so you know: this isn't a parisc specific problem.  Gcc produces
duplicate section names under various circumstances, but the one that
bites us is -ffunction-sections.  Note that there are proposals to use
-ffunction-sections on all architectures (so we can garbage collect
unused functions) in which case you'll induce the bug identified in
35dead4235e2b67da7275b4122fed37099c2f462 on every architecture

The problem is our assumption that section names be unique.  This
assumption is wrong.  The ELF spec says (version 1.1 page 1-15): "An
object file may have more than one section with the same name."  We need
to fix the kernel not to rely on a bogus assumption ... but we had no
idea how to do that in a way that preserved the backwards compatibility
of sections subdirectory.

I admit that 35dead4235e2b67da7275b4122fed37099c2f462 is a hack, but now
the problem has got attention, can we fix it properly?

James


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