Message ID | 8244c75f-445e-b15b-9dbf-266e7ca666e2@landley.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp217562wrd; Tue, 21 Feb 2023 12:55:32 -0800 (PST) X-Google-Smtp-Source: AK7set/YekEiZJPaPmX2PEdCIUOHojMvc4+JsxFf8FafyOuEVJzeiz4REziO45IRXXQ4cesKameQ X-Received: by 2002:aa7:cc01:0:b0:4ac:bf55:7d69 with SMTP id q1-20020aa7cc01000000b004acbf557d69mr4665725edt.42.1677012932588; Tue, 21 Feb 2023 12:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677012932; cv=none; d=google.com; s=arc-20160816; b=m3UhsvomKBvtpVs1YJJpymcz+dtH9GGM0LmGUvBbHQXQFAnGzEMX6xSN56b6XOr277 5DHZ3ps5sXZ9/KXN5HL39GqdN49NSwf1nHvOugNP1uSZCOpufArAF0NXDBZMu0lqJBJ0 HJCAScoJwDbCnbf2vPIXGjDw4A2zYIV7UGW/5fIpNmqhfQT0kw6OaWt0t/UP0HqsOVVJ b0M753zykCYyoPvroJuV2dlgy9TV3bpSteVA8ov5m/WChb4LPvrsYSy9w4DEkEdj76J3 mJaRFt80Ixq8BxVAfwMvR1CLJgHiocZjgW8gBECFOWRugzu47al50NYJAhvGJdljTC4q wPEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc :references:to:from:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=r5B8CwFjIlduPhfUcOnrYrohsnN6UDiGn3WQOkB3REk=; b=FEWA0W2lh2EnqkChr3BqvP70KBc6p1fU4cz20H9yCQen0UGMmTuMI1Pp9kRQlg2iJ+ m7pj/Ikg2mDVn3XJkTP4F0cj0VS72pPExW23XuhZHlz1ZWmwNh1VSrtkZiK4zpZSGH68 NpUhbhp6L4S+EbVeVjojqmVTZf3bqcGhTI7h4WOUWUWzdL1RNfYHJgzmkjwXxTb8E/Uf A/oyg6YwZdD46+sMsARFiBQeAsQH1/BuJhBGCuKk2oNxlu5dlFSKsRRpLMfpK/uxYArB /XQnsqN5TKqoSKnN0rzs8chNn8/vWpa3rT+uMbKHmPrqp+yL6Xtl/o4t5cUjVsBR8kE8 zebw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20210112.gappssmtp.com header.s=20210112 header.b=O0mAq6G2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a056402069200b004acbe0c5f69si6299276edy.444.2023.02.21.12.55.09; Tue, 21 Feb 2023 12:55:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20210112.gappssmtp.com header.s=20210112 header.b=O0mAq6G2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbjBUUu4 (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Tue, 21 Feb 2023 15:50:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjBUUuz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Feb 2023 15:50:55 -0500 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 540DD2916A for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 12:50:54 -0800 (PST) Received: by mail-io1-xd29.google.com with SMTP id d11so2275113iow.0 for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 12:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:cc:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=r5B8CwFjIlduPhfUcOnrYrohsnN6UDiGn3WQOkB3REk=; b=O0mAq6G2PEH7QqEa6nGbO0AZSMLn66Jtoq9LYk+DsQzEEnKP7y6uVwtUpCGqYolxWJ poi4Vv3k6yc5cq1DkRK3QWZ2SBqPvdhAKD0O/6vWrCxbEISRjZeUOK4nnCEw9rvPPgdy 3jNwmMMvFkA1wXydNocr9NLTPRFlsDvscy9ivYfMSCjJxWUpZBG2T6ZTlEOGF+yrK4li ZHTWZDWd4OFaN32fn/AM2FOLMmSiqNiLE2LX+xL8Jfe0YUo3OVaUfbm80FcCObf++jcr cQGl6OkjzK2IJrpneoqRXsRxECKnmbv6RcpLvBztjnpf4xOZWlSb3rxjoxamS3nw/eW3 DHmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:cc:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r5B8CwFjIlduPhfUcOnrYrohsnN6UDiGn3WQOkB3REk=; b=diSWco5tyBnu6kYs0hVMSrsjxVIM83T/x2F4Oj52nSfa/BjtrYhVrJL4izkIGIwxx4 zonFMRjMiR4tvaqFz31NOeV3u6QBRvlIotckrP1rKVdlrcOCVYJhcD/QP1nuLHElGOE6 tTB7XFVeQGyceK9Mnk6ANNJCM0JP7oOvgBTaHGbdgwYwXsfABZRBMWtqtLo1XdNmlQ01 DjqayioNZ9WG5dXxbGiJfipb+MDrhS5KUJLYCU0AERbQqxrrVRKHAQ55otl/eEFYruoB 2IysME/nDgMZ9IfJmY5h4joyfkL8+BX+Q4JCYEBSa5/MD0T70SUzqyxJKT9uAfa3x68v yBZg== X-Gm-Message-State: AO0yUKX7iaSt7w3yONQN/LhSvs2VLMnHNDm5S4KJs8+1medIrAISZ38W 4hn0rZOe6vyWBCvqtjxZykMf7WkN/qC4Uqqm1VE= X-Received: by 2002:a5d:8184:0:b0:746:c45f:f151 with SMTP id u4-20020a5d8184000000b00746c45ff151mr9388380ion.3.1677012653497; Tue, 21 Feb 2023 12:50:53 -0800 (PST) Received: from [172.16.32.78] ([198.232.126.202]) by smtp.gmail.com with ESMTPSA id t17-20020a6b0911000000b00745a82f892bsm188888ioi.15.2023.02.21.12.50.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Feb 2023 12:50:53 -0800 (PST) Message-ID: <8244c75f-445e-b15b-9dbf-266e7ca666e2@landley.net> Date: Tue, 21 Feb 2023 15:04:15 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH 5/5] fix rootfstype=tmpfs Content-Language: en-US From: Rob Landley <rob@landley.net> To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> References: <b455394f-9faa-1f1a-f171-0b9d5e9ada35@landley.net> Cc: Andrew Morton <akpm@linux-foundation.org>, Wolfram Sang <wsa+renesas@sang-engineering.com> In-Reply-To: <b455394f-9faa-1f1a-f171-0b9d5e9ada35@landley.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,URI_DOTEDU autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758475512339090571?= X-GMAIL-MSGID: =?utf-8?q?1758475512339090571?= |
Series | Patches used to build mkroot. | |
Commit Message
Rob Landley
Feb. 21, 2023, 9:04 p.m. UTC
Wire up rootfstype=tmpfs to force rootfs to be tmpfs even when you specify root=
Initramfs automatically uses tmpfs (if available) when you DON'T specify a
root= fallback root to mount over initramfs, but some people can't NOT do
that for some reason (old bootloaders), so let rootfstype=tmpfs override it.
My original code tried to do this 10 years ago but got the test wrong,
and nobody's corrected it since, so here you go...
Signed-off-by: Rob Landley <rob@landley.net>
See https://lkml.iu.edu/hypermail/linux/kernel/2207.3/06939.html
---
init/do_mounts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 2/21/23 16:04, Rob Landley wrote: > Wire up rootfstype=tmpfs to force rootfs to be tmpfs even when you specify root= > > Initramfs automatically uses tmpfs (if available) when you DON'T specify a > root= fallback root to mount over initramfs, but some people can't NOT do > that for some reason (old bootloaders), so let rootfstype=tmpfs override it. > > My original code tried to do this 10 years ago but got the test wrong, > and nobody's corrected it since, so here you go... > > Signed-off-by: Rob Landley <rob@landley.net> I would like to be able to have this for some work with OpenBMC and ideally it would propagate to one of the recent kernels with a Fixes tag like this? Fixes: 6e19eded3684 ("initmpfs: use initramfs if rootfstype= or root= specified") Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com> > > See https://lkml.iu.edu/hypermail/linux/kernel/2207.3/06939.html > --- > init/do_mounts.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/init/do_mounts.c b/init/do_mounts.c > index 811e94daf0a8..01d80fb828fd 100644 > --- a/init/do_mounts.c > +++ b/init/do_mounts.c > @@ -665,7 +665,7 @@ struct file_system_type rootfs_fs_type = { > > void __init init_rootfs(void) > { > - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && > - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) > + if (IS_ENABLED(CONFIG_TMPFS) && (!root_fs_names ? !saved_root_name[0] : > + !!strstr(root_fs_names, "tmpfs"))) > is_tmpfs = true; > }
On 11/1/23 09:10, Stefan Berger wrote: > > > On 2/21/23 16:04, Rob Landley wrote: >> Wire up rootfstype=tmpfs to force rootfs to be tmpfs even when you >> specify root= >> >> Initramfs automatically uses tmpfs (if available) when you DON'T >> specify a >> root= fallback root to mount over initramfs, but some people can't NOT do can't NOT -> cannot >> that for some reason (old bootloaders), so let rootfstype=tmpfs >> override it. >> >> My original code tried to do this 10 years ago but got the test wrong, >> and nobody's corrected it since, so here you go... I think this sentence can be dropped. >> >> Signed-off-by: Rob Landley <rob@landley.net> > > I would like to be able to have this for some work with OpenBMC and > ideally it would propagate to one of the recent kernels with a Fixes tag > like this? > Can you repost this patch or should I do it? Regards, Stefan > Fixes: 6e19eded3684 ("initmpfs: use initramfs if rootfstype= or root= > specified") > > Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> > Tested-by: Stefan Berger <stefanb@linux.ibm.com> > >> >> See https://lkml.iu.edu/hypermail/linux/kernel/2207.3/06939.html >> --- >> init/do_mounts.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/init/do_mounts.c b/init/do_mounts.c >> index 811e94daf0a8..01d80fb828fd 100644 >> --- a/init/do_mounts.c >> +++ b/init/do_mounts.c >> @@ -665,7 +665,7 @@ struct file_system_type rootfs_fs_type = { >> void __init init_rootfs(void) >> { >> - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && >> - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) >> + if (IS_ENABLED(CONFIG_TMPFS) && (!root_fs_names ? >> !saved_root_name[0] : >> + !!strstr(root_fs_names, "tmpfs"))) >> is_tmpfs = true; >> }
On 11/8/23 16:05, Stefan Berger wrote: > On 11/1/23 09:10, Stefan Berger wrote: >> On 2/21/23 16:04, Rob Landley wrote: >>> Wire up rootfstype=tmpfs to force rootfs to be tmpfs even when you >>> specify root= >>> >>> Initramfs automatically uses tmpfs (if available) when you DON'T >>> specify a >>> root= fallback root to mount over initramfs, but some people can't NOT do > > can't NOT -> cannot The double negative was intentional for emphasis, hence the capitalization. They are unable to refrain from doing. "Could you just... not do that?" "No, I cannot not do that." But if you want to phrase it differently, go ahead. >>> that for some reason (old bootloaders), so let rootfstype=tmpfs >>> override it. >>> >>> My original code tried to do this 10 years ago but got the test wrong, >>> and nobody's corrected it since, so here you go... > > I think this sentence can be dropped. If you like. >>> >>> Signed-off-by: Rob Landley <rob@landley.net> >> >> I would like to be able to have this for some work with OpenBMC and >> ideally it would propagate to one of the recent kernels with a Fixes tag >> like this? > > Can you repost this patch or should I do it? They're more likely to listen to you. Rob
On 11/9/23 10:42, Rob Landley wrote: > On 11/8/23 16:05, Stefan Berger wrote: >> Can you repost this patch or should I do it? > > They're more likely to listen to you. P.S. I have a pile of local kernel patches (accidentally attached to the _previous_ message, but decided this part was not good to post to lkml) that I've despaired of upstream ever being interested in, and have "rebase/test them all on 6.6 kernel for the ~dozen architectures I track" (https://landley.net/bin/mkroot/latest/) as a local todo item I haven't gotten to yet. It's on the "list of things I feel guilty about not having done yet". Speaking of which: Hi Andrew! I'm sorry I didn't reply to your last email on the list (and instead just blogged about it, https://landley.net/notes-2023.html#24-02-2023 and blogged about feeling guilty about still having not replied on April 11 and June 25), but is I cc'd the people scripts/get_maintainer.pl said to, and if that's no longer enough I don't even _pretend_ to understand the process here anymore, but don't know how to say that without being political. Take this reposting thing: clearly you HAVE the patch. That's not the issue. And it's not a The-SCO-Lawsuit-scared-us-by: permission-to-use issue either, because I posted it to the list with all the paperwork filled out as best I know how, which I _think_ was recently acknowledged by the person multiple steps up the chain of the approval process. I'm _guessing_ the issue here is the need to refile the paperwork to officially restart a multi-step bureaucratic process, with nothing actually having changed since last time that I can tell. Possibly just put the expired form back in the inbox and let literally the same one go through again like a janky dollar bill scanner. I'm very bad at sticking the form in the slot and hoping someone will eventually see it, with the form getting lost vs being denied looking exactly the same for an indeterminate period of time. I travel to places in person and wait in long lines and show ID to get to talk to a human where possible. Linux-kernel hasn't really provided that option for quite a while. And I didn't want to say _that_ either. It seems impolite. You are full-time kernel developers, and I am not. I'm not here to criticize your process, I've just been unable to meaningfully participate in the impersonal bureaucracy it's become since... I think I gave up in 2017? https://lkml.org/lkml/2017/9/17/1 is still in my patch list. I'd happily drop it if upstream had fixed it a different way, but it's been 8 years. That "all bugs are shallow" open source code review stuff demonstrably stopped working for this project quite some time ago. Rob
On 11/9/23 10:46, Rob Landley wrote: > On 11/9/23 10:42, Rob Landley wrote: >> On 11/8/23 16:05, Stefan Berger wrote: >>> Can you repost this patch or should I do it? >> >> They're more likely to listen to you. > > P.S. I have a pile of local kernel patches (accidentally attached to the > _previous_ message, but decided this part was not good to post to lkml) Thank you, Thunderbird, for not actually updating the "to" list with changes you've made until you click away to give focus to a different GUI field, and clicking "send" does not count. Rob
diff --git a/init/do_mounts.c b/init/do_mounts.c index 811e94daf0a8..01d80fb828fd 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -665,7 +665,7 @@ struct file_system_type rootfs_fs_type = { void __init init_rootfs(void) { - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) + if (IS_ENABLED(CONFIG_TMPFS) && (!root_fs_names ? !saved_root_name[0] : + !!strstr(root_fs_names, "tmpfs"))) is_tmpfs = true; }