Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp105633pxa; Tue, 4 Aug 2020 00:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxggHMskQF6GaTPrBGgduaUUDiQH2PMc6jYY76CrJhvWjcQRM8AzHim6gvD1mF2TyNLwSc/ X-Received: by 2002:aa7:c513:: with SMTP id o19mr19253862edq.327.1596526017499; Tue, 04 Aug 2020 00:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596526017; cv=none; d=google.com; s=arc-20160816; b=Nqtg7IA8mcpH1GHPO1mPzPHW1/Z8BzL2SSGAqNYRBWP3mbnDW8EFpPF/UEWzrc7JRd 1Xzca5PFhIKiyQgZuBz/Cfnuq0QPBNwpTX9ge/fmCnj15SdF9xDohclZXjZP8fFVsU0J k0q+/YIBZPPY8xHU6/qOCqTY91eiX0w5P6S9IS0cp6bsmzAKDj9KPB5tJLQylyKvDFrF aP4vXXrrpnKQEeI68wv3K7OLkHoidwYMkA8BVYTOzeI2StSa7cGEOOK/dpiPfS5mcsJG P4MEnxxa+nEv0DxZVg247Bw06roFzK6I5T19gD5w6BKbWEDnQgydDh9FvrTlIpARc9hn 25jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=3G6duaqKS+iqVSYEuxdfn+liPqqsSiNQMWQkrp/rtcA=; b=HYHfJewd/fWoLq+rRogpRU9CIVelqm1nW32yTt/BH2NL4o/bJVW99e1Zs5ckEx0XSc 6Zj0JOoT35RL6F3BE6JQUcnWjy5ZlkU/h1rowicSHM49ELV9jJPEuXo70ounAjfu/fxB WmXNKTPuTedZomGNIfPZgS4bmIgZdJrVacwcNOJjA7SgyqyH11Uq9Fxc5UZ7uZJHxhI+ PDgkkv0jac5HcGBxV1jE4AjymtPmboGyS4VS4wL+9CI6ySmEnxfyNa9fbwXckfpzPb0u T91U7+AWNXGVce/NeqHj9Ctv9xUTcW8EGu7/a7E3xTOu+bvcOEf9aJmdI4v7H2NMlbQc wDMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P+oC1ONX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 89si12225144edq.575.2020.08.04.00.26.35; Tue, 04 Aug 2020 00:26:57 -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=pass header.i=@gmail.com header.s=20161025 header.b=P+oC1ONX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729887AbgHDHZg (ORCPT + 99 others); Tue, 4 Aug 2020 03:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbgHDHZf (ORCPT ); Tue, 4 Aug 2020 03:25:35 -0400 Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B14C06174A; Tue, 4 Aug 2020 00:25:35 -0700 (PDT) Received: by mail-oo1-xc41.google.com with SMTP id z11so1020042oon.5; Tue, 04 Aug 2020 00:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=3G6duaqKS+iqVSYEuxdfn+liPqqsSiNQMWQkrp/rtcA=; b=P+oC1ONX4KhsZvaMwr9JFGsSROK1t2WF8nWhL5Hb8WlbFKQcfjnffuj5cHtyDXhTQe RtZ2sbTg4+PrRlYLSiyDjOOOnYVQbPjoeqHiOnUxGAs/YqTy1MkqtHmAeXR537w3YEbf BhQ+AeypP5X7Qz2CxJPJ/VX/W8AYeiTh6dyQTbQRnC6MgKKSPMS1yzts1edOkNPNcsls BAeHs8BqCJsk0tMUbC525jtBsTJNnhrPSEfmKInyz42f2CGeNyYv/LoW9Df+k1R/3HEq PWtqACBeJGC1XbRWBkibV9geaauVi1aWrie/ld1nlJa4l3F3rN+y3HuDVw93r7k6LUTs j72Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=3G6duaqKS+iqVSYEuxdfn+liPqqsSiNQMWQkrp/rtcA=; b=k4ge71sBwNIZk6XAj4E7AGQStzc7S6aPI7xWbc9Td52HnE0t74pRCksaOojj7ZI2wq aqvpyuFXkmvtxiSHjp8vaLCY4FNhbp+7n4JLMiUxCIuv3RB+ea92R0FMMx9y8zRRkPpi TtvM9QAG/7lg7cAhZTyYYZKpVsjHCaljc+E/PhM4Fhil5GWtU1lYcWbofZCoIiBKjlK6 eTDBJ8BgUTU2vS89IRbpos5FCtwC8rFR9H2SZ2pQ7vI7kzbDlFcem4csqrF5xuiJlGXR mf9RUKJMB8GzfaqYC1rKGY8xgIweBmqqmA7HytiMRGV3HeBCiGTqWcuBub075UulDnrh rpWg== X-Gm-Message-State: AOAM530+U24lF/1Um5XmkLSX9KdOGoqgvx3jfQy45k4sDMRro0Sul0CI fXdZ2cGWp3suGgUWuHkcD6EqSlTgwfpu3iLFOkI= X-Received: by 2002:a4a:dfd4:: with SMTP id p20mr7546616ood.86.1596525934626; Tue, 04 Aug 2020 00:25:34 -0700 (PDT) MIME-Version: 1.0 References: <20200730190841.2071656-1-nickrterrell@gmail.com> <20200730190841.2071656-5-nickrterrell@gmail.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 4 Aug 2020 09:25:23 +0200 Message-ID: Subject: Re: [PATCH v10 4/8] usr: add support for zstd compressed initramfs To: Geert Uytterhoeven Cc: Nick Terrell , Borislav Petkov , Thomas Gleixner , Linux Kernel Mailing List , Chris Mason , linux-kbuild , "the arch/x86 maintainers" , Greg KH , Petr Malat , Kees Cook , Kernel Team , Adam Borowski , Patrick Williams , rmikey@fb.com, Ingo Molnar , Patrick Williams , Norbert Lange , Andrew Morton , Alex Xu , Masahiro Yamada , Nick Terrell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 4, 2020 at 8:52 AM Geert Uytterhoeven wrote: > > Hi Nick, > > On Thu, Jul 30, 2020 at 9:13 PM Nick Terrell wrote: > > From: Nick Terrell > > > > * Add support for a zstd compressed initramfs. > > * Add compression for compressing built-in initramfs with zstd. > > > > I have tested this patch by boot testing with buildroot and QEMU. > > Specifically, I booted the kernel with both a zstd and gzip compressed > > initramfs, both built into the kernel and separate. I ensured that the > > correct compression algorithm was used. I tested on arm, aarch64, i386, > > and x86_64. > > > > This patch has been tested in production on aarch64 and x86_64 devices. > > > > Additionally, I have performance measurements from internal use in > > production. On an aarch64 device we saw 19 second boot time improvement > > from switching from lzma to zstd (27 seconds to 8 seconds). On an x86_64 > > device we saw a 9 second boot time reduction from switching from xz to > > zstd. > > > > Reviewed-by: Kees Cook > > Tested-by: Sedat Dilek > > Signed-off-by: Nick Terrell > > Thanks for your patch, which is now commit a30d8a39f0571425 ("usr: Add > support for zstd compressed initramfs"). > > > --- a/usr/Kconfig > > +++ b/usr/Kconfig > > @@ -100,6 +100,15 @@ config RD_LZ4 > > Support loading of a LZ4 encoded initial ramdisk or cpio buffer > > If unsure, say N. > > > > +config RD_ZSTD > > + bool "Support initial ramdisk/ramfs compressed using ZSTD" > > + default y > > + depends on BLK_DEV_INITRD > > + select DECOMPRESS_ZSTD > > + help > > + Support loading of a ZSTD encoded initial ramdisk or cpio buffer. > > + If unsure, say N. > > I'm aware you copied this from the other entries, but IMHO "default y", > and "If unsure, say N" are not a good combination. > Hi Geert, you are right - for new stuff it should be "default n". What I am missing - still - is a note - that your user-space should have the correct bits to support zstd-initramfs. Unsure where to place such an information. If you send a patch for above feel free to add my: Reviewed-by: Sedat Dilek Thanks. Regards, - Sedat - [1] https://bugs.debian.org/955469 > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds