Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55c09c9b authored by Preeti Nagar's avatar Preeti Nagar
Browse files

RTIC: Move selinux_state to a separate 4k



We need to relocate selinux_state to a separate 4k page
to enable EL2 Hypervisor to monitor changes to this
variable using ARM stage 2 MMU. We will avoid getting
page faults from un-related data as the MMU granularity
is configured to 4k.

Change-Id: I7d0e5c9eae0a2a65ca9db73e85283e164e20c11c
Signed-off-by: default avatarPreeti Nagar <pnagar@codeaurora.org>
parent cb9b0395
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -5,6 +5,15 @@
 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
 */

#ifdef CONFIG_QCOM_RTIC
#define BSS_FIRST_SECTIONS				\
	. = ALIGN(PAGE_SIZE);				\
	KEEP(*(.bss.rtic))				\
	. = ALIGN(PAGE_SIZE);
#else
#define BSS_FIRST_SECTIONS
#endif

#include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h>
#include <asm/kernel-pgtable.h>
+4 −0
Original line number Diff line number Diff line
@@ -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
+4 −0
Original line number Diff line number Diff line
@@ -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);