summaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@linux.ibm.com>2024-02-20 14:35:43 +0100
committerAlexander Gordeev <agordeev@linux.ibm.com>2024-04-17 13:38:00 +0200
commit3bb11234b1d17236ba479f7d0eaa9bd12f2f2493 (patch)
treea76dd92c8cb47191c870dc35529c9be12ddb212b /arch/s390/include
parent236f324b747370b97030c9582591f459353e3589 (diff)
downloadlinux-stable-3bb11234b1d17236ba479f7d0eaa9bd12f2f2493.tar.gz
linux-stable-3bb11234b1d17236ba479f7d0eaa9bd12f2f2493.tar.bz2
linux-stable-3bb11234b1d17236ba479f7d0eaa9bd12f2f2493.zip
s390/boot: Uncouple virtual and physical kernel offsets
This is a preparatory rework to allow uncoupling virtual and physical addresses spaces. Currently __kaslr_offset is the kernel offset in both physical memory on boot and in virtual memory after DAT mode is enabled. Uncouple these offsets and rename the physical address space variant to __kaslr_offset_phys while keep the name __kaslr_offset for the offset in virtual address space. Do not use __kaslr_offset_phys after DAT mode is enabled just yet, but still make it a persistent boot variable for later use. Use __kaslr_offset and __kaslr_offset_phys offsets in proper contexts and alter handle_relocs() function to distinguish between the two. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/page.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h
index f13a4527bf2d..e2137b6ec2ed 100644
--- a/arch/s390/include/asm/page.h
+++ b/arch/s390/include/asm/page.h
@@ -180,12 +180,14 @@ int arch_make_page_accessible(struct page *page);
struct vm_layout {
unsigned long kaslr_offset;
+ unsigned long kaslr_offset_phys;
unsigned long identity_size;
};
extern struct vm_layout vm_layout;
#define __kaslr_offset vm_layout.kaslr_offset
+#define __kaslr_offset_phys vm_layout.kaslr_offset_phys
#define ident_map_size vm_layout.identity_size
static inline unsigned long kaslr_offset(void)