]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/boot: Respect kaslr_enabled() for identity randomization
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 25 Feb 2026 09:30:28 +0000 (10:30 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 5 Mar 2026 20:08:50 +0000 (21:08 +0100)
commit92ae0c1efc6c7b9c3299a6c954bca2a928cb9f60
treef79fc78fb70ef046bc6ccb7e95e84c44b00dd372
parent20216c126bd946248d28d875c4a82cd1a79ba794
s390/boot: Respect kaslr_enabled() for identity randomization

CONFIG_RANDOMIZE_IDENTITY_BASE only enables support for randomizing the
identity mapping base. The randomization (identity base != 0) itself
should happen only when KASLR is enabled at runtime.

Guard the __identity_base update with kaslr_enabled() so nokaslr (and
other KASLR-disabled cases) keep the non-randomized identity mapping at 0.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/startup.c