linux-stable/arch/alpha/kernel
Edward Humes 69c74104b0 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:50:31 +01:00
..
syscalls alpha: remove the needless aliases osf_{readv,writev} 2022-10-11 10:27:39 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
bugs.c alpha: Implement CPU vulnerabilities sysfs functions. 2018-04-07 15:04:04 -07:00
console.c vgacon: Set VGA struct resource types 2017-12-18 23:07:43 -06:00
core_apecs.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_cia.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
core_irongate.c memblock: use memblock_free for freeing virtual pointers 2021-11-06 13:30:41 -07:00
core_lca.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_marvel.c alpha: fix marvel_ioread8 build regression 2022-10-10 10:33:55 +02:00
core_mcpcia.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_polaris.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
core_t2.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_titan.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
core_tsunami.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_wildfire.c alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
entry.S alpha: fix syscall entry in !AUDUT_SYSCALL case 2022-12-31 13:31:55 +01:00
err_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_ev6.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_ev7.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_impl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_marvel.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_titan.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
es1888.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gct.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c alpha: add full ioread64/iowrite64 implementation 2022-10-04 11:23:29 +02:00
irq.c genirq: Add and use an irq_data_update_affinity helper 2022-07-07 09:38:04 +01:00
irq_alpha.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_i8259.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_impl.h alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_pyxis.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_srm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machvec_impl.h alpha: add full ioread64/iowrite64 implementation 2022-10-04 11:23:29 +02:00
Makefile Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
module.c alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:50:31 +01:00
osf_sys.c alpha: remove the needless aliases osf_{readv,writev} 2022-10-11 10:27:39 -07:00
pc873xx.c alpha: eliminate old-style function definitions 2021-05-06 19:24:11 -07:00
pc873xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-noop.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
pci-sysfs.c alpha: pci-sysfs: fix all kernel-doc warnings 2021-09-08 11:50:25 -07:00
pci.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
pci_impl.h alpha: fix reboot on Avanti platform 2018-01-20 17:01:10 -08:00
pci_iommu.c alpha: Remove usage of the deprecated "pci-dma-compat.h" API 2022-02-25 17:19:20 +01:00
perf_event.c alpha: fix spelling mistakes 2021-07-25 22:33:04 -07:00
process.c kernel: exit: cleanup release_thread() 2022-09-11 21:55:07 -07:00
proto.h alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
ptrace.c ptrace: Create ptrace_report_syscall_{entry,exit} in ptrace.h 2022-03-10 13:35:08 -06:00
rtc.c rtc: Check return value from mc146818_get_time() 2021-12-16 21:50:06 +01:00
setup.c alpha: move from strlcpy with unused retval to strscpy 2022-09-11 21:55:09 -07:00
signal.c resume_user_mode: Move to resume_user_mode.h 2022-03-10 16:51:50 -06:00
smc37c93x.c arch: mostly remove <asm/segment.h> 2019-04-23 21:51:40 +02:00
smc37c669.c arch: mostly remove <asm/segment.h> 2019-04-23 21:51:40 +02:00
smp.c profile: setup_profiling_timer() is moslty not implemented 2022-07-29 18:12:36 -07:00
srm_env.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
srmcons.c tty: the rest, stop using tty_schedule_flip() 2021-11-25 18:35:23 +01:00
sys_alcor.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_cabriolet.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_dp264.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_eb64p.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_eiger.c alpha: remove unneeded semicolon in sys_eiger.c 2020-06-12 17:43:17 -07:00
sys_jensen.c alpha: mark 'Jensen' platform as no longer broken 2021-09-18 14:12:39 -07:00
sys_marvel.c alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
sys_miata.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_mikasa.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_nautilus.c alpha: fix spelling mistakes 2021-07-25 22:33:04 -07:00
sys_noritake.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_rawhide.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_ruffian.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_rx164.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_sable.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_sio.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_sx164.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_takara.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_titan.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_wildfire.c alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
systbls.S alpha: syscalls: switch to generic syscalltbl.sh 2021-04-25 05:25:22 +09:00
termios.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +02:00
time.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
traps.c alpha: fix FEN fault handling 2023-03-10 09:34:25 +01:00
vmlinux.lds.S vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG 2020-09-01 09:50:35 +02:00