From 81796a3c6a4ad3ba0408c807ec14f50e6270ec23 Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Mon, 5 Mar 2018 09:58:00 +0100 Subject: s390/decompressor: trim uncompressed image head during the build It seems to be suboptimal to compress the entire image, so that we could decompress and throw away the first 68k (0x11000) during the boot process. This patch trims 0x11000 bytes during the build process and adjusts symbols in size.h accordingly. Besides making bzImage smaller, this change would also be a benefit for kaslr. It allows to decompress the kernel right to desired offset, without worrying about dead weight in front of the decompressed image. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/boot/compressed/head.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/s390/boot/compressed/head.S') diff --git a/arch/s390/boot/compressed/head.S b/arch/s390/boot/compressed/head.S index 231d1491d431..9f94eca0f467 100644 --- a/arch/s390/boot/compressed/head.S +++ b/arch/s390/boot/compressed/head.S @@ -23,12 +23,10 @@ ENTRY(startup_continue) aghi %r15,-160 brasl %r14,decompress_kernel # Set up registers for memory mover. We move the decompressed image to - # 0x11000, starting at offset 0x11000 in the decompressed image so - # that code living at 0x11000 in the image will end up at 0x11000 in - # memory. + # 0x11000, where startup_continue of the decompressed image is supposed + # to be. lgr %r4,%r2 lg %r2,.Loffset-.LPG1(%r13) - la %r4,0(%r2,%r4) lg %r3,.Lmvsize-.LPG1(%r13) lgr %r5,%r3 # Move the memory mover someplace safe so it doesn't overwrite itself. -- cgit v1.2.3