[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b9f2114d04a6d784a65a9c53a6e0265ad87a18bd.1659369873.git.baskov@ispras.ru>
Date: Mon, 1 Aug 2022 19:38:58 +0300
From: Evgeniy Baskov <baskov@...ras.ru>
To: Borislav Petkov <bp@...en8.de>
Cc: Evgeniy Baskov <baskov@...ras.ru>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Alexey Khoroshilov <khoroshilov@...ras.ru>
Subject: [PATCH 1/8] x86/boot: Align vmlinuz sections on page size
To protect sections on page table level each section
needs to be aligned on page size (4KB).
Set sections alignment in linker script.
Signed-off-by: Evgeniy Baskov <baskov@...ras.ru>
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 112b2375d021..6be90f1a1198 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -27,21 +27,27 @@ SECTIONS
HEAD_TEXT
_ehead = . ;
}
+ . = ALIGN(PAGE_SIZE);
.rodata..compressed : {
+ _compressed = .;
*(.rodata..compressed)
+ _ecompressed = .;
}
+ . = ALIGN(PAGE_SIZE);
.text : {
_text = .; /* Text */
*(.text)
*(.text.*)
_etext = . ;
}
+ . = ALIGN(PAGE_SIZE);
.rodata : {
_rodata = . ;
*(.rodata) /* read-only data */
*(.rodata.*)
_erodata = . ;
}
+ . = ALIGN(PAGE_SIZE);
.data : {
_data = . ;
*(.data)
--
2.35.1
Powered by blists - more mailing lists