From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 277A9C32750 for ; Tue, 13 Aug 2019 20:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F04A42067D for ; Tue, 13 Aug 2019 20:16:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="u5tsb3tT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbfHMUQ0 (ORCPT ); Tue, 13 Aug 2019 16:16:26 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:44017 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbfHMUQV (ORCPT ); Tue, 13 Aug 2019 16:16:21 -0400 Received: by mail-ot1-f66.google.com with SMTP id e12so32792285otp.10 for ; Tue, 13 Aug 2019 13:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UyUp+OqYNvHr6I8YI09IZ2rFvtcmnaGq+Mw13M6jPN8=; b=u5tsb3tTi1RR6zNjTfgZWL+OogXrZrPnWysy+aD045WOTKrJEAOdQ+FoeVDVShnWk8 IUxR3CHP9QJCeKRIEu5zkDXbg533UBtKeFFvrT8aMs0H8udcayRxrdT1wNT0Q7DjM+sS mL7ptgRQR3Kx12kZaazSW3SAHUtuo7vVw4TkoT1AK64nHSlBLuaf+7EcyAJ5T6S5QZmR 0bWGzUszfX/bI6keMRxfU+uUjHdXdUU/QzjKrIiA2xQ6qfej0kl/VN72xIxD8Mf/EjLz uehsPbPSUzPQEmNN3NMCxmwK4vIeJV4HWNcOe7l2n4qpKPfucbJ/Yfslg6NugGmdwR+m R1aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UyUp+OqYNvHr6I8YI09IZ2rFvtcmnaGq+Mw13M6jPN8=; b=eg4SnKRLqujsdoMsqC+ZUADoRxp9jhHekTP5Yxxw4Qq+RmK4lI/NL27b91wPG9GZ2t gWlUqEzjstMcgHmnlmb9ctfOfMvtPJWmwOrVNTHvs76KGniIjQXNDc9Kl/77I3TVmDZu dYTb0lIlgyLjXPxd0Wx8LbHv/UkZsNELDkCdtMuRjxVwlICfhVf7vosP5uFDU/8ia7iT 0xxa3sMXA4t/dmHb/rXO+c2pN9hKgPmvu//f4eNYbirmy04aroFqL7M6Ib9EzwDvbkq7 JzDobndnKrll7N+/KcQpw5/mDrhn0Uv5aFipapfQxLPDwbef0AzHE05/PWRqYaZWK6id cjZg== X-Gm-Message-State: APjAAAVv2WuthnhnCit0ivSgpKhpRXn7lQVLGYRFjLf3ki5q5p1lID4H /jncaF0kHkK60FG8f7pgO6DpuD+PhMRaLbjD3gKHfg== X-Google-Smtp-Source: APXvYqxxUtipoa1TnsBRCdHhtVbEni2JlDRwTgOYshKzIg8CEAX1O3Wj3b+RVL1fyBLVuGOUQHsFmCMdCl21V4krJY8= X-Received: by 2002:a9d:6d06:: with SMTP id o6mr33264410otp.225.1565727380422; Tue, 13 Aug 2019 13:16:20 -0700 (PDT) MIME-Version: 1.0 References: <20180716122125.175792-1-maco@android.com> <20190813121733.52480-1-maennich@google.com> <20190813121733.52480-6-maennich@google.com> In-Reply-To: <20190813121733.52480-6-maennich@google.com> From: Saravana Kannan Date: Tue, 13 Aug 2019 13:15:44 -0700 Message-ID: Subject: Re: [PATCH v2 05/10] module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS To: Matthias Maennich Cc: LKML , maco@android.com, Android Kernel Team , arnd@arndb.de, geert@linux-m68k.org, Greg Kroah-Hartman , hpa@zytor.com, jeyu@kernel.org, "Joel Fernandes (Google)" , kstewart@linuxfoundation.org, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-modules@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, lucas.de.marchi@gmail.com, maco@google.com, michal.lkml@markovi.net, mingo@redhat.com, oneukum@suse.com, pombredanne@nexb.com, sam@ravnborg.org, sboyd@codeaurora.org, Sandeep Patil , stern@rowland.harvard.edu, tglx@linutronix.de, usb-storage@lists.one-eyed-alien.net, x86@kernel.org, yamada.masahiro@socionext.com, Andrew Morton , Johannes Weiner , "Peter Zijlstra (Intel)" , Mauro Carvalho Chehab , David Howells , Patrick Bellasi , Dan Williams , Adrian Reber , Richard Guy Briggs Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: On Tue, Aug 13, 2019 at 5:19 AM 'Matthias Maennich' via kernel-team wrote: > > If MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is enabled (default=n), the > requirement for modules to import all namespaces that are used by > the module is relaxed. > > Enabling this option effectively allows (invalid) modules to be loaded > while only a warning is emitted. > > Disabling this option keeps the enforcement at module loading time and > loading is denied if the module's imports are not satisfactory. > > Reviewed-by: Martijn Coenen > Signed-off-by: Matthias Maennich > --- > init/Kconfig | 14 ++++++++++++++ > kernel/module.c | 11 +++++++++-- > 2 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/init/Kconfig b/init/Kconfig > index bd7d650d4a99..b3373334cdf1 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -2119,6 +2119,20 @@ config MODULE_COMPRESS_XZ > > endchoice > > +config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS > + bool "Allow loading of modules with missing namespace imports" > + default n > + help > + Symbols exported with EXPORT_SYMBOL_NS*() are considered exported in > + a namespace. A module that makes use of a symbol exported with such a > + namespace is required to import the namespace via MODULE_IMPORT_NS(). > + This option relaxes this requirement when loading a module. > While > + technically there is no reason to enforce correct namespace imports, > + it creates consistency between symbols defining namespaces and users > + importing namespaces they make use of. I'm confused by this sentence. It sounds like it's the opposite of what the config is doing? Can you please reword it for clarify? -Saravana