Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1124718ybl; Thu, 12 Dec 2019 10:01:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyZECpvXimnXxF+0499KnIsugX/VASgzmsOLx9Sr7zbsw34hyOtB3gMJOvIvu01LNMJh9t+ X-Received: by 2002:aca:4712:: with SMTP id u18mr5828683oia.93.1576173678156; Thu, 12 Dec 2019 10:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576173678; cv=none; d=google.com; s=arc-20160816; b=smXNapR6t2cEmUU03u1G8CwllmaI5xcLWhbM8iXAFo3px9SyfdLe8TN0hlIDenP7sN kjeJkAZGLdK+KSrvRYHBc8u71FXPI8jRiKVfpYfO0Z7bkbRSPXIRkkDk5KqyWJDmBd98 HZlyNnB1HXlFqCE0/dAbc3lyRaXaGD9UV6ilUaZvbZURgGbJRYSe7C6XlsVpEJGfKN4t K+HZrc+Q1n9FQsYt4m5qP5QxXwxQBVDxU4/HvEazX6eqr+zKmFj1Dg0GP6Ho2jmtp14t h91Cn2rbIC9l2jU+w3Du+4lfBTBDILH7FlqHAZJbZKJhmr6JOwCWEhryJvX+DSnmdPlQ sVYg== 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=ge4HTdIewKvZfDm4331T+xQhrGpyDOZS/n3ZLfKIywA=; b=XeQYfCo2Ab0vqrhVjygvPBKep9Uv8YV59FCCtasXlq4ITumKEHqvyWZ1U9fzNqP/99 CHbxvrZe3cc2NpyzFm3jKxkdSmw7DMnFvp8hctKevb9yfZtSIFGXApvBIIq0vdtP1chw iqc0Nv+0KGH4tdPXziL8QPcSIvNUSpQXtoUZznJLuLF8CE0q9GGVGtIHfWRp7MhClXJf 1k4EK3/0EDopWTBRTz8gXSso7h3qHjkx3ih6RO3Vy5RqkltSSQuyrwzxsNo9NBktnD03 DFcm9y0kGjtsaNMhW+BN5/gI4tXv57NesIw8YyEaW3ax8+OdYcBo5VHGOAqbePZA56Sm iN6w== 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 w16si3610923oih.154.2019.12.12.10.01.04; Thu, 12 Dec 2019 10:01:18 -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 S1730305AbfLLSA1 (ORCPT + 99 others); Thu, 12 Dec 2019 13:00:27 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34906 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730023AbfLLSA0 (ORCPT ); Thu, 12 Dec 2019 13:00:26 -0500 Received: by mail-qk1-f195.google.com with SMTP id z76so2353099qka.2 for ; Thu, 12 Dec 2019 10:00:26 -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=ge4HTdIewKvZfDm4331T+xQhrGpyDOZS/n3ZLfKIywA=; b=KC5P0h+2fk1/eSjWzwX7P/e2cFa7Km833c0vixzvG3VDdVCtcfkNuIBcSuFOvKCjnE W7Gbrj+CfIC3Iqji+1HunJJsFZ1MApfAhUqegbJUojN9H93vLo2Jrj0/7QhoezwyrY0a 6+iNqWaOAPPaVdRrlTxSjfRR3/OVI0p0veoYszl3Wj5cR5ERV5sD6tUw93GdNf2UHKjo LN5B6+e5mcHzQjTkjOSFoah6XsTWFcdAzLF8ivwL66zkKdI4WqhW11T0CRpfPoDMXEOf OwJixdot/VGHbu+QkR5e45mN/XQS4PTwSVqswniOMoBuxU5oGL1sg/ojrbGAaN07Su4O gXfw== X-Gm-Message-State: APjAAAWL3hGRVUH4fFkNw1OeXzHoOCPgRtOgNzDyxHCb7oExupQHnceA BVmkX7GPMxb6TSX9nMpYH/0= X-Received: by 2002:a05:620a:218a:: with SMTP id g10mr9469536qka.351.1576173625487; Thu, 12 Dec 2019 10:00:25 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id j7sm1946037qkd.46.2019.12.12.10.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 10:00:24 -0800 (PST) From: Arvind Sankar To: Andrew Morton , Linus Torvalds Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] init/main.c: log arguments and environment passed to init Date: Thu, 12 Dec 2019 13:00:21 -0500 Message-Id: <20191212180023.24339-2-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191212180023.24339-1-nivedita@alum.mit.edu> References: <20191123214039.139275-1-nivedita@alum.mit.edu> <20191212180023.24339-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..4ebf4346a44c 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_debug(" with arguments:\n"); + for (p = argv_init; *p; p++) + pr_debug(" %s\n", *p); + pr_debug(" with environment:\n"); + for (p = envp_init; *p; p++) + pr_debug(" %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