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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6AAC1C3A5A5 for ; Thu, 5 Sep 2019 11:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C4CC2070C for ; Thu, 5 Sep 2019 11:26:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="iCjY2UfL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732815AbfIEL0P (ORCPT ); Thu, 5 Sep 2019 07:26:15 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:53056 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732049AbfIEL0O (ORCPT ); Thu, 5 Sep 2019 07:26:14 -0400 Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x85BQ83R019832; Thu, 5 Sep 2019 20:26:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x85BQ83R019832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1567682769; bh=eYLn272Sy9fhUXrERxsg5RcSmedtHOfjBVG9VJ4bb5Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iCjY2UfL6jd45sNhs0jxhiNCQWLUr3ZcSneQD6AKR9pu+jxMrDLKVOlLj/ycVHIT1 jyvVrPsWl//7r7yQBeXkQbAZxbmtWgERcc7lzJnxg046ZgTqiOSxcxJqO6ozlmOhiP I4Wa/6r9IgYuYFO0hno/hl3yQ6Dv/1MYv7o1DOY8eV3urCwhYHsyowxzRyllHTIg4p AGmLdOdydztJHV/2uGG3KVSIhr5d5hDbpAJNMjlLIdwYSQSUvvcug8rr7VfhfLxbJ/ glDa8jIUnR2yrPKmX398FPHc+uyBvh4d8Y79UOjq9fptnzGb8fIHWT5JU6FXpWLvPe /cgK/xB8Z01LA== X-Nifty-SrcIP: [209.85.217.44] Received: by mail-vs1-f44.google.com with SMTP id w195so1288686vsw.11; Thu, 05 Sep 2019 04:26:09 -0700 (PDT) X-Gm-Message-State: APjAAAXnjgeUux9E4OjdThVuQg342h4JzZl1Td5dLZq87Pv0m9K7ngBY knYZTc0+y34BWjXAwrYHBEu3su986gcQz3mYRnM= X-Google-Smtp-Source: APXvYqwOMv33jlhvXcxrJswfOYxSINojKomiw5PHTIePxV8kcg4TNPSESzrAsXtvN5eyFhUDcaxoE1yimV3bVbvTnwM= X-Received: by 2002:a67:e9cc:: with SMTP id q12mr1416862vso.181.1567682768019; Thu, 05 Sep 2019 04:26:08 -0700 (PDT) MIME-Version: 1.0 References: <20180716122125.175792-1-maco@android.com> <20190903150638.242049-1-maennich@google.com> <20190903150638.242049-13-maennich@google.com> <20190903161045.GA22754@roeck-us.net> <20190905104147.GA27788@linux-8ccs> <20190905111617.GB27788@linux-8ccs> In-Reply-To: <20190905111617.GB27788@linux-8ccs> From: Masahiro Yamada Date: Thu, 5 Sep 2019 20:25:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [usb-storage] Re: [PATCH v4 12/12] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace To: Jessica Yu Cc: Arnd Bergmann , Matthew Dharm , Guenter Roeck , Matthias Maennich , Linux Kernel Mailing List , "Cc: Android Kernel" , Greg Kroah-Hartman , "Joel Fernandes (Google)" , Lucas De Marchi , Martijn Coenen , Sandeep Patil , Will Deacon , Linux Kbuild mailing list , linux-modules@vger.kernel.org, linux-usb , USB Mass Storage on Linux , LINUXWATCHDOG Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: On Thu, Sep 5, 2019 at 8:16 PM Jessica Yu wrote: > > +++ Arnd Bergmann [05/09/19 12:52 +0200]: > >On Thu, Sep 5, 2019 at 12:41 PM Jessica Yu wrote: > >> +++ Matthew Dharm [04/09/19 09:16 -0700]: > >> >On Wed, Sep 4, 2019 at 5:12 AM Guenter Roeck wrote: > > > >> >HOWEVER, I have one question: If these patches are included, and > >> >someone wants to introduce a bit of code which needs to use two > >> >symbols from different namespaces but with the same name, can that be > >> >done? That is, if driver A has symbol 'foo' and driver B has symbol > >> >'foo' (both in their respective namespaces), and driver C wants to use > >> >A.foo and B.foo, can that be supported? > >> > >> As of now, we currently don't support this - modpost will warn if a > >> symbol is exported more than once (across modules + vmlinux), and the > >> module loader currently assumes exported symbol names are unique. Do > >> you have a concrete use case? If there is a strong need for this, I > >> don't think it'd be too hard to implement. > > > >I think what would prevent this from working in general is that having > >two modules with the same exported symbol in different namespaces > >won't link if you try to build both modules into the kernel itself. > > > > Arnd > > Ah yeah, you are right. I only tried building an identically named > exported symbol in a module and in the kernel, and there I got away > with a modpost warning. But this breaks when building the module into > the kernel, so I guess this is out of the question. > > Thanks, > > Jessica > The cover letter starts with "As of Linux 5.3-rc7, there are 31207 [1] exported symbols in the kernel". Whether or not we apply this patch set, we will have to carefully maintain them so that 31207 symbols are unique, anyway. (And, we can do this with allmodconfig + modpost) So, what is the point of the namespace, where it does not loosen the scope of uniqueness? -- Best Regards Masahiro Yamada