]> git.baikalelectronics.ru Git - 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)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 24 Jan 2022 08:10:37 +0000 (09:10 +0100)
commitcb705d76e35a9a528fdbe59c7cf9be085e018f57
tree3934d5be3e4a58c1706d9985b2ca9fb66fe2524f
parent25d4bed5c82db33eb99e3400f0d0da4ce324fef8
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: 495976bd9f4f ("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>
arch/s390/kernel/module.c