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: <CAK7LNARUUOSd0-Q=bopr5q9J6xbtRAJsUKRGacf+vpuu8KJdxw@mail.gmail.com>
Date:   Tue, 24 May 2022 03:31:59 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Miroslav Benes <mbenes@...e.cz>,
        Emil Velikov <emil.l.velikov@...il.com>,
        Jessica Yu <jeyu@...nel.org>,
        Quentin Perret <qperret@...gle.com>,
        Matthias Maennich <maennich@...gle.com>
Subject: Re: [PATCH v2] export: fix string handling of namespace in EXPORT_SYMBOL_NS

On Wed, Apr 27, 2022 at 11:50 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Wed, Apr 27, 2022 at 11:29:19PM +0900, Masahiro Yamada wrote:
> > On Wed, Apr 27, 2022 at 6:06 PM Greg Kroah-Hartman
> > <gregkh@...uxfoundation.org> wrote:
> > >
> > > Commit c3a6cf19e695 ("export: avoid code duplication in
> > > include/linux/export.h") broke the ability for a defined string to be
> > > used as a namespace value.
> >
> > In hindsight, this was a bad idea.
> >
> >
> > EXPORT_SYMBOL_NS_GPL(dw_spi_resume_host, "SPI_DW_CORE")
> >
> >    is much much better than:
> >
> > EXPORT_SYMBOL_NS_GPL(dw_spi_resume_host, SPI_DW_CORE)
>
> I agree, but it's really not that big of a deal.  We could change it if
> you want.
>
> > ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_STORAGE
> >
> > is also a bad idea.
>
> That's not such a bad idea as it lets you set a namespace for a
> directory and below easily.  What would you want to use instead?
>
> > When you look at EXPORT_SYMBOL_GPL() in C files, you will not be
> > aware of the presence of the namespace.
>
> It's easy to tell when things do not link properly :)
>
> > Anyway, it is presumably too late to fix it.
>
> Not really, the number of in-kernel users are still small and can be
> changed if you like.  External users can update when they hit the change
> as well, not a big deal.


If I send a patch for global conversion,
will you be happy to pick it up?


I think this should be applied at the very last moment
of the MW.


I can convert tree-wide by sed.


Example of conversion:

EXPORT_SYMBOL_NS_GPL(dw_spi_resume_host, SPI_DW_CORE)
   -->
EXPORT_SYMBOL_NS_GPL(dw_spi_resume_host, "SPI_DW_CORE")







> Other than using a string for the namespace definition, what would you
> like to see done differently?
>
> > >  Fix this up by using stringify to properly
> > > encode the namespace name.
> > >
> > > Fixes: c3a6cf19e695 ("export: avoid code duplication in include/linux/export.h")
> > > Cc: Miroslav Benes <mbenes@...e.cz>
> > > Cc: Emil Velikov <emil.l.velikov@...il.com>
> > > Cc: Jessica Yu <jeyu@...nel.org>
> > > Cc: Quentin Perret <qperret@...gle.com>
> > > Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
> >
> > This email is no longer valid.
>
> Ah, sorry about that.
>
> > Feel free to replace it with
> >
> > Reviewed-by: Masahiro Yamada <masahiroy@...nel.org>
>
> Will do, thanks!
>
> greg k-h



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ