linux-stable/arch/alpha
Edward Humes 6c6f956c92 alpha: fix R_ALPHA_LITERAL reloc for large modules
[ Upstream commit b6b17a8b3e ]

Previously, R_ALPHA_LITERAL relocations would overflow for large kernel
modules.

This was because the Alpha's apply_relocate_add was relying on the kernel's
module loader to have sorted the GOT towards the very end of the module as it
was mapped into memory in order to correctly assign the global pointer. While
this behavior would mostly work fine for small kernel modules, this approach
would overflow on kernel modules with large GOT's since the global pointer
would be very far away from the GOT, and thus, certain entries would be out of
range.

This patch fixes this by instead using the Tru64 behavior of assigning the
global pointer to be 32KB away from the start of the GOT. The change made
in this patch won't work for multi-GOT kernel modules as it makes the
assumption the module only has one GOT located at the beginning of .got,
although for the vast majority kernel modules, this should be fine. Of the
kernel modules that would previously result in a relocation error, none of
them, even modules like nouveau, have even come close to filling up a single
GOT, and they've all worked fine under this patch.

Signed-off-by: Edward Humes <aurxenon@lunos.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:49:01 +01:00
..
boot alpha/boot/tools/objstrip: fix the check for ELF header 2023-03-10 09:39:35 +01:00
configs
include alpha: fix TIF_NOTIFY_SIGNAL handling 2022-12-31 13:14:01 +01:00
kernel alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:49:01 +01:00
lib alpha: move __udiv_qrnnd library function to arch/alpha/lib/ 2021-09-18 14:45:48 -07:00
math-emu alpha: move __udiv_qrnnd library function to arch/alpha/lib/ 2021-09-18 14:45:48 -07:00
mm exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
Kbuild
Kconfig alpha: enable GENERIC_PCI_IOMAP unconditionally 2021-09-19 10:37:00 -07:00
Kconfig.debug
Makefile