Commit Graph

23 Commits

Author SHA1 Message Date
ShirkNeko
e79b702fd6 Synchronise some modifications
Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
Co-authored-by: u9521 <63995396+u9521@users.noreply.github.com>
Co-authored-by: Wang Han <416810799@qq.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
Co-authored-by: Faris <rissu.ntk@gmail.com>
2025-11-18 21:27:22 +08:00
ShirkNeko
b686c81be4 kernel: fix build 2025-11-18 16:10:59 +08:00
ShirkNeko
59141b2e05 kernel & KernelSU: Synced with upstream; Original add_try_umount will be used if susfs TRY_UMOUNT is disabled during compile time
Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-11-18 15:47:03 +08:00
ShirkNeko
f1909411c0 kernel: Fixed compilor error when SUS_MOUNT is disabled
Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-11-18 15:26:45 +08:00
TwinbornPlate75
9d5c6ab3fd kernel: Fix compilation for non-gki kernels (#593) 2025-11-17 20:10:06 +08:00
ShirkNeko
e2bcec1ee2 kernel: Add sulog records for susfs 2025-11-16 14:50:04 +08:00
ShirkNeko
7f94204191 KernelSU: Fixed wrong TRY_UMOUNT #ifdef guard
Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-11-16 13:13:38 +08:00
ShirkNeko
011a740217 kernel: Add legacy compatibility fallback 2025-11-15 11:05:50 +08:00
ShirkNeko
4c04508267 kernel: Apply the susfs patch
Co-authored-by: simonpunk <simonpunk2016@gmail.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-11-14 18:36:04 +08:00
ShirkNeko
d3461a6421 kernel: Resolved potential deadlock issues arising from operations not being performed within locks. 2025-11-14 13:04:02 +08:00
5ec1cff
9203006028 kernel: refine syscall_hook_manager
- Don't unmark process when setuid if syscall tracepoint is in use
- Remark process when app profile updated
- Ensure zygote is marked on first boot
2025-11-14 13:03:46 +08:00
Wang Han
d2db8b4291 kernel: Fix task flag marking for root and shell UID
Signed-off-by: Wang Han <416810799@qq.com>
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
2025-11-11 16:33:38 +08:00
ShirkNeko
66f37c7310 Revert "kernel: Apply the SUSFS patch"
This reverts commit ad0f3f6025.
2025-11-09 21:39:04 +08:00
ShirkNeko
3a0f9b4e2c Clean up kernel code (#2898)
1) Fix memory leak of callback head in allowlist.c
2) Remove duplicated logic and incorrect log in kernel_umount.c
3) Prevent sleep in kprobe context in ksud.c
4) Remove useless is_unsupported_uid, use euid for security enhance,
   add FIXME in setuid_hook.c
5) Remove useless fd argument for execve hook, fix incorrent pointer
   usage in syscall_hook_manager.c and sucompat.c
6) Use correct errno in supercalls.c

---------

Co-authored-by: Ylarod <me@ylarod.cn>
2025-11-09 19:23:22 +08:00
ShirkNeko
ad0f3f6025 kernel: Apply the SUSFS patch 2025-11-09 18:32:16 +08:00
ShirkNeko
92e9f4068a kernel: Rollback disable_seccomp
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
Co-authored-by: Faris <rissu.ntk@gmail.com>
2025-11-09 18:04:49 +08:00
ShirkNeko
ae104ed4a4 kernel: Remove redundant checks 2025-11-09 18:04:32 +08:00
ShirkNeko
a0ceda008d fix build 2025-11-09 14:14:51 +08:00
ShirkNeko
a525048d1f kernel: Remove susfs patch 2025-11-09 12:48:51 +08:00
ShirkNeko
c400952b47 clear build 2025-11-09 12:30:52 +08:00
ShirkNeko
f6a0fab2ef Fixes only hook in LKM mode __NR_newfstatat ,__NR_faccessat ,__NR_execve system calls 2025-11-09 12:18:00 +08:00
ShirkNeko
86cd05e206 Attempt to refactor and migrate inode_permission, bprm_check_security, and task_alloc entirely to syscall_hook_manager
kernel: fix build
2025-11-09 04:35:29 +08:00
ShirkNeko
af4b502631 kernel: Rewrite the kernel source code (#554)
* clean unused header

* on_module_mounted in ksud.c

* refact: use app_profile

* unified hook manager

* add zygote to hook target

* move reboot hook to supercall.c

* refactor: kernel_umount setuid_hook

* update mark rules, add init mark tracker

* remove reboot from check_syscall_fastpath

* update setuid_hook, remove uneeded sucompat enable

* log freely

* kernel: Migrate kprobe hook configuration items

* kernel: fix build

* cli: add ksud debug mark

* Fix rustfmt warning

---------

Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: Wang Han <416810799@qq.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-11-09 03:49:11 +08:00