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: <20241229082524.41494308@dsl-u17-10>
Date: Sun, 29 Dec 2024 08:25:24 +0000
From: David Laight <david.laight.linux@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: andi.shyti@...nel.org, masahiroy@...nel.org,
 u.kleine-koenig@...libre.com, torvalds@...ux-foundation.org,
 linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org
Subject: Re: [PATCH] module: Allow DEFAULT_SYMBOL_NAMESPACE be set after
 export.h included

On Sat, 28 Dec 2024 23:38:49 +0200
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> On Sat, Dec 28, 2024 at 06:43:28PM +0000, David Laight wrote:
> > Commit ceb8bf2ceaa77 ("module: Convert default symbol namespace to string
> > literal") changed DEFAULT_SYMBOL_NAMESPACE to be a string literal.
> > However the conditional definition of _EXPORT_SYMBOL() was left in.
> > 
> > Instead just default DEFAULT_SYMBOL_NAMESPACE to "" and remove the
> > extra _EXPORT_SYMBOL() wrapper.
> > 
> > This lets DEFAULT_SYMBOL_NAMESPACE be defined after export.h is included.  
> 
> > Fixes fd57a3325a779 ("i2c: designware: Move exports to I2C_DW namespaces")  
> 
> Incorrect format, and this should be a tag.

Except that it doesn't want to be picked up by the back-port bots.
At least not in this form - since the changes to export.h that remove
the __stringify() don't really want back-porting.

> 
> ...
> 
> This patch in a different form had been already submitted by Uwe.

Did that move the DEFAULT_SYMBOL_NAMESPACE define to the top of the file?
That can be back-ported provided the " are removed.

The simplification to export.h (which is what I was trying to do)
can then be done after the other patches.

> So, guys, fix
> the documentation or clarify it and when you agree on the approach, choose the
> patch to review. No Ack till that. Andi, FYI.
> 

I had another thought overnight - which is more changes.
Instead of using DEFAULT_SYMBOL_NAMESPACE in EXPORT_SYMBOL() use it as
a default for EXPORT_SYMBOL_NS().
So you have something like:
#define EXPORT_SYMBOL_NS(sym, ...) _EXPORT_SYMBOL_NS(sym, __VA_ARGS__, DEFAULT_SYMBOL_NAMESPACE)
#define _EXPORT_SYMBOL_NS(sym, ns, ...) __EXPORT_SYMBOL(sym, "", ns)

That requires that all the EXPORT_SYMBOL(sym) in files that define DEFAULT_SYMBOL_NAMESPACE
be changed to EXPORT_SYMBOL_NS(sym).
But it doesn't require a default definition of DEFAULT_SYMBOL_NAMESPACE and lets
it be defined in a more obvious part of the source file.

	David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ