Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp822608ybv; Thu, 13 Feb 2020 10:08:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwT334gg+8lOebYfe38fq5L8HQcLm0c0N0DmZlI7nBHjZKXnE5AFsPN0Mh2q/vM9QWP0HXk X-Received: by 2002:a05:6808:18:: with SMTP id u24mr3871935oic.10.1581617328293; Thu, 13 Feb 2020 10:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581617328; cv=none; d=google.com; s=arc-20160816; b=YgEs5oVsJIpkzY2/dImTZDJOy/EveWAwWc8VOyJAZqhiVY1XZ46UR4Z5yBZFGubZmp vmJrnW4Khcw8zlV5X5WqLXIhnEr/ZwKgI8TAOCa6Bm74atpKC9dHfW1/6VanTNd3Lk/h Gc2GRR5EsqO6Moc7Ygs42ajaTkBK5DKxw/0Z6Mua4q6cSTSPKZ5UdRa2ckpAE7A16uOA V0Zm36Ta9mFO65iFaVxdVztWWS28FIFU9rj4eZk5Sr3846RboPFKSktl8NbPzLOOZQrO nn9zEG5mVZwua4UB7Rqns/kSitzgXyqc/7WdG33TB6hBgJTIOujHzSxV/xFxYtBe0ZIH bbaA== 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=PN67GZyn4NC+dNnRwSMa9dZjWdB7xiO1g8GGVaKDKdc=; b=YxE8VHDb8HnuevrCBWX0IVllLgr6BcUU6Tqnvy+Q8+/2eFRbOT4gA5sej6PD4dUOpQ YLKuCshadyi06YYIDIhC8ux39yTWhEW4vb1RQIeIFyNfJswKBGjpBtPqN+tjIvP7bHI8 r4zbpQtatuHW+LnUmfsPwusCbb6hUopoVpOqtabaRw+OeeayLIW3ZqoN2Lq5LaGapLKh rD7lCgdYXoOH6i6vgb0SzRScMF0+aVf8GBuJ1rDLNAzQLgTD9vFC2vXgIO+vBGnUKgiW Mlx8aB6Ab5APrnNALY7GMgaH/R2LNOvuElNd/q22suj91eHSj+YnBmbF92kwyEqxFpem tGVw== 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 t11si1478037oih.187.2020.02.13.10.08.35; Thu, 13 Feb 2020 10:08:48 -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 S1728116AbgBMSHC (ORCPT + 99 others); Thu, 13 Feb 2020 13:07:02 -0500 Received: from 2.mo4.mail-out.ovh.net ([46.105.72.36]:37976 "EHLO 2.mo4.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbgBMSHC (ORCPT ); Thu, 13 Feb 2020 13:07:02 -0500 Received: from player715.ha.ovh.net (unknown [10.110.171.125]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id CA302224801 for ; Thu, 13 Feb 2020 18:48:30 +0100 (CET) Received: from sk2.org (cre33-1_migr-88-122-126-116.fbx.proxad.net [88.122.126.116]) (Authenticated sender: steve@sk2.org) by player715.ha.ovh.net (Postfix) with ESMTPSA id 41F56F2A6677; Thu, 13 Feb 2020 17:48:25 +0000 (UTC) From: Stephen Kitt To: Jonathan Corbet , Mauro Carvalho Chehab , linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH 2/6] docs: merge debugging-modules.txt into sysctl/kernel.rst Date: Thu, 13 Feb 2020 18:46:57 +0100 Message-Id: <20200213174701.3200366-3-steve@sk2.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200213174701.3200366-1-steve@sk2.org> References: <20200213174701.3200366-1-steve@sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 10082996616245562757 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrieekgddutdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecukfhppedtrddtrddtrddtpdekkedruddvvddruddviedrudduieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejudehrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fits nicely in sysctl/kernel.rst, merge it (and rephrase it) instead of linking to it. Signed-off-by: Stephen Kitt --- Documentation/admin-guide/sysctl/kernel.rst | 16 ++++++++++++++- Documentation/debugging-modules.txt | 22 --------------------- 2 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 Documentation/debugging-modules.txt diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 1de8f0b199b1..1aacd7a24f5a 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -388,7 +388,21 @@ This flag controls the L2 cache of G3 processor boards. If modprobe ======== -See Documentation/debugging-modules.txt. +This gives the full path of the modprobe command which the kernel will +use to load modules. This can be used to debug module loading +requests: + +:: + + echo '#! /bin/sh' > /tmp/modprobe + echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe + echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe + chmod a+x /tmp/modprobe + echo /tmp/modprobe > /proc/sys/kernel/modprobe + +This only applies when the *kernel* is requesting that the module be +loaded; it won’t have any effect if the module is being loaded +explicitly using ``modprobe`` from userspace. modules_disabled diff --git a/Documentation/debugging-modules.txt b/Documentation/debugging-modules.txt deleted file mode 100644 index 172ad4aec493..000000000000 --- a/Documentation/debugging-modules.txt +++ /dev/null @@ -1,22 +0,0 @@ -Debugging Modules after 2.6.3 ------------------------------ - -In almost all distributions, the kernel asks for modules which don't -exist, such as "net-pf-10" or whatever. Changing "modprobe -q" to -"succeed" in this case is hacky and breaks some setups, and also we -want to know if it failed for the fallback code for old aliases in -fs/char_dev.c, for example. - -In the past a debugging message which would fill people's logs was -emitted. This debugging message has been removed. The correct way -of debugging module problems is something like this: - -echo '#! /bin/sh' > /tmp/modprobe -echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe -echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe -chmod a+x /tmp/modprobe -echo /tmp/modprobe > /proc/sys/kernel/modprobe - -Note that the above applies only when the *kernel* is requesting -that the module be loaded -- it won't have any effect if that module -is being loaded explicitly using "modprobe" from userspace. -- 2.24.1