From: Arvind Sankar <nivedita@alum.mit.edu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 1/3] init/main.c: log arguments and environment passed to init
Date: Sat, 23 Nov 2019 16:40:37 -0500 [thread overview]
Message-ID: <20191123214039.139275-2-nivedita@alum.mit.edu> (raw)
In-Reply-To: <20191123214039.139275-1-nivedita@alum.mit.edu>
Extend logging in `run_init_process` to also show the arguments and
environment that we are passing to init.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
init/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/init/main.c b/init/main.c
index 91f6ebb30ef0..c92f0376b1bc 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1042,8 +1042,16 @@ static void __init do_pre_smp_initcalls(void)
static int run_init_process(const char *init_filename)
{
+ const char *const *p;
+
argv_init[0] = init_filename;
pr_info("Run %s as init process\n", init_filename);
+ pr_info(" with arguments:\n");
+ for (p = argv_init; *p; p++)
+ pr_info(" %s\n", *p);
+ pr_info(" with environment:\n");
+ for (p = envp_init; *p; p++)
+ pr_info(" %s\n", *p);
return do_execve(getname_kernel(init_filename),
(const char __user *const __user *)argv_init,
(const char __user *const __user *)envp_init);
--
2.23.0
next prev parent reply other threads:[~2019-11-23 21:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 21:08 [PATCH 0/3] init/main.c: minor cleanup/bugfix of envvar handling Arvind Sankar
2019-11-23 21:08 ` [PATCH 1/3] init/main.c: log arguments and environment passed to init Arvind Sankar
2019-11-23 21:08 ` [PATCH 2/3] init/main.c: remove unnecessary repair_env_string in do_initcall_level Arvind Sankar
2019-11-23 21:08 ` [PATCH 3/3] init/main.c: fix quoted value handling in unknown_bootoption Arvind Sankar
2019-11-23 21:20 ` [PATCH 0/3] init/main.c: minor cleanup/bugfix of envvar handling Randy Dunlap
2019-11-23 21:26 ` Arvind Sankar
2019-11-23 21:40 ` [PATCH RESEND " Arvind Sankar
2019-11-23 21:40 ` Arvind Sankar [this message]
2019-11-23 21:40 ` [PATCH RESEND 2/3] init/main.c: remove unnecessary repair_env_string in do_initcall_level Arvind Sankar
2019-11-23 21:40 ` [PATCH RESEND 3/3] init/main.c: fix quoted value handling in unknown_bootoption Arvind Sankar
2019-11-27 19:25 ` [PATCH RESEND 0/3] init/main.c: minor cleanup/bugfix of envvar handling Arvind Sankar
2019-12-12 18:00 ` [PATCH v2 " Arvind Sankar
2019-12-12 18:00 ` [PATCH v2 1/3] init/main.c: log arguments and environment passed to init Arvind Sankar
2019-12-12 18:00 ` [PATCH v2 2/3] init/main.c: remove unnecessary repair_env_string in do_initcall_level Arvind Sankar
2019-12-12 18:00 ` [PATCH v2 3/3] init/main.c: fix quoted value handling in unknown_bootoption Arvind Sankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191123214039.139275-2-nivedita@alum.mit.edu \
--to=nivedita@alum.mit.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).