lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6ac941c-06a4-e5dc-5cb9-fca7b40d7e9a@roeck-us.net>
Date:   Wed, 4 Sep 2019 05:12:43 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Matthias Maennich <maennich@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Cc: Android Kernel" <kernel-team@...roid.com>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jessica Yu <jeyu@...nel.org>,
        "Joel Fernandes (Google)" <joel@...lfernandes.org>,
        Lucas De Marchi <lucas.de.marchi@...il.com>,
        maco@...roid.com, sspatil@...gle.com,
        Will Deacon <will@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        linux-modules@...r.kernel.org,
        linux-usb <linux-usb@...r.kernel.org>,
        usb-storage@...ts.one-eyed-alien.net,
        linux-watchdog@...r.kernel.org
Subject: Re: [PATCH v4 12/12] RFC: watchdog: export core symbols in
 WATCHDOG_CORE namespace

On 9/4/19 1:45 AM, Masahiro Yamada wrote:
> On Wed, Sep 4, 2019 at 1:10 AM Guenter Roeck <linux@...ck-us.net> wrote:
>>
>> On Tue, Sep 03, 2019 at 04:06:38PM +0100, Matthias Maennich wrote:
>>> Modules using symbols from the WATCHDOG_CORE namespace are required to
>>> explicitly import the namespace. This patch was generated with the
>>> following steps and serves as a reference to use the symbol namespace
>>> feature:
>>>
>>>   1) Use EXPORT_SYMBOL_NS* macros instead of EXPORT_SYMBOL* for symbols
>>>      in watchdog_core.c
>>>   2) make  (see warnings during modpost about missing imports)
>>>   3) make nsdeps
>>>
>>> I used 'allmodconfig' for the above steps to ensure all occurrences are
>>> patched.
>>>
>>> Defining DEFAULT_SYMBOL_NAMESPACE in the Makefile is not trivial in this
>>> case as not only watchdog_core is defined in drivers/watchdog/Makefile.
>>> Hence this patch uses the variant of using the EXPORT_SYMBOL_NS* macros
>>> to export into a different namespace.
>>>
>>> An alternative to this patch would be a single definition line before
>>> any use of EXPORT_SYMBOL*:
>>>   #define DEFAULT_SYMBOL_NAMESPACE WATCHDOG_CORE
>>>
>>> This patch serves as a reference on how to use the symbol namespaces.
>>>
>>> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>>> Signed-off-by: Matthias Maennich <maennich@...gle.com>
>>
>> As mentioned before, I am opposed to this set of changes. I don't see
>> the point of restricting the use of exported symbols in WATCHDOG_CORE.
>>
>> Guenter
> 
> 
> I agree.
> 
> I do not like this patch set either.
> 

Note that I don't object to the patch set in general. There may be symbols
which only need be exported in the context of a single subsystem or even
driver (if a driver consists of more than one module). For example, a mfd
driver may export symbols which should only be called by its client drivers.
In such a situation, it may well be beneficial to limit the use of exported
symbols.

I am not sure what good that does in practice (if I understand correctly,
a driver only has to declare that it wants to use a restricted use symbol
if it wants to use it), but that is a different question.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ