Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1007424ybc; Sat, 23 Nov 2019 13:11:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyutPAaUxEDyDZ3t+g3ov+m6Q9FPnNgGUO3prQjh3WoAy5APxxzob6fLwZ0AStCq/8d//n5 X-Received: by 2002:a05:6402:70e:: with SMTP id w14mr8949466edx.95.1574543483804; Sat, 23 Nov 2019 13:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574543483; cv=none; d=google.com; s=arc-20160816; b=oaahCXz4Y+Jo18Z33fWY28vierqL+J60jLr4QRgLWihdH7BGf71X3A0SNnWM0CFdbk ZLlfLoJIw5oPMRdu1VbcT5tgIgT9YUNCoviELkb/HGXGXpNYblYmmlFrIE/eN4oGvAvs xfV7Tl3vr0yRvPnzckDbvNkqiyLSoGTbOMOCBuPTY/2XKBiz3Rn86hOHvstr0dPxQ8yN Ee6uW6ZOsLFTUKsLn0w0vseXk8VYH2Mx+0G9aCJD40wjgFUKX43VRJM11ep0Mg6Aczk/ HlKN/hZqj5vb3exDsk6Xsp/2jw3e0XrB8QPaR+5e8bsKO9hz7oS9RauJQhoVtgHHaRLQ AYaw== 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:to:from; bh=moLV8nIBuKPEOn4rga1JnaZprJYQ9aX5C5oLRVjtAxI=; b=aRAyhSr9fJJMaefNaaxqx8455McWPKf/F10MAFsWlIwQP+MQ/zuMUcKm+FgQllCIdj YA4QiKOR0FLB02eoAexxC0n38+43IyYTdQuVUr+cfCR20MN9LsZkaIeWdTnRCGXVNwMi Slw/5cI8l3t0hq8UnyknFTxwOeurfOLw34v0yOIn2jUyyGGZxTd/jf60y5JNqJlaFrcm G7Ddvwd0c1FpSdAJIX0wUeLPtyDTzYAj+Q5xTKTeAJIxdIv3g5EKrECNNCW/fVfBKcxu oIH7hk/rRUE8zrd8dESbhDQPJ4YefvgFqoM5K6CEjOfZQqXve26DQQeu+LFDKGP1Ku1P QXfQ== 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 i20si1442721edv.245.2019.11.23.13.10.29; Sat, 23 Nov 2019 13:11:23 -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 S1726820AbfKWVIU (ORCPT + 99 others); Sat, 23 Nov 2019 16:08:20 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38236 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726676AbfKWVIT (ORCPT ); Sat, 23 Nov 2019 16:08:19 -0500 Received: by mail-qk1-f193.google.com with SMTP id e2so9428900qkn.5 for ; Sat, 23 Nov 2019 13:08:19 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=moLV8nIBuKPEOn4rga1JnaZprJYQ9aX5C5oLRVjtAxI=; b=jiwtll2qYN29U1ADI2nzYRmeKbkre3GzvhzigqPAajeNZEr+CGpsXEpkW7/sUslR4H CYtBbXS8DvNZSI8LiD5ABzTVsGiT5GC35HJx25yNte57y0+TYrQSmIBkp3IIAQkierU0 RVdLRghgbhZYriOyHs4fUpQ4Mu72LeahdY7A6QnTNVNkEqQfi3LxLevKsL23R7iEPpXm VYg+3q15rtyRs/GXTQl76PTLOw2KMJ/O2ktzXvsVMnuuyW40e/P0psTlxLdMaAflEuo3 lzWXrHLr+oTeuyhEGWwW3OXkR5qPjAKgiaA7FDtEJqpXTaAHd10Pt2zoSQY7kDUDyT2y clZA== X-Gm-Message-State: APjAAAXZMluf7XbeVmDcHxH1ye8FVv+gsF0PtLXO5I0Sv4YUf/JGcrZ0 U1oZQqCQHBpW1te7wDmo6F/U/mPZxxM= X-Received: by 2002:a37:847:: with SMTP id 68mr8469125qki.366.1574543298884; Sat, 23 Nov 2019 13:08:18 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id c37sm1164978qta.56.2019.11.23.13.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Nov 2019 13:08:18 -0800 (PST) From: Arvind Sankar To: linux-kernel@vger.kernel.org, nivedita@alum.mit.edu Subject: [PATCH 1/3] init/main.c: log arguments and environment passed to init Date: Sat, 23 Nov 2019 16:08:06 -0500 Message-Id: <20191123210808.107904-2-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191123210808.107904-1-nivedita@alum.mit.edu> References: <20191123210808.107904-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