From 929c31bb5a2e489cd885807e6d2882d812b776b7 Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Wed, 22 Apr 2020 10:59:38 -0700 Subject: [PATCH] ANDROID: GKI: Add special linux_banner_ptr for modules We can't modify the original linux_banner symbol due to ramdump parsing dependencies. So add an additional symbol pointer that just points at it. This way ABI monitoring won't care about the value and modules can still access the banner value. Signed-off-by: Will McVicker Bug: 154586724 Bug: 154345163 Test: compile Change-Id: I65678e02467b8754824a7527270a725741394fe3 --- include/linux/printk.h | 1 + init/version.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index cf3eccfe1543..c812ceed6cfd 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -9,6 +9,7 @@ #include extern const char linux_banner[]; +extern const char *linux_banner_ptr; extern const char linux_proc_banner[]; #define PRINTK_MAX_SINGLE_HEADER_LEN 2 diff --git a/init/version.c b/init/version.c index 61bcdf3c00a1..046b830abfe4 100644 --- a/init/version.c +++ b/init/version.c @@ -45,7 +45,9 @@ EXPORT_SYMBOL_GPL(init_uts_ns); const char linux_banner[] = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; -EXPORT_SYMBOL_GPL(linux_banner); + +const char *linux_banner_ptr = linux_banner; +EXPORT_SYMBOL_GPL(linux_banner_ptr); const char linux_proc_banner[] = "%s version %s"