From fdef3b72107985ff7d5478d4025cbadd1b13f751 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Fri, 17 Apr 2020 12:11:40 -0700 Subject: [PATCH] ANDROID: GKI: Make linux_banner a C pointer This variable can have its ABI intentionally changed by anybody building on a different hostname etc. so it does not make sense to monitor it as a C string. Make linux_banner a C pointer so it is checked for presence but not for length. Bug: 154345163 Signed-off-by: Alistair Delva Change-Id: I932e7c2ca1a1bd6d730462249005515c71771ed8 --- include/linux/printk.h | 2 +- init/version.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index cf3eccfe1543..5a8ef10b4492 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -8,7 +8,7 @@ #include #include -extern const char linux_banner[]; +extern const char *linux_banner; 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..9cbe50e3dfc4 100644 --- a/init/version.c +++ b/init/version.c @@ -42,7 +42,7 @@ struct uts_namespace init_uts_ns = { EXPORT_SYMBOL_GPL(init_uts_ns); /* FIXED STRINGS! Don't touch! */ -const char linux_banner[] = +const char *linux_banner = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; EXPORT_SYMBOL_GPL(linux_banner);