Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752946AbcLIU4Y (ORCPT ); Fri, 9 Dec 2016 15:56:24 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:33511 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbcLIU4W (ORCPT ); Fri, 9 Dec 2016 15:56:22 -0500 MIME-Version: 1.0 In-Reply-To: <1481313824.3358.38.camel@suse.com> References: <20161208184801.1689-1-mcgrof@kernel.org> <20161208194930.2816-1-mcgrof@kernel.org> <1481313824.3358.38.camel@suse.com> From: Linus Torvalds Date: Fri, 9 Dec 2016 12:56:21 -0800 X-Google-Sender-Auth: BWEAJilEd4UFEba7UGdu-GPAi4o Message-ID: Subject: Re: [RFC 10/10] kmod: add a sanity check on module loading To: Martin Wilck Cc: "Luis R. Rodriguez" , shuah@kernel.org, Jessica Yu , Rusty Russell , "Eric W. Biederman" , Dmitry Torokhov , Arnaldo Carvalho de Melo , Jonathan Corbet , martin.wilck@suse.com, Michal Marek , Petr Mladek , Hannes Reinecke , rwright@hpe.com, Jeff Mahoney , David Sterba , fdmanana@suse.com, NeilBrown , Guenter Roeck , Goldwyn Rodrigues , subashab@codeaurora.org, Heinrich Schuchardt , Kees Cook , atomlin@redhat.com, mbenes@suse.cz, Paul McKenney , Dan Williams , Josh Poimboeuf , David Miller , Ingo Molnar , Andrew Morton , linux-kselftest@vger.kernel.org, "open list:DOCUMENTATION" , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 900 Lines: 22 On Fri, Dec 9, 2016 at 12:03 PM, Martin Wilck wrote: > On Thu, 2016-12-08 at 11:49 -0800, Luis R. Rodriguez wrote: >> >> Although this does get us in the business of keeping alias maps in >> kernel, the the work to support and maintain this is trivial. > > You've implemented a special treatment for request_module("fs-$X")in > finished_kmod_load(), but there are many more aliases defined (and > used) in the kernel. Do you plan to implement special code for "char- > major-$X", "crypto-$X", "binfmt-$X" etc. later? Yeah, no, that is just complete garbage. Those module aliases already exist in the module info section. We just don't parse the alias tags in the kernel. So the real fix is to make find_module_all() just do that. Doing random ad-hoc "let's prefix with 'fs-xyz'" games are completely unacceptable. That's just pure shit. Stop this idiocy. Linus