From 0973cd1ae0097daaadad5c7c4c7a0fbb05e9f2bf Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Mon, 12 May 2025 19:29:25 +0800 Subject: [PATCH] kernel: handle samsung selinux driver * Some samsung kernel source have SEC_SELINUX_PORTING_COMMON * This commit mayfix false warning to sepolicy. Mayfix: I haven't test it yet Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com> --- kernel/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index b7ec77a7..99df779d 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -40,11 +40,6 @@ $(info -- KernelSU: checks failed, abort.) $(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount) endif -# Check arch -ifneq ($(strip $(CONFIG_KSU_64BIT)),y) -$(info -- KernelSU: Running in 32-bit mode.) -endif - # Checks hooks state ifeq ($(strip $(CONFIG_KSU_MANUAL_HOOK)),y) $(info -- KernelSU: Manually-patched hook.) @@ -89,6 +84,11 @@ ifeq ($(shell grep -q "CONFIG_KDP_CRED" $(srctree)/kernel/cred.c; echo $$?),0) ccflags-y += -DSAMSUNG_UH_DRIVER_EXIST endif +# Samsung SELinux Porting +ifeq ($(shell grep -q "SEC_SELINUX_PORTING_COMMON" $(srctree)/security/selinux/avc.c; echo $$?),0) +ccflags-y += -DSAMSUNG_SELINUX_PORTING +endif + ifndef KSU_EXPECTED_SIZE KSU_EXPECTED_SIZE := 0x35c endif