]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: allocate space for SDT trampolines using module_alloc
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 4 Jun 2015 20:17:43 +0000 (16:17 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:30:14 +0000 (15:30 +0100)
commitaadd712bb77a1c7b4753eb2fbb665195e3d674ed
treea683467f73c823aca14aa20f499cb8cd7213a19b
parent93f57aa2e742fbffdf427300531889974afac2ea
dtrace: allocate space for SDT trampolines using module_alloc

The allocation of the SDT trampolines was done previously using vmalloc
which may cause the trampolines to be too far away from the code that
they provide a call to dtrace_probe() for, making it impossible to put
a jump to the trampoline in a single instruction at the probe location.
By using module_alloc on SPARC, the trampolines are allocated in the
memory region where modules live, which is by design within the jump
range.

The allocated memory is known to be of sufficient size for trampolines,
yet its actual use is not determined at the kernel level.  It is simply
provided as a chunk of memory in the appropriate range.

Orabug: 21220344

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/module.c