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, 12 Jan 2011 13:28:23 -0500 (EST)
From:	Nicolas Pitre <nico@...xnic.net>
To:	Dave Martin <dave.martin@...aro.org>
Cc:	Alexander Holler <holler@...oftware.de>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	Rabin Vincent <rabin@....in>, linux-kernel@...r.kernel.org,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: ARM: relocation out of range (when loading a module)

On Wed, 12 Jan 2011, Dave Martin wrote:

> In general, do we expect always to be able to avoid the situation
> where branches in the kernel may need to cover too large a range ...
> and is there any strategy for working aroung it?

Normally we try to keep the code close together.  And at least for the 
.text section, the linker is able to insert indirect branch veneers when 
the range is too large.  But in the case of modules, it's the in-kernel 
code that perform the final symbol relocation.

> If we have problems branching from the modules area into vmlinux, we
> could possibly build modules with -fPIC : this would remove the
> restriction on branch range, though there would also be some
> performance impact for the modules...

If we really needed to do such thing, that would be even better to 
simply have the kernel create those indirect veneers dynamically.  And 
in fact, Russell had that working and he posted the corresponding patch 
many years ago, but the module placement was made so that the indirect 
branches were unnecessary.

Even now, it's probably a better idea to rework the section layout and 
preserve the ability to perform direct branches into the kernel from 
modules as much as possible.


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