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, 14 Jun 2010 22:52:08 -0400 (EDT)
From:	Tim Abbott <tabbott@...lice.com>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
cc:	Matt Fleming <matt@...sole-pimps.org>, linux-arch@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
	Sam Ravnborg <sam@...nborg.org>, Michal Marek <mmarek@...e.cz>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	linux-parisc@...r.kernel.org
Subject: Re: [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT

On Mon, 14 Jun 2010, James Bottomley wrote:

> On Mon, 2010-06-14 at 18:21 -0400, Tim Abbott wrote:
> > On Mon, 14 Jun 2010, Matt Fleming wrote:
> > 
> > > Do these special kernel sections include things like the parisc
> > > .text.do_softirq, .text.sys_exit, etc? James raised a good objection to
> > > the parisc patch of this series. I'm guessing most people saw it already
> > > but I'll paste it here for reference,
> > > 
> > >     This would destroy all of the named parisc text ordering we do above the
> > >     removed line because now you'd have swept up all the function sections
> > >     before we get to them, won't it?
> > > 
> > >     The ordering is an execution speed up on 32 bit systems because our
> > >     relative jump is so short.
> > > 
> > > Will you changes handle this OK?
> > 
> > I think I addressed this in my reply to James just now, but to be super 
> > clear, this -ffunction-sections plan involves renaming .text.do_softirq to 
> > .text..do_softirq (etc.) first.
> 
> OK, so that doesn't make a lot of sense to me; I suspect because you
> don't understand what parisc is doing.  These aren't names of linux
> special sections ... they're names of function sections.  For
> efficiency, we take specific hot functions and place them together in
> the linker script so the jumps between them are small enough to be coded
> as relative on the 32 bit architecture.  It's really just a more
> efficient way of laying out the binary.

Yeah, I'd forgotten parisc was doing -ffunction-sections, now I understand 
what you're talking about.  What I'd recommend is just moving the 
.text.do_softirq and friends like in the hunk below -- I believe that 
should achieve the same performance goals, and should have no conflict 
with adding a wildcard for -ffunction-sections generated sections to 
TEXT_TEXT.

	-Tim Abbott

diff --git a/arch/parisc/kernel/vmlinux.lds.S 
b/arch/parisc/kernel/vmlinux.lds.S
index d64a6bb..ad0d3d3 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -52,15 +52,15 @@ SECTIONS
        _text = .;              /* Text and read-only data */
        .text ALIGN(16) : {
                HEAD_TEXT
+               *(.text.do_softirq)
+               *(.text.sys_exit)
+               *(.text.do_sigaltstack)
+               *(.text.do_fork)
                TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT
                KPROBES_TEXT
                IRQENTRY_TEXT
-               *(.text.do_softirq)
-               *(.text.sys_exit)
-               *(.text.do_sigaltstack)
-               *(.text.do_fork)
                *(.text.*)
                *(.fixup)
                *(.lock.text)           /* out-of-line lock text */


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