lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 27 Jul 2020 22:43:54 +0000 From: Nick Terrell <terrelln@...com> To: Ingo Molnar <mingo@...nel.org> CC: Nick Terrell <nickrterrell@...il.com>, Borislav Petkov <bp@...en8.de>, Thomas Gleixner <tglx@...utronix.de>, linux-kernel <linux-kernel@...r.kernel.org>, Chris Mason <clm@...com>, "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>, "x86@...nel.org" <x86@...nel.org>, "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>, Petr Malat <oss@...at.biz>, Kees Cook <keescook@...omium.org>, Kernel Team <Kernel-team@...com>, Adam Borowski <kilobyte@...band.pl>, Patrick Williams <patrickw3@...com>, "Michael van der Westhuizen" <rmikey@...com>, Patrick Williams <patrick@...cx.xyz>, Sedat Dilek <sedat.dilek@...il.com>, Norbert Lange <nolange79@...il.com>, Andrew Morton <akpm@...ux-foundation.org>, Alex Xu <alex_y_xu@...oo.ca>, Arvind Sankar <nivedita@...m.mit.edu> Subject: Re: [PATCH v8 6/7] x86: Add support for ZSTD compressed kernel > On Jul 24, 2020, at 5:26 AM, Ingo Molnar <mingo@...nel.org> wrote: > > > * Nick Terrell <nickrterrell@...il.com> wrote: > >> --- a/arch/x86/boot/compressed/misc.c >> +++ b/arch/x86/boot/compressed/misc.c >> @@ -12,6 +12,11 @@ >> * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 >> */ >> >> +/* decompressors bring in EXPORT_SYMBOL which is meaningless and will >> + * cause compiler errors in some cases. >> + */ >> +#define __DISABLE_EXPORTS >> + >> #include "misc.h" >> #include "error.h" >> #include "pgtable.h" >> @@ -77,6 +82,10 @@ static int lines, cols; >> #ifdef CONFIG_KERNEL_LZ4 >> #include "../../../../lib/decompress_unlz4.c" >> #endif >> + >> +#ifdef CONFIG_KERNEL_ZSTD >> +#include "../../../../lib/decompress_unzstd.c" >> +#endif >> /* >> * NOTE: When adding a new decompressor, please update the analysis in >> * ../header.S. >> diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h >> index 680c320363db..d6dd43d25d9f 100644 >> --- a/arch/x86/include/asm/boot.h >> +++ b/arch/x86/include/asm/boot.h >> @@ -24,9 +24,11 @@ >> # error "Invalid value for CONFIG_PHYSICAL_ALIGN" >> #endif >> >> -#ifdef CONFIG_KERNEL_BZIP2 >> +#if defined(CONFIG_KERNEL_BZIP2) >> # define BOOT_HEAP_SIZE 0x400000 >> -#else /* !CONFIG_KERNEL_BZIP2 */ >> +#elif defined(CONFIG_KERNEL_ZSTD) >> +# define BOOT_HEAP_SIZE 0x30000 >> +#else >> # define BOOT_HEAP_SIZE 0x10000 >> #endif > > So the other patches explain why the decompression buffer extra space > was increased from 64k to 128k, but is there a similar > calculation/estimate for bumping BOOT_HEAD_SIZE from 64k to 192k? > > Admittedly the BZ2 exception doesn't set a good example, but maybe we > can do this for ZSTD? Yup, the next version will include an explanation. Thanks for the review!
Powered by blists - more mailing lists