kernel: align prctl harden commit from backslashxx/KernelSU

SQUASHED:
* kernel: harden barriers for arm/arm64
* kernel: core_hook: harden prctl handler

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
backslashxx
2025-10-04 22:09:40 +07:00
committed by ShirkNeko
parent 1d4d23d2c9
commit 1f468f35f4
2 changed files with 19 additions and 13 deletions

View File

@@ -7,12 +7,10 @@
#include "ss/policydb.h"
#include "linux/key.h"
#if defined(CONFIG_X86)
#define kcompat_barrier() barrier_nospec()
#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#define kcompat_barrier() isb() // arch/arm64/include/asm/barrier.h
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#define kcompat_barrier() do { barrier(); isb(); } while (0)
#else
#define kcompat_barrier() barrier() // well, compiler atleast.
#define kcompat_barrier() barrier()
#endif
/*