Commit Graph

15 Commits

Author SHA1 Message Date
ShirkNeko
85bb10341a Deprecated ADD_TRY_UMOUNT in favor of official kernel_umount; Synced with the latest commit of official KernelSU main repo
- Since official KSU has exposed kernel_umount API and provided meta module for handling mount operations, susfs can finally handover try_umount and auto add_try_umount to KSU and its meta module

- Synced with upstream, see e1e58ed737

Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-11-23 23:21:26 +08:00
Wang Han
09a56a98b7 kernel: Unmount all isolated process which forks from zygote
Kernel has few information about which isolated process belongs to which
application, so there is actually no good choice if we don't implement a
userspace daemon. One choice is to access cmdline memory from kernel,
but cmdline is __user, and it is likely to trigger detections. Before we
have more good ideas, use this.
2025-11-23 19:47:40 +08:00
ShirkNeko
118fcf507a kernel: fmt 2025-11-18 21:39:31 +08:00
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
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
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
ShirkNeko
0b118e19b3 kernel: remove workqueue for allowlist
Co-authored-by: weishu <twsxtd@gmail.com>
2025-11-08 20:18:56 +08:00
Ylarod
6a44e85d2e revert: still using workqueue for allowlist 2025-11-06 23:39:13 +08:00
Ylarod
dcbc014039 fix: mark tif (#2871) 2025-11-06 14:37:47 +08:00
ShirkNeko
71353a70d4 kernel: use sys_enter tracepoint for sucompat (#533)
* use sys_enter tracepoint for sucompat

* update sucompat rules

* clean tif mark

* mark tif after load allow list

* clear all tif first, then mark target

* Fix shell su

* allow when escape

* fix bugs

* kernel: Resolve logical inconsistencies

---------

Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: weishu <twsxtd@gmail.com>
2025-11-06 14:34:45 +08:00
ShirkNeko
ab3ff2699c Revert "kernel: Remove CONFIG_KSU_MANUAL_SU protection"
This reverts commit fa229b23a4.
2025-11-05 01:50:00 +08:00
ShirkNeko
fa229b23a4 kernel: Remove CONFIG_KSU_MANUAL_SU protection 2025-11-04 21:48:06 +08:00
ShirkNeko
51e6a1b6c7 kernel: Add CONFIG_KSU_MANUAL_SU configuration
- Use random passphrase protection for manual su functionality
2025-09-29 06:50:39 +08:00
ShirkNeko
1281fa70d7 Kernel: Enhanced temporary record UID functionality and elevated privileges 2025-09-29 04:28:31 +08:00
樱檩殇雪
ad064fea9e add susfs-dev branch files 2025-03-17 02:48:59 +08:00