diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index aa76f7259668..75d3f8cac12d 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -5,6 +5,15 @@ * Written by Martin Mares */ +#ifdef CONFIG_QCOM_RTIC +#define BSS_FIRST_SECTIONS \ + . = ALIGN(PAGE_SIZE); \ + KEEP(*(.bss.rtic)) \ + . = ALIGN(PAGE_SIZE); +#else +#define BSS_FIRST_SECTIONS +#endif + #include #include #include diff --git a/include/linux/init.h b/include/linux/init.h index 32633ea36f96..48a27e630e8e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -322,6 +322,10 @@ void __init parse_early_options(char *cmdline); /* Data marked not to be saved by software suspend */ #define __nosavedata __section(.data..nosave) +#ifdef CONFIG_QCOM_RTIC +#define __rticdata __section(.bss.rtic) +#endif + #ifdef MODULE #define __exit_p(x) x #else diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index f8a9b2a3ad67..42ee176bf198 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -103,7 +103,11 @@ #include "audit.h" #include "avc_ss.h" +#ifdef CONFIG_QCOM_RTIC +struct selinux_state selinux_state __rticdata; +#else struct selinux_state selinux_state; +#endif /* SECMARK reference count */ static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);