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: <2024120249-octane-whenever-ee1f@gregkh>
Date: Mon, 2 Dec 2024 16:22:01 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mcgrof@...nel.org, Linus Torvalds <torvalds@...ux-foundation.org>,
	x86@...nel.org, hpa@...or.com, petr.pavlu@...e.com,
	samitolvanen@...gle.com, da.gomez@...sung.com, masahiroy@...nel.org,
	nathan@...nel.org, nicolas@...sle.eu, linux-kernel@...r.kernel.org,
	linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org,
	hch@...radead.org
Subject: Re: [PATCH -v2 1/7] module: Convert symbol namespace to string
 literal

On Mon, Dec 02, 2024 at 04:15:33PM +0100, Peter Zijlstra wrote:
> On Mon, Dec 02, 2024 at 03:59:47PM +0100, Peter Zijlstra wrote:
> > Clean up the existing export namespace code along the same lines of
> > 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to
> > __section("foo")") and for the same reason, it is not desired for the
> > namespace argument to be a macro expansion itself.
> > 
> > git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
> > do
> >   awk -i inplace '
> >     /^#define EXPORT_SYMBOL_NS/ {
> >       gsub(/__stringify\(ns\)/, "ns");
> >       print;
> >       next;
> >     }
> >     /^#define MODULE_IMPORT_NS/ {
> >       gsub(/__stringify\(ns\)/, "ns");
> >       print;
> >       next;
> >     }
> >     /MODULE_IMPORT_NS/ {
> >       $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
> >     }
> >     /EXPORT_SYMBOL_NS/ {
> >       if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
> > 	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
> > 	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
> > 	    $0 !~ /^my/) {
> > 	  getline line;
> > 	  gsub(/[[:space:]]*\\$/, "");
> > 	  gsub(/[[:space:]]/, "", line);
> > 	  $0 = $0 " " line;
> > 	}
> > 
> > 	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
> > 		    "\\1(\\2, \"\\3\")", "g");
> >       }
> >     }
> >     { print }' $file;
> > done
> 
> Perhaps we can ask Linus to run this now, before -next fills up again ?

Yes please!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ