Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2137039ybh; Fri, 24 Jul 2020 05:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhfejIIUpIfasPDOvF0zgOCfAOg3BjvjBToL89ISKkZH9l2KOUVbXehtSVBIjL8gmwmTS/ X-Received: by 2002:a50:cdd8:: with SMTP id h24mr5766756edj.241.1595593658026; Fri, 24 Jul 2020 05:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595593658; cv=none; d=google.com; s=arc-20160816; b=HS2xK8N8k5Fe5ZzaiRpNi1xjQ7s71H5phvb2YxIklWVYQClqILIcwggTLvQnkJI9bD l6QEcpXW59udwTQ7KOdbBkZwP5/uSGu42wkWDCVcNcDhFvt/Su3JaiY3ah9TWs7A+EZ4 94DvtmXYDMFKedkGKbUsFWg7vbyc3Nq8PmoKJm+7e7O11finkj6iu4EaShCA/WZ6Diw+ vIvizM/HWLOqHVVRsqkbo1ouw17wBmOyMA1EeAN15oDuhPQFBwm6VsRv0DhsjqspnpUL tqAyMrEd4gGb6qXq/AYoMnK+S/LfpBE3p5Z3Uv45vWycDfeIleUUkSf93gTie2BU6UF8 lA9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Gy1q05EbLC446DJAoDUBvWjQth0m12qcMrvkxBoMzzE=; b=0wZAxF6QyP+9edyIFEXDc2jpFVI6Vg6JBZongyMQFuvdRx/UJaOo48YfuLL+zeaxG1 37uRmmU2qfyiDjdPSJVmc9KIFKhzsrjAddtR82YJmmPIkFe3DAShGkrzHze91hyXBkAx 3XitRpxCyIyFlWn98OmofDHNRG+RCzgggaTrxMM6eI0NtntYDq6/uxw3/lJSuG+c5zRU nEnTnA084vbBjb9H4gIEKDgjziKSAhTMrT8caiQXvu6E1cfovMRFLmgrksidpsYQFDyf T6a+rUk4jZZtlyhDhzxMSd8dFjgP5Jj0x8ccEz7eQY3i7yuByeWj+sUwKBhHvoBM8DHp UbOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DeSavU28; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si463254eju.554.2020.07.24.05.27.14; Fri, 24 Jul 2020 05:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DeSavU28; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbgGXM0q (ORCPT + 99 others); Fri, 24 Jul 2020 08:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbgGXM0p (ORCPT ); Fri, 24 Jul 2020 08:26:45 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40C82C0619D3; Fri, 24 Jul 2020 05:26:45 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id c2so1056071edx.8; Fri, 24 Jul 2020 05:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Gy1q05EbLC446DJAoDUBvWjQth0m12qcMrvkxBoMzzE=; b=DeSavU288Owa8gjV9JzGVfV+pHp/XKG/rc9xVt09J3oTuSG7P1wJ9RKHjIiMF3IU7H 84YkMCKQEh7zD2bdrjw66r8nSHxZwlVQUTwx/ePG3NvutdKjsoBEBye6WjJ1zqRxlgvS 3G1JTLV7DbbeoKz7CAXPoKxIPM/RWgbAzpcTlBgWgC/JtZJTqPTFP4UORb0hqzgGVhx1 1m55ep3AzBvH9KsLCRxNg7g3jv6n4UT3WQ83Fx95eQPcJXGnyJ8VkxCOqJH8Rw7AFiqw R6BvfBmXvvZYLC9xla63QWaFHdyr6omjesnLtUhW3/tN0vWjVAKIevU6UaSBEUzBVxS/ vXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=Gy1q05EbLC446DJAoDUBvWjQth0m12qcMrvkxBoMzzE=; b=g912yXbwD10Q/N4XWao5Ahn+R2gA7ayElCtMyBwbaELMBercmCc4RHSo84kommv39O yDE3vl77dfxyBKGKpR2eFKVkXEyZKg9bSgDUFqsIVpn5QuiFR/MJi6zU8ZE69xjuSAR4 kz4UGEfLhFSWaYv7030YD0kE4gEzL/lxHvxtdyRuq3eGLZt/guDyM5DmAZWbwQxS7wM7 bxZQVN8sKqHzmYlyXOli+bH6KLGYH5R9IiBd0DiBf/kWQy2VuiAWEwkSb+wjVecqkaIc WzCCbvJD/SjToF348GYS/yzjWWyCT8MZb/i2JE+Z4r7waKNso2B50drHuOYI2g4pH0HA 9Ifw== X-Gm-Message-State: AOAM533nt8wKwrVx3950c0HxbqLZ8Z1hmHl7z6Scw1luEfDc+ySxpZbc 96e+sSGZWi1knQ+ChFl3CmM= X-Received: by 2002:a50:e1cc:: with SMTP id m12mr971177edl.378.1595593603913; Fri, 24 Jul 2020 05:26:43 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id bs18sm633777edb.38.2020.07.24.05.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:26:43 -0700 (PDT) Date: Fri, 24 Jul 2020 14:26:40 +0200 From: Ingo Molnar To: Nick Terrell Cc: Borislav Petkov , Thomas Gleixner , linux-kernel@vger.kernel.org, Chris Mason , linux-kbuild@vger.kernel.org, x86@kernel.org, gregkh@linuxfoundation.org, Petr Malat , Kees Cook , Kernel Team , Adam Borowski , Patrick Williams , rmikey@fb.com, Patrick Williams , Sedat Dilek , Norbert Lange , Andrew Morton , Alex Xu , Arvind Sankar , Nick Terrell Subject: Re: [PATCH v8 6/7] x86: Add support for ZSTD compressed kernel Message-ID: <20200724122640.GC632343@gmail.com> References: <20200723192801.351114-1-nickrterrell@gmail.com> <20200723192801.351114-7-nickrterrell@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200723192801.351114-7-nickrterrell@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Nick Terrell 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? Thanks, Ingo