]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
s390/module: fix loading modules with a lot of relocations
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 19 Jan 2022 18:26:37 +0000 (19:26 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Sun, 30 Jan 2022 07:03:34 +0000 (08:03 +0100)
commitf6f6df6c945077edfd60bd89d789dee4b766eed2
treeb36e050c24b0d3cb7683117528d7a5fcd03420a3
parent48d86d5b7c61b46704e268ffc6609a9b82de7f3c
s390/module: fix loading modules with a lot of relocations

If the size of the PLT entries generated by apply_rela() exceeds
64KiB, the first ones can no longer reach __jump_r1 with brc. Fix by
using brcl. An alternative solution is to add a __jump_r1 copy after
every 64KiB, however, the space savings are quite small and do not
justify the additional complexity.

Fixes: f19fbd5ed642 ("s390: introduce execute-trampolines for branches")
Cc: stable@vger.kernel.org
Reported-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arch/s390/kernel/module.c