Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1031484ybc; Sat, 23 Nov 2019 13:46:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyhON1dCKhWxPFCg+H3biWge9Dv+KWs6rDA6hX/S77Y91ekU6iHgGvru7s76CkCehOdoe/m X-Received: by 2002:aa7:c303:: with SMTP id l3mr8835852edq.89.1574545586891; Sat, 23 Nov 2019 13:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574545586; cv=none; d=google.com; s=arc-20160816; b=K1KB0sExUtTmUmhm9bZLLjed/eKHpN4IsUjRgCSnMPHwrDfjXfAWavmGhPtuioAqOr 4z9NJ10hov1QkxxP2eHYdCykE2SbiRX0upxCciUvjksWwJ53EcKmG8gg9ciH2qg3fK3B zfIKGsz4WEn7aRbGZlcOaTv+6QbRld03BB52jbeoU5Vfs6Kvqhsnq1qpWSd9EUzfwkoA gpZqZMNtnn7tusLYdJcqOVWtcm+Lo6ar5F+lfrftTiXobVDMazzCIZXOm1EM+Q2kJbIC +/HZcU+Mp3Kqq3jj2i6n0M3MdW2gp25DnAQn3XF+aQhdh6frGbH3Z9EOPO/zWu7btYbJ 0waQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=moLV8nIBuKPEOn4rga1JnaZprJYQ9aX5C5oLRVjtAxI=; b=FBoKp9W58cP0+2MOwmJvYWhKti36nv8zNuqC0+uq9SDDzQRF314xxr2R52l+T18brf oxKAL87MHQsN8dqsPCquYunW83UKBXwgxO9VlJJ9hEjIQUaW10pp2wn2HEArd3cBzWyd ek/1F+zH+03WbSmTdXC3moE5mGqz8pQziRMxGkt1Onj/qGXq2wBMwosWIF8/OK2VoMso LP+0RSScH3yYehW1tk5ctf3DMqNu0nUxivIewzrFcd7JknsGqRcBsVVSuRJCEoIP+zCM IQoOmQWTR5ahjYAG0BemwwXO7xi51Jn5GtZ5CaRFapcsDREhsOHRO2TrLsMIXpkVbY0i HkwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si1677697ede.328.2019.11.23.13.46.02; Sat, 23 Nov 2019 13:46:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbfKWVkm (ORCPT + 99 others); Sat, 23 Nov 2019 16:40:42 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35830 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbfKWVkm (ORCPT ); Sat, 23 Nov 2019 16:40:42 -0500 Received: by mail-qk1-f193.google.com with SMTP id v23so1609416qkg.2 for ; Sat, 23 Nov 2019 13:40:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=moLV8nIBuKPEOn4rga1JnaZprJYQ9aX5C5oLRVjtAxI=; b=HGVJfoRM/sVxR+FcELWom45qhJ1iobozJ7aUcghXpcn6St+pCCaIrNlSaExVW7ZlB4 zbS9OIDA9uZWwlMgf9M+hcvtxfp/HpjOHKivGXm0TMAar0M8AQzD+52FRnDzu+ic9diM OdkrJhD7we2tTdNEsWs93UCuhpdXJTFskKsAfX/fTyvYsrh0oqS0cDWWT9wr0RsIWsgq v2S5ffZWsuPVJgi9Iy900VUcZ7Qm33SaXDA4gnVrQ4Zal/RsEx2HeCfuoEICLpScpe+l vyoi2mBhEMT6aFdQOMgYuW6Bym7t3BL0z2XJIXm9gG/6HOS1C/7A81h2Gq2cc5eTiXiz L5ZQ== X-Gm-Message-State: APjAAAWhpf6sMNg9relkfvC3nd2q/nFH2i7dgFk6tIO3AfQXtvyiHVIP lsOnad2HjPrp120fZpun9QZr5SFu8Hw= X-Received: by 2002:ae9:e301:: with SMTP id v1mr9963630qkf.197.1574545241627; Sat, 23 Nov 2019 13:40:41 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id v189sm933208qkc.37.2019.11.23.13.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Nov 2019 13:40:40 -0800 (PST) From: Arvind Sankar To: Andrew Morton 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 Message-Id: <20191123214039.139275-2-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191123214039.139275-1-nivedita@alum.mit.edu> References: <20191123210808.107904-1-nivedita@alum.mit.edu> <20191123214039.139275-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Extend logging in `run_init_process` to also show the arguments and environment that we are passing to init. Signed-off-by: Arvind Sankar --- 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