Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5057778pxj; Wed, 26 May 2021 01:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn0Sl6e9LDV1qABmTonCr9f3Em+9lXaFoBule4/fNNlJFZKUD1EwCHkNWAGRj/GUK4Im/8 X-Received: by 2002:aa7:da0e:: with SMTP id r14mr35896749eds.119.1622018100858; Wed, 26 May 2021 01:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622018100; cv=none; d=google.com; s=arc-20160816; b=zQ1zT+VMQOHUDKNVLQBWE0D50TCzmk3lrKm1wWbq9ZM2mjjpkDdcCBjg74RbBNj0lQ y9c2nEwCuSSOOko9eCuQ45Nw2/rjw3cU+IkAJp1rpXu1IN/jmX3VLpLRlqMKRkLZCNHS fkWwySN07nmb65NrzHos/0XDvKbdNJ0ChhrzjOB+N9OA+Z/iv/E+wkiwGqVBTgNxF24j uq4K8rz7aaHUbAgZwi72zEpwVzG+Xut8K8p3T6/FminwI4k4Le5+ylIUCg3gdA9YRKVl hXSPedV595tI7oNmr75L3B9Q8eD5F+erSMwoMk88pBW0ySL9D403166ibH6uIYWSplHK JTTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RIDZ06jndbCoInmR0ANM92ad6K9XlyXkeP1SRnmZcmc=; b=JKkbSRodndltTXkEYV1xe0Mt2Ya3DW00tzUuX2xGMQlLP0kErBp1ZQU8GAmHPsYFkk R5ueLcNLmVAiLqrlYeJiL75R2LO9JYLZFjg5rLd1bDyVyxsUYPychmXVRJxkSrL1t//s 8pOz6R3g4Oso94Sj0kVN2nqrzK0ax00ttaON4fDK+z3N+WZpkUeG+J9cMaoTCxz1FJDK AEdym2n2gcScTKoqeYcCQ/e0bwwh8+qs6/AIhmNccgo7EZT/p469ENcU7/8TR8BKCzBg /mtIu/oxOxFIZM34fnEuWuanFATYgmlwZHJz/TKa88a2HKrQWrS0BA5H1UYTbT7wm6gg q3hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oBl3rccG; 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 i14si21261306eje.519.2021.05.26.01.34.37; Wed, 26 May 2021 01:35:00 -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=oBl3rccG; 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 S232097AbhEZIer (ORCPT + 99 others); Wed, 26 May 2021 04:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231982AbhEZIeq (ORCPT ); Wed, 26 May 2021 04:34:46 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AFCEC061574; Wed, 26 May 2021 01:33:14 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id e2so563621ljk.4; Wed, 26 May 2021 01:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RIDZ06jndbCoInmR0ANM92ad6K9XlyXkeP1SRnmZcmc=; b=oBl3rccG9MRxe9Y2RMnwifVlE7e965esj7+OeoKb4ak7uHSjLuBUquJIK8FpygeQQX nLMu8a4BEtIsURdDzThku8WxA1K11y3H4cXP0OBA6UXxhcJfj/VZHLfNtE/ultIbWc6Y 2Y9pnRBtpit+AtiNpcbpI/Awhtd0NH//0/FyJa+wIHQIoAbEOBd7X+YUpzi87f6CQQWz wwZvNI/ah20BSau+sQzjIgyrNBtRd4bJpurLXv7uoIQq6lqt0uoEYzAAHQyT1OjjPF3X tutl2pEAaLJ3wlLsyHOiFggXHlhPSV6l78oH46L57GN450dgK1oH9Wa4IY2avPgYoKzw j10A== 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:from:date :message-id:subject:to:cc; bh=RIDZ06jndbCoInmR0ANM92ad6K9XlyXkeP1SRnmZcmc=; b=VRJXGyGxE31DObt9fyggL+5deSvMUYUNHoBw4mmQ8joYaRctkvz/MYXLUAWJMlfFsV b54X4HrEgM7SHrQx7CBt9Si9fnbSQTgWBK53uZqzULMUuTfuey6LXGSB+nd0jemr1NiU fLvaPEFNyab7e//WURjMQxnJzrPmqJRdAq9hLJaZnmVkn1K88Ap/EkuiVuFH8Ot2GAtd i0eAuYDF8OGguIr8UBaMRdr79CEz7zju+oebEByrB6ECqhCPO/RY2HKWAoamJYqHvaYI XMg7MRe/iJzJlV+WWM1uPa3iWDVKGEOZCCDppBsygNApoWIDM3bwd5Uy5Mwd0jKVym/E a0sQ== X-Gm-Message-State: AOAM533tSawriDd39RqR1AekmHfZ6WiAWtRh9zU5FZwsPaYgJg72SMhI TWCX8wS/9rwt9BgGCBVrpzDww/63JtDnpGs8edI= X-Received: by 2002:a2e:7a06:: with SMTP id v6mr1327638ljc.219.1622017992692; Wed, 26 May 2021 01:33:12 -0700 (PDT) MIME-Version: 1.0 References: <20210525141524.3995-1-dong.menglong@zte.com.cn> <20210525141524.3995-3-dong.menglong@zte.com.cn> In-Reply-To: From: Menglong Dong Date: Wed, 26 May 2021 16:33:00 +0800 Message-ID: Subject: Re: [PATCH v2 2/3] init/do_cmounts.c: introduce 'user_root' for initramfs To: Josh Triplett Cc: "Eric W. Biederman" , Luis Chamberlain , Alexander Viro , Kees Cook , Sami Tolvanen , ojeda@kernel.org, johan@kernel.org, Bjorn Helgaas , masahiroy@kernel.org, Menglong Dong , joe@perches.com, Jens Axboe , hare@suse.de, Jan Kara , tj@kernel.org, gregkh@linuxfoundation.org, song@kernel.org, NeilBrown , Andrew Morton , f.fainelli@gmail.com, arnd@arndb.de, Rasmus Villemoes , wangkefeng.wang@huawei.com, Barret Rhoden , mhiramat@kernel.org, Steven Rostedt , vbabka@suse.cz, Alexander Potapenko , pmladek@suse.com, Chris Down , jojing64@gmail.com, terrelln@fb.com, geert@linux-m68k.org, mingo@kernel.org, linux-fsdevel@vger.kernel.org, LKML , jeyu@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 12:33 PM Josh Triplett wrote: > > On Tue, May 25, 2021 at 10:23:09PM -0500, Eric W. Biederman wrote: > > If we are going to do this something that is so small and clean it can > > be done unconditionally always. > [...] > > The net request as I understand it: Make the filesystem the initramfs > > lives in be an ordinary filesystem so it can just be used as the systems > > primary filesystem. > > Including the ability to pivot_root it away, which seems like the main > sticking point. > > If this can be done without any overhead, that seems fine, but if this > involves mounting an extra filesystem, that may add an appreciable > amount of boot time for systems trying to boot in milliseconds. (Such > systems would not use an initramfs if they're going to go on and boot a > separate root filesystem, but they can use an initramfs as their *only* > filesystem.) Compared to the time the unpacking spent, a mounting seems nothing. In the scene above, this change can be disabled by kconfig, if pivot_root is not needed in initramfs. Thanks! Menglong Dong