Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5052311pxj; Wed, 26 May 2021 01:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1Q768rkepehbchQ7cHFOqZcLySsbZ8CryVVTJLysaauEMipy+GaEgyzgMt6WTSyPbA55f X-Received: by 2002:aa7:d445:: with SMTP id q5mr37378082edr.330.1622017495358; Wed, 26 May 2021 01:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622017495; cv=none; d=google.com; s=arc-20160816; b=Hu5A9eXJSv9uisD1Dzw5ibL911lvbOjuQeUjQCbY/Ej567N9/J3An3VpfiTjI65kOH h2wTVDDJTe9H6lXcOWCcP9U9qwoD8BCP3JfjDnxkh31mvs8d96j1WoR0KXZQPGdlxV1t /c1VMrSpO4rY6FFkJdvaiA3+Ah7VvxFSU7cBr/3uW2hTI8gi1BGWawhHbiMUPQymaaei 3rmtt6mwOYRVs2TXcJRGA7tan/AFjNtIBx0QPV/Q/9f7fgO4cyLHx1pStTK7ruckblBX avXTAcasVKoOVm3M9zzCCDt3YyYi/jEGXLfxSZC2IFNe7WwwC+lBW7vSTcmaft4d4pj/ fQsQ== 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=MSqjrsXezTbDFWd100KELYDvThlsd4fIGxzsgNGx9R8=; b=BXmhCIkRTACuY0Ozmt4ZhbXxzS7CJ9J8aB/ONiAiPgrn3xwajGhKZvne0XtEbhwrFr ve1a6hzf1dvteDcF6qAiH0YWfzyqmj7oLV1yCqHU293hmzSgzXOib95sbxLcSkHx4H26 aw1EHXHkQANYut3qYicKrywnMVbxECahtgayR5ovGzEn5YoG7Zx2g0/FK2Ei2byzIv8Y w7+axbyVJjWt005P6ElxZXBPfFUAREVpau5W1BYatEGb+szpQBbhnx5e4cCYj0aoPEfc g9HGR0IMi0uAxe0zhdqo1Fc51XrYTMt+w0yiMk0RHpM8oOxjpjbiEXK5yKsB1PlSItWy I1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q5pLzgjn; 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 f16si19015962edy.298.2021.05.26.01.24.31; Wed, 26 May 2021 01:24:55 -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=q5pLzgjn; 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 S232019AbhEZIY6 (ORCPT + 99 others); Wed, 26 May 2021 04:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbhEZIY5 (ORCPT ); Wed, 26 May 2021 04:24:57 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B17FC061574; Wed, 26 May 2021 01:23:25 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id r5so1268774lfr.5; Wed, 26 May 2021 01:23:25 -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=MSqjrsXezTbDFWd100KELYDvThlsd4fIGxzsgNGx9R8=; b=q5pLzgjnYzl3rQMzEuaQagUz+19noKkkzD9vD42K/ABo2EwqCW7+ClqhVKixePFZu0 1ZWu69FB+xa/t3jBWUrbzjxVFGHxWC/OG4AmbLuROJkLWNIcIGEVQgu5pMcoL10E4z7b IuvXb48ob+Ipeu5hzFatZP7gRNMx5oAXJ+NrD8tiuLu7XCzogVKUquGPirJLtPv6ZBq0 zrTwNrpO8qCLhz8PwIm9RKIK9NX5LWDipZp+6g8eO8tCYpotiVYyr2Fpy4l3HKkVMmzi zLP5oeicelrDdb7g0pt4/mPMAQlXcCsEq19vddwmT+CPbLapcVUmnfXrkgJZGX3LdFvU 8NQQ== 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=MSqjrsXezTbDFWd100KELYDvThlsd4fIGxzsgNGx9R8=; b=L44Xop6DKVwxT/qAsIe/Krpl8FmQD1yHXcKUC7qgi5dfFIw4pleF9tZHsqUTfB+Ngl tTe0siS1YGu7vQ6kpdLnfcza4nkDeBcM8o6PwHuW6iKPXXcRLpid0cUBv/+vQYoFoWO8 VH7ZMBUac4wfwgka/AgfZBaZOQu0+EqylHzluT3Hf0rVsevIaEWCqtn5XJ8vGxDG/g++ /g8DPvgb82a3vKcLmqWjkoXr+3yxaUdP7ajmbsYoMS+SlJz8z6Rp8L0xOhPFDnXktVwi KUplApTAA3axt92ociSLUNxDkIp6ehrCCfGY7xP7gOQev6mFXn8mo+omthPYbldJHYJH T9XA== X-Gm-Message-State: AOAM530BA4hQmuWXJdEuYt5H6GJbNjbcvHO+2R9mzKQ8yiYwmlfhB8gK p2qCZJTmHaUt7Pz1OTzYT4DVGIrB2ynvUQw6oCo= X-Received: by 2002:a19:ad44:: with SMTP id s4mr1334728lfd.563.1622017403078; Wed, 26 May 2021 01:23:23 -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:23:10 +0800 Message-ID: Subject: Re: [PATCH v2 2/3] init/do_cmounts.c: introduce 'user_root' for initramfs To: "Eric W. Biederman" Cc: Luis Chamberlain , Josh Triplett , 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 11:23 AM Eric W. Biederman wrote: > > Menglong Dong writes: > [...] > > If we are going to do this something that is so small and clean it can > be done unconditionally always. > > I will see if I can dig in and look at little more. I think there is > a reason Al Viro and H. Peter Anvin implemeted initramfs this way. > Perhaps it was just a desire to make pivot_root unnecessary. I don't think they are meant to make it this way. Unpack cpio to the rootfs directly seems to be a normal operation. Maybe initramfs is just ignored by pivot_root(), as it seems not a common scene to run the whole system in RAM that time, I guess~ Thanks! Menglong Dong