Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp967755ybe; Thu, 5 Sep 2019 08:27:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDqGiFvhcAE6cZDMwhMF32nMPbOX/h5zWoAGi46Vz+i684ue1ksgBuVdbQcgy6QD7mfWAe X-Received: by 2002:a17:902:7483:: with SMTP id h3mr3959586pll.163.1567697271363; Thu, 05 Sep 2019 08:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567697271; cv=none; d=google.com; s=arc-20160816; b=Jk5qItKrPpBSo/pU+J2q3gvOzY262yERA+Dkr1fM4hWMxFstYIOT9R2e0bzPE4A1sz sdmPj0ECl5tsFXwlE6hD+Z0CNrcrC05me0eO9yd54RyaTBO1V/+oTAw1WS5xHohmaeLT 9xoU19MusFi3bYUlBrKBg9grlkR16fLA548EP0X3pl46ubwIl+UW+fpPlc/+mB/iQRum PHOXMHiyTJPbtQsGidRNX0DIyjOtvO/gHF8XuUGPcM8eMJBrgBO73E/zp+2Nr7OMMhd9 TLsseK4k/XaeL4LAt+6cb9gfNE+6p0hwYxVi7dZZ7skIbe7/CfbSSoTmhRaAfu3DszBW gOiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=eYLn272Sy9fhUXrERxsg5RcSmedtHOfjBVG9VJ4bb5Y=; b=KdZbbsRk8zn2jpA6ReGaQCpKrzvQmVekQcPST3ZimHtoaauHwNDo67Xw/ruiLvL4YV Kcf2izr3gE+J/su/3s2wKwlv9BAlKJh9YXN0ZRsUkIjfehOL6I56jHP3Al1YJicDWOi1 2VFrSwGnbxiEDyns0lcIAs8KbWHvPvp3SdoggfAK3bpo3Af0d/uguokYT/pKnQLSpxq+ mRAPQtFfd8Ac4F/SUmvjaCZDWLwNZVP3EPkY7FTnzHyodsa+qruqipCBbHBN+JRHYHEZ LSv15sfmq+/35oDeCkMR3Ui2W7MVuqSjXrA9aAeIgqgjAKbFpZmVuKuiSrlSk2m8v1AO +YyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iCjY2UfL; 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 v14si2018214pgl.386.2019.09.05.08.27.34; Thu, 05 Sep 2019 08:27:51 -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=@nifty.com header.s=dec2015msa header.b=iCjY2UfL; 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 S2388426AbfIEL0Q (ORCPT + 99 others); Thu, 5 Sep 2019 07:26:16 -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-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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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