Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1149861ybh; Sat, 14 Mar 2020 19:25:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv0SNd9mmjzx5pLZNFWQYGvMSQEUZvufvhctcC/NWC15uEMz3XxQ0GIi+6SkkP0zQ1d3gtS X-Received: by 2002:aca:dc45:: with SMTP id t66mr12982094oig.39.1584239137630; Sat, 14 Mar 2020 19:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584239137; cv=none; d=google.com; s=arc-20160816; b=sV7TED0DE/kohMFtRtPUDGjgP2ltT8q2hYqz3Qy1cx8VM+A+4caN42dBwIGq+hOGtN FgCKzJyZ+Dz5X4RISko85ZT6TmjDsSjnj8lAhXKuLoLj1gkSLB3PKLHcypKHEoL8H8DS R/T34OCKLBVJ1Bk8KGWe85Kb+ivqAQuZ7aVzDeP/CYVveFj4/cDXSj0bcGy7rjKdO9MV sFQNPpeumI1zjTTBSZd+Zm3hHSgZ9ztCOERm30avdTaMnfo/K/Un4bV5AnLNGgy751kz odyGL3/z5w2y1RamfjSZk85eB6RewSHVud/rkZlg5tG8QiojuLMpbTQILXhjvpcl8B2F 9JgQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=vBniRPYkZBtRSHP9cuCQP0tXPIOpf0Ty5nz+haacoXo=; b=k4SApchL4aDlZuwfvdZg9kOHNXOti87IAbcFVfmQzEAMOCUx3cu86wfg8lJm7p7hgK XSqpiGjfwzMlbUAjxx7DewpRULAVIZq9CYqStaLGMhFO4PxyV83kxfk/7ZcqfdDu3vft do9MXO7lUIJkUcBRRbVPrN/H7ZnnKFgBP+pMJ5Zsyy7DiEBr7s8wqMT1sE1bwaWAPyMl CQRxwH+gTufkMrJUpZ1dY8uUzsh+GYBdL9QI3UfO0hC9fv2SCtXHMOKB8QGUa+Y+9tMV lRN2YZqEXSBsZQNfLLM07LTi5WW4Fw99S+82s8S6w2fDG0dvvxfoKUOkR7jExhmHv/yy TWUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TVfzwx5w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si6686429oiv.13.2020.03.14.19.25.25; Sat, 14 Mar 2020 19:25:37 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=TVfzwx5w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbgCOCYn (ORCPT + 99 others); Sat, 14 Mar 2020 22:24:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:39096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727946AbgCOCYO (ORCPT ); Sat, 14 Mar 2020 22:24:14 -0400 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38CC1207BC; Sat, 14 Mar 2020 21:36:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584221807; bh=60nbem/GmL/SUs8mZbdKlCVVcvFz4J/mVsG+CUpqtqw=; h=From:To:Cc:Subject:Date:From; b=TVfzwx5wGzNDXZmVFW2Cinfzx7abf6RhRsO9DAr9vVHuFRN+U+/h/UFYha86eGb0v seqEwqcZK8WDOMcDt4e2NsZfPnPBYkXIvX0m/Awvoun/hnLHa1x6ba1FVA393CNSnD EEVMItDFS5h9sgvMKori0VyPy99z3XX0RAHLVC9g= From: Eric Biggers To: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, Alexei Starovoitov , Andrew Morton , Greg Kroah-Hartman , Jeff Vander Stoep , Jessica Yu , Kees Cook , Luis Chamberlain , NeilBrown Subject: [PATCH v3 0/5] module autoloading fixes and cleanups Date: Sat, 14 Mar 2020 14:34:21 -0700 Message-Id: <20200314213426.134866-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.25.1 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 This series fixes a bug where request_module() was reporting success to kernel code when module autoloading had been completely disabled via 'echo > /proc/sys/kernel/modprobe'. It also addresses the issues raised on the original thread (https://lkml.kernel.org/lkml/20200310223731.126894-1-ebiggers@kernel.org/T/#u) by documenting the modprobe sysctl, adding a self-test for the empty path case, and downgrading a user-reachable WARN_ONCE(). Changed since v2: - Adjusted the new documentation to avoid implicitly bringing up module aliases, which are a more complex topic. - Split the selftest patch into two patches, one to fix the test numbering bug and one to add the new tests. Changed since v1: - Added patches to address the other issues raised on the thread. Eric Biggers (5): kmod: make request_module() return an error when autoloading is disabled fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once() docs: admin-guide: document the kernel.modprobe sysctl selftests: kmod: fix handling test numbers above 9 selftests: kmod: test disabling module autoloading Documentation/admin-guide/sysctl/kernel.rst | 25 +++++++++++- fs/filesystems.c | 4 +- kernel/kmod.c | 4 +- tools/testing/selftests/kmod/kmod.sh | 43 +++++++++++++++++++-- 4 files changed, 68 insertions(+), 8 deletions(-) -- 2.25.1