Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1111912imu; Fri, 9 Nov 2018 11:06:53 -0800 (PST) X-Google-Smtp-Source: AJdET5cK2NLT3eACQ46aVEXbpDTUDTj6Fau26gKSHmQwGUM4ZM4FOQXThve4b5sfT/l61Pk23bbl X-Received: by 2002:a17:902:d696:: with SMTP id v22-v6mr9881408ply.261.1541790413148; Fri, 09 Nov 2018 11:06:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541790413; cv=none; d=google.com; s=arc-20160816; b=Ymkd0+/SHdHw/m+MNt8/6KLuWJO93jFdmoNeu0voj93+UQ9F1Ct5mn9Xo87z0sU5yt THFXhq8Xd2hDTp8MO0WnMpEjqhF+Yl4/pMkr0LDI4DhZsAqGRdZbLCoJwEWPzGXmui5n 0DPTUhuEulHm+CNmXryaT6w+ijCurtppOWXStymKnrb5pWNgKxpjy/OUvrYSkvSSFScD 6Sv2P1MOx3RHGETgoteb0ZoATzTkTW3AF88sdLnzzDLn8OsJyfPLnBx8EIuCqmLHozmM ySsx5qXQIrEklKeYElwn571h9ouOi3B77Pgnt5ri5Kfp7PdaRigS555BKyxxvtyMJ2cO 1j/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=0pKIS4r8ImvuiwtKABnqvyQXhjzfCeBKYmZbp631nWk=; b=HUIDMfN9V8jEP3Mbz1CBV3hFQg8bqXr/6ZwYw5o+Ym1dk15JK5ONzSdhNj9WBts1cf rBWgCzFn/9hJ/o4B7yih/cgrmEuLuE8ouPPwjvUdkOWif2zCOwUTm+TMVw5n9xqHBV31 e0HGeKX9oUBw/yJXa+rPLVfKhZtW/fRDNsxE4+kOFgW2Ss+l9nW7ea3oCiZ4U8I825Fl bAIgvc9bIyN2ZKlsl+UiGu5r5WDB4IIIEzZEB+Txy9HjaPwPi2Ps9qXQJws5n5J19ZHa DAQoUl618zfzr7p9kLTvKQIYYqmw1JYb+Fp2VoPP4GHrFxaqu8SHqz7CA7uLi/ifVVXf Ji4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19-v6si10028625pfb.113.2018.11.09.11.06.19; Fri, 09 Nov 2018 11:06:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728793AbeKJEpU (ORCPT + 99 others); Fri, 9 Nov 2018 23:45:20 -0500 Received: from tartarus.angband.pl ([54.37.238.230]:51298 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728683AbeKJEpT (ORCPT ); Fri, 9 Nov 2018 23:45:19 -0500 Received: from 89-64-163-218.dynamic.chello.pl ([89.64.163.218] helo=barad-dur.angband.pl) by tartarus.angband.pl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLC3r-000528-3q; Fri, 09 Nov 2018 20:03:20 +0100 Received: from kholdan.angband.pl ([2001:470:64f4::5]) by barad-dur.angband.pl with smtp (Exim 4.89) (envelope-from ) id 1gLC3p-00059p-JZ; Fri, 09 Nov 2018 20:03:18 +0100 Received: by kholdan.angband.pl (sSMTP sendmail emulation); Fri, 09 Nov 2018 20:03:17 +0100 From: Adam Borowski To: linux-kernel@vger.kernel.org, Nick Terrell , Russell King , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org, Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Cc: Adam Borowski Date: Fri, 9 Nov 2018 20:02:51 +0100 Message-Id: <20181109190304.8573-4-kilobyte@angband.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109190304.8573-1-kilobyte@angband.pl> References: <20181109185953.xwyelyqnygbskkxk@angband.pl> <20181109190304.8573-1-kilobyte@angband.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 89.64.163.218 X-SA-Exim-Mail-From: kilobyte@angband.pl X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tartarus.angband.pl X-Spam-Level: X-Spam-Status: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9, TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no languages=en Subject: [PATCH 04/17] x86: Remove support for BZIP2 and LZMA compressed kernel X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on tartarus.angband.pl) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While bzip2 used to be good in its heyday, it's been drastically eclipsed by newer algorithms. In no case it's a rational choice anymore -- at any point of the size-to-compression curve, there's something much better. As we control the build process, any .configs that still select it will harmlessly be adjusted, thus there's no risk of breakage. Bare lzma is redundant with xz, lacks some improvements, and uses its own copy of code instead using the common library. Signed-off-by: Adam Borowski --- Documentation/x86/boot.txt | 11 +++++------ arch/x86/Kconfig | 2 -- arch/x86/boot/compressed/Makefile | 12 +++--------- arch/x86/boot/compressed/misc.c | 8 -------- arch/x86/include/asm/boot.h | 4 +--- 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index a47b6bae3356..fbd9720989e5 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt @@ -682,12 +682,11 @@ Protocol: 2.08+ of the protected-mode code to the payload. The payload may be compressed. The format of both the compressed and - uncompressed data should be determined using the standard magic - numbers. The currently supported compression formats are gzip - (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA - (magic number 5D 00), XZ (magic number FD 37), LZ4 (magic number - 02 21) and ZSTD (magic number 28 B5). The uncompressed payload is - currently always ELF (magic number 7F 45 4C 46). + uncompressed data should be determined using the standard magic numbers. + The currently supported compression formats are gzip (magic numbers 1F 8B + or 1F 9E), XZ (magic number FD 37), LZ4 (magic number 02 21) and ZSTD + (magic number 28 B5). The uncompressed payload is currently always ELF + (magic number 7F 45 4C 46). Field name: payload_length Type: read diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 203f7467f5c4..a47af31bbc62 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -158,10 +158,8 @@ config X86 select HAVE_IOREMAP_PROT select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64 select HAVE_IRQ_TIME_ACCOUNTING - select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZ4 - select HAVE_KERNEL_LZMA select HAVE_KERNEL_LZO select HAVE_KERNEL_XZ select HAVE_KERNEL_ZSTD diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 6d2a8d2d378d..763aeb850658 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -7,13 +7,13 @@ # vmlinuz is: # decompression code (*.o) # asm globals (piggy.S), including: -# vmlinux.bin.(gz|bz2|lzma|...) +# vmlinux.bin.(gz|zst|xz|...) # # vmlinux.bin is: # vmlinux stripped of debugging and comments # vmlinux.bin.all is: # vmlinux.bin + vmlinux.relocs -# vmlinux.bin.(gz|bz2|lzma|...) is: +# vmlinux.bin.(gz|zst|xz|...) is: # (see scripts/Makefile.lib size_append) # compressed vmlinux.bin.all + u32 size of vmlinux.bin.all @@ -23,7 +23,7 @@ OBJECT_FILES_NON_STANDARD := y # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. KCOV_INSTRUMENT := n -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ +targets := vmlinux vmlinux.bin vmlinux.bin.gz \ vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst KBUILD_CFLAGS := -m$(BITS) -O2 @@ -132,10 +132,6 @@ vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE $(call if_changed,gzip) -$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE - $(call if_changed,bzip2) -$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE - $(call if_changed,lzma) $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE $(call if_changed,xzkern) $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE @@ -146,8 +142,6 @@ $(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE $(call if_changed,zstd) suffix-$(CONFIG_KERNEL_GZIP) := gz -suffix-$(CONFIG_KERNEL_BZIP2) := bz2 -suffix-$(CONFIG_KERNEL_LZMA) := lzma suffix-$(CONFIG_KERNEL_XZ) := xz suffix-$(CONFIG_KERNEL_LZO) := lzo suffix-$(CONFIG_KERNEL_LZ4) := lz4 diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index b6c8921100fb..c0d75b74f199 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -57,14 +57,6 @@ static int lines, cols; #include "../../../../lib/decompress_inflate.c" #endif -#ifdef CONFIG_KERNEL_BZIP2 -#include "../../../../lib/decompress_bunzip2.c" -#endif - -#ifdef CONFIG_KERNEL_LZMA -#include "../../../../lib/decompress_unlzma.c" -#endif - #ifdef CONFIG_KERNEL_XZ #include "../../../../lib/decompress_unxz.c" #endif diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h index d6dd43d25d9f..afbf3d60f22e 100644 --- a/arch/x86/include/asm/boot.h +++ b/arch/x86/include/asm/boot.h @@ -24,9 +24,7 @@ # error "Invalid value for CONFIG_PHYSICAL_ALIGN" #endif -#if defined(CONFIG_KERNEL_BZIP2) -# define BOOT_HEAP_SIZE 0x400000 -#elif defined(CONFIG_KERNEL_ZSTD) +#if defined(CONFIG_KERNEL_ZSTD) # define BOOT_HEAP_SIZE 0x30000 #else # define BOOT_HEAP_SIZE 0x10000 -- 2.19.1