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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 6C56FC3A5A5 for ; Thu, 5 Sep 2019 10:52:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4EE7421883 for ; Thu, 5 Sep 2019 10:52:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732448AbfIEKwt (ORCPT ); Thu, 5 Sep 2019 06:52:49 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:33583 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731142AbfIEKwt (ORCPT ); Thu, 5 Sep 2019 06:52:49 -0400 Received: by mail-qk1-f193.google.com with SMTP id x134so1669578qkb.0; Thu, 05 Sep 2019 03:52:48 -0700 (PDT) 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=czu/PiAww9XB7MKWzR+JeGUBiZd6i1YW50nMibpRMWM=; b=j/zbY3qjes+eq84DBlsk8mjAVM105toekpTzBuS6OtnEz0dVOPUFCuI2lZ2/wUmrmG MvwDr+IUweEWy9VEGvO4dXd6JLwiSCiitAUFJOMwTNmYX60TtsIKa9ngpUdpHTELCZWm AaR3696z3UjISIbYbfGm/FPFloSzAeUjpjKeBYGOzW9urXfaid+qa73DvwLJvIL9RzDA felNku8qskV5yuDj2DSzJzR3wTbLPbf8gxyOaNAop/XgOHqTQhXKNcNJA1h0XuVNOlmP HwAOGOV98nlP9ADevlcbOq9HxwvJjNZ5tI0Y8W73d44Ka6hojAdN7vCHCxiDJzY4vIIK bgYg== X-Gm-Message-State: APjAAAUYYxYmPxPSxZ9/DdqIgU5/LTTJ9EW9TV53ehupMYQR99GGhfiE cMaurOBvtJB0Yw8SnHnblfqqaNQq6dvf0RFfRRtyfYho X-Google-Smtp-Source: APXvYqyWZAErLRRjeUfF4GBmDqw5BjqZwUk6wIq3IU37cmxKozkYm8OYw3tcuu+1lbgZCEgiOlU+bPW0faEIHGV3BB4= X-Received: by 2002:a37:4051:: with SMTP id n78mr2082165qka.138.1567680768377; Thu, 05 Sep 2019 03:52:48 -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> In-Reply-To: <20190905104147.GA27788@linux-8ccs> From: Arnd Bergmann Date: Thu, 5 Sep 2019 12:52:32 +0200 Message-ID: Subject: Re: [usb-storage] Re: [PATCH v4 12/12] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace To: Jessica Yu Cc: Matthew Dharm , Guenter Roeck , Masahiro Yamada , 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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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