From ecbffedaee56d52abec4aeaeb820b54657a3ecd9 Mon Sep 17 00:00:00 2001 From: Coconut <85353552+Coconutat@users.noreply.github.com> Date: Thu, 14 Mar 2024 14:45:55 +0800 Subject: [PATCH] sepolicy.c:Compatible with devices based on Huawei EMUI10 EMUI 10 kernel version is 4.14.xxx. The SELinux of Huawei's modified EMUI10 kernel is still similar to the EMUI 9 version. This commit not support HarmonyOS 2 based EMUI 10. --- kernel/selinux/sepolicy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/selinux/sepolicy.c b/kernel/selinux/sepolicy.c index fd40cd23f580..16bf089fd015 100644 --- a/kernel/selinux/sepolicy.c +++ b/kernel/selinux/sepolicy.c @@ -14,8 +14,10 @@ * Huawei Hisi Kernel EBITMAP Enable or Disable Flag , * From ss/ebitmap.h */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \ - LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #ifdef HISI_SELINUX_EBITMAP_RO #define CONFIG_IS_HW_HISI #endif