Re: [PATCH v2 0/8] add support for relative references in jump tables

From: Heiko Carstens
Date: Wed Jul 04 2018 - 03:59:39 EST


On Mon, Jul 02, 2018 at 08:11:37PM +0200, Ard Biesheuvel wrote:
> This series implements support for emitting the data structures associated
> with jump tables as 32-bit relative references instead of absolute
> references, which take up more space on builds that target 64-bit
> architectures, or implement self relocation [or both].
>
> This series enables it for arm64 and x86, although other architectures
> might benefit as well.

Hello Ard,

feel free to add the patch below which adds support for s390 to your series.

> Changes since v1:
> - change the relative reference to the static key to a 64-bit wide one on 64
> bit architectures; this is necessary on arm64, which allows modules to
> reside anywhere within a 4 GB window covering the core kernel text, which
> means a 32-bit signed quantity with its +/- 2 GB range is insufficient.
> Note that x86_64 changes are in preparation that widen the relocation
> range as well (using the PIE linker), so I assumed that the same change
> is appropriate for x86 as well.

FWIW, kernel modules on s390 are since ages more than 2GB away from the
core kernel text. So this is required for s390 as well.