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, 4 Oct 2006 12:14:17 -0400
From:	Vivek Goyal <vgoyal@...ibm.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	"H. J. Lu" <hjl@...on.org>,
	linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Reloc Kernel List <fastboot@...ts.osdl.org>,
	ebiederm@...ssion.com, ak@...e.de, horms@...ge.net.au,
	lace@...kratochvil.net, hpa@...or.com, magnus.damm@...il.com,
	lwang@...hat.com, dzickus@...hat.com, maneesh@...ibm.com
Subject: Re: [PATCH 3/12] i386: Force section size to be non-zero to prevent a symbol becoming absolute

On Wed, Oct 04, 2006 at 09:09:46AM -0700, Andrew Morton wrote:
> On Tue, 3 Oct 2006 13:09:08 -0400
> Vivek Goyal <vgoyal@...ibm.com> wrote:
> 
> > o Relocation patches for i386, moved the symbols in vmlinux.lds.S inside
> >   sections so that these symbols become section relative and are no more
> >   absolute. If these symbols become absolute, its bad as they are not
> >   relocated if kernel is not loaded at the address it has been compiled
> >   for.
> > 
> > o Ironically, just moving the symbols inside the section does not 
> >   gurantee that symbols inside will not become absolute. Recent 
> >   versions of linkers, do some optimization, and if section size is
> >   zero, it gets rid of the section and makes any defined symbol as absolute.
> > 
> > o This leads to a failure while second kernel is booting.
> >   arch/i386/alternative.c frees any pages present between __smp_alt_begin
> >   and __smp_alt_end. In my case size of section .smp_altinstructions is 
> >   zero and symbol __smpt_alt_begin becomes absolute and is not relocated
> >   and system crashes while it is trying to free the memory starting
> >   from __smp_alt_begin.
> > 
> > o This issue is being fixed by the linker guys and they are making sure
> >   that linker does not get rid of an empty section if there is any
> >   section relative symbol defined in it. But we need to fix it at
> >   kernel level too so that people using the linker version without fix,
> >   are not affected.
> > 
> > o One of the possible solutions is that force the section size to be
> >   non zero to make sure these symbols don't become absolute. This 
> >   patch implements that.
> 
> Would it be reasonable to omit this patch and require that the small number
> of people who want to build relocatable kernels install binutils
> 2.17.50.0.5 or later?

I think that's a reasonable thing to do for now.

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