Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5184302pxj; Wed, 26 May 2021 05:02:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXP8PpcYqdIfbsxxqQocY4dNiOZx+xe9yHhvU2gRFMnbTlFsPDsFoaJLWBTPsrprPsxl+x X-Received: by 2002:aa7:dc4a:: with SMTP id g10mr37562704edu.316.1622030541134; Wed, 26 May 2021 05:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622030541; cv=none; d=google.com; s=arc-20160816; b=Z8cs9xqWgD3Hvs917+eJ1OGverFgtIAGZzT5i7inrmy5X9H6J40WeKxBCq5H34LEAt 0c8I238OkMiCB/dCsnWjyOFUtX86Lt7DYelU9+NTxy2kHmPPk93I9D0X+Iu65KpYuXaU RZlbdHMYebob3XWRxn1FX7culW2XIRmc+cdVqQ3g+0x/aL3ZdN9whMI1/eP0RhXptIFn 1H+OiwdzKHffH5ZTeqwHnKtGVgeA0rl0cVDhrOEASszCuf2TpDvCrZYcW1G7ImsydlbB F46B5XsD7HfsDppsqZ81BWycCcGY0KkG5klHpQmzYkqR1RFoXfLJbbFM3qYCjNGRlTfo SRvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=FfaHo86msd1EgsJw0CluY8kQybsB/BEq62rqhKYqHGg=; b=hf+L+uRvT9knhzwDXxod9d5A40t2unWx58w8NgqRXS9mULCnqpPVLUJCPUNNJwgMbv QBtxkaPqJXsB96hKAgbr1a7B/RCl9L/CweC9+HLUrnM2z25n/Fs2Kk5/rdRS8Ge/1ub7 19VEpN5GzfwrLTNGzHnI8CfoVfdJjjbOd1g0k3K9tb7tyvq2K+HvevrAGMev0MGE/bto bKo8O4LH3MBDL5kBSUsF1/U2SmuiRoOXUAeO8j/MCZKjHhISyqvAwdDr2eFcWxTLeO+c 1szCCMkxXKZijGottEr46NsZfvGtXNKerLEgg6348UfgpOv7kBGL+JVZr8E7/zN+kmiO dWTw== ARC-Authentication-Results: i=1; mx.google.com; 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 g14si18086537edr.106.2021.05.26.05.01.54; Wed, 26 May 2021 05:02:21 -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; 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 S233383AbhEZJEz (ORCPT + 99 others); Wed, 26 May 2021 05:04:55 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:36800 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233165AbhEZJEo (ORCPT ); Wed, 26 May 2021 05:04:44 -0400 Received: by mail-pl1-f176.google.com with SMTP id a7so291999plh.3; Wed, 26 May 2021 02:03:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FfaHo86msd1EgsJw0CluY8kQybsB/BEq62rqhKYqHGg=; b=HE7d6v1gxGcHupBLogEwpNG56jVwVarfR4ICrIr+JrTI0a4vJth+fBAIK/IX54QE+6 725blKc+1U8uhAMZeA3rkSAISwzW5ekhzEmdAIHt5CN+Efniov49I1y8srj22a1SluDi fchU7jdaD28lilprVqZxqgK9Xp5sewGfDbR8bX+yk4faTLmDFFSgRbjAMTt2XJ+svk1A KKzJQSsBeZKAkdkkRjTcbqCezs2xuBjTvQyd6poSJHV9WUAObiy7/d6sCoDQpcZZiB6/ mEjyJ4fiDtAEEmgFGjAZaO+4bEPC9WG0HBVxFdl4HhuG7fMREPVxquCsO+lDv0c+CQq3 v6sw== X-Gm-Message-State: AOAM5311LoHKBv4BVLY2wuHnfGlTPdZnepCYZ/GrgSw6Zt52/6x0xwOz 34legj2I10zOIKWDgZ0EQiM= X-Received: by 2002:a17:902:bf46:b029:ee:b949:bd0 with SMTP id u6-20020a170902bf46b02900eeb9490bd0mr34888223pls.14.1622019792132; Wed, 26 May 2021 02:03:12 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id gg10sm13914062pjb.49.2021.05.26.02.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 02:03:11 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 27E3840254; Wed, 26 May 2021 09:03:10 +0000 (UTC) Date: Wed, 26 May 2021 09:03:10 +0000 From: Luis Chamberlain To: Menglong Dong Cc: Josh Triplett , "Eric W. Biederman" , 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 Subject: Re: [PATCH v2 2/3] init/do_cmounts.c: introduce 'user_root' for initramfs Message-ID: <20210526090310.GI4332@42.do-not-panic.com> References: <20210525141524.3995-1-dong.menglong@zte.com.cn> <20210525141524.3995-3-dong.menglong@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 04:33:00PM +0800, Menglong Dong wrote: > 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. I asked for the kconfig entry. And it would be good to document then also the worst case expected on boot for what this could do to you. I mean, we are opening a different evil universe. So that's why the kconfig exists. How bad and evil can this be? I don't think anyone has clarified that yet. Luis