linux/net/handshake
Peter Zijlstra cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("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.

Scripted using

  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

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
.kunitconfig net/handshake: Add Kunit tests for the handshake consumer API 2023-04-19 18:48:48 -07:00
alert.c net/handshake: Trace events for TLS Alert helpers 2023-07-28 14:07:59 -07:00
genl.c handshake: Fix sign of socket file descriptor fields 2023-10-02 12:34:21 -07:00
genl.h net: ynl: prefix uAPI header include with uapi/ 2023-05-26 10:30:14 +01:00
handshake-test.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
handshake.h net/handshake: Add API for sending TLS Closure alerts 2023-07-28 14:07:59 -07:00
Makefile net/handshake: Add API for sending TLS Closure alerts 2023-07-28 14:07:59 -07:00
netlink.c net/handshake: use sockfd_put() helper 2024-08-27 16:09:25 -07:00
request.c remove pointless includes of <linux/fdtable.h> 2024-10-07 13:34:41 -04:00
tlshd.c net/handshake: remove redundant assignment to variable ret 2024-04-16 17:14:55 -07:00
trace.c net/handshake: Trace events for TLS Alert helpers 2023-07-28 14:07:59 -07:00