From 50ced54e5b3fcf38d43a61ba35f8c7c4fdb05f0a Mon Sep 17 00:00:00 2001 From: Zhen Kong Date: Tue, 9 Jan 2018 14:38:43 -0800 Subject: [PATCH] selinux: Relocate ss_initialized to a separate 4k page We need to relocate ss_initialized 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: I74a1e735d5f804a35ce5b7ffe8b8746e5f56201b Signed-off-by: Zhen Kong --- security/selinux/ss/services.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 082b20c78363..051ee18964b3 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -78,8 +78,7 @@ static DEFINE_RWLOCK(policy_rwlock); static struct sidtab sidtab; struct policydb policydb; -int ss_initialized; - +int ss_initialized __aligned(0x1000) __attribute__((section(".bss_rtic"))); /* * The largest sequence number that has been used when * providing an access decision to the access vector cache.