summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorPeter Oberparleiter <oberpar@linux.ibm.com>2022-09-16 15:01:36 +0200
committerVasily Gorbik <gor@linux.ibm.com>2022-10-26 14:47:31 +0200
commitaa127a069ef312aca02b730d5137e1778d0c3ba7 (patch)
tree28b9c9c8662b7ecfdeecad6430e22ad49f9f9d5b /arch/s390
parent6ec803025cf3173a57222e4411097166bd06fa98 (diff)
s390/boot: add secure boot trailer
This patch enhances the kernel image adding a trailer as required for secure boot by future firmware versions. Cc: <stable@vger.kernel.org> # 5.2+ Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/boot/vmlinux.lds.S13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S
index af5c6860e0a1..fa9d33b01b85 100644
--- a/arch/s390/boot/vmlinux.lds.S
+++ b/arch/s390/boot/vmlinux.lds.S
@@ -102,8 +102,17 @@ SECTIONS
_compressed_start = .;
*(.vmlinux.bin.compressed)
_compressed_end = .;
- FILL(0xff);
- . = ALIGN(4096);
+ }
+
+#define SB_TRAILER_SIZE 32
+ /* Trailer needed for Secure Boot */
+ . += SB_TRAILER_SIZE; /* make sure .sb.trailer does not overwrite the previous section */
+ . = ALIGN(4096) - SB_TRAILER_SIZE;
+ .sb.trailer : {
+ QUAD(0)
+ QUAD(0)
+ QUAD(0)
+ QUAD(0x000000207a49504c)
}
_end = .;