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] [day] [month] [year] [list]
Message-Id: <20160121053407.A6CEB140BF6@ozlabs.org>
Date:	Thu, 21 Jan 2016 16:34:07 +1100 (AEDT)
From:	Michael Ellerman <mpe@...erman.id.au>
To:	Michael Ellerman <mpe@...erman.id.au>, <linuxppc-dev@...abs.org>
Cc:	amodra@...il.com, rusty@...tcorp.com.au,
	linux-kernel@...r.kernel.org, quentin.casasnovas@...cle.com,
	paul.gortmaker@...driver.com, Anton Blanchard <anton@...ba.org>
Subject: Re: powerpc: Simplify module TOC handling

On Mon, 2016-18-01 at 00:44:27 UTC, Michael Ellerman wrote:
> From: Alan Modra <amodra@...il.com>
> 
> PowerPC64 uses the symbol .TOC. much as other targets use
> _GLOBAL_OFFSET_TABLE_. It identifies the value of the GOT pointer (or in
> powerpc parlance, the TOC pointer). Global offset tables are generally
> local to an executable or shared library, or in the kernel, module. Thus
> it does not make sense for a module to resolve a relocation against
> .TOC. to the kernel's .TOC. value. A module has its own .TOC., and
> indeed the powerpc64 module relocation processing ignores the kernel
> value of .TOC. and instead calculates a module-local value.
> 
> This patch removes code involved in exporting the kernel .TOC., tweaks
> modpost to ignore an undefined .TOC., and the module loader to twiddle
> the section symbol so that .TOC. isn't seen as undefined.
> 
> Note that if the kernel was compiled with -msingle-pic-base then ELFv2
> would not have function global entry code setting up r2. In that case
> the module call stubs would need to be modified to set up r2 using the
> kernel .TOC. value, requiring some of this code to be reinstated.
> 
> mpe: Furthermore a change in binutils master (not yet released) causes
> the current way we handle the TOC to no longer work when building with
> MODVERSIONS=y and RELOCATABLE=n. The symptom is that modules can not be
> loaded due to there being no version found for TOC.
> 
> Cc: stable@...r.kernel.org # 3.16+
> Signed-off-by: Alan Modra <amodra@...il.com>
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/c153693d7eb9eeb28478aa2dea

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ