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 09:09:46 -0700
From:	Andrew Morton <akpm@...l.org>
To:	vgoyal@...ibm.com, "H. J. Lu" <hjl@...on.org>
Cc:	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 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?
-
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