20 Commits

Author SHA1 Message Date
ShirkNeko
fb2ad3ec7b kernel: keep legacy throne tracker as an option
kernel: keep legacy throne tracker as an option

This change restores older throne tracker that uses packages.list scanning
to track app UIDs. It's intended for ultra-legacy Linux 3.X kernels that
experience deadlocks or crashes with the newer implementation due to issues
in user_data_actor().

We have to remember that the whole iterate_dir, and filldir subsystem is way
different on 3.X.

Changes:
- CONFIG_KSU_THRONE_TRACKER_LEGACY in Kconfig
- conditional compilation in Makefile
- throne_tracker_legacy.c which keeps the old implementation

Enable this option if newer throne tracker (tiann #2757crashes on you.)

Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-09-14 17:38:25 +08:00
ShirkNeko
e41fa8ef62 Revert renaming symbols in KernelSU driver
- In order to reduce the extra patch code and increase the rate of hunk succeed, we do not rename the symbols in KernelSU drvier but instead do it all in kernel/kallsym.c

- Make susfs_starts_with() global as it maybe useful in future

Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-08-25 19:29:14 +08:00
Prslc
ef399712dc kernel: Introducing Tracepoint Hook Type Support
Tracepoint is a predefined hook point in the kernel, compared to Kprobe,
it is more stable and has lower performance overhead, although compatibility
is relatively poor, it is still worth trying

By the way, we have also included the config definitions related to hook types
in Kconfig, to enhance cleanliness

These patches is based on https://github.com/backslashxx/KernelSU/issues/5

Co-authored-by: Cloud_Yun <1770669041@qq.com>
Co-authored-by: Prslc <prslc113@gmail.com>
2025-08-14 20:59:44 +08:00
ShirkNeko
66ff2fa812 Fix the KSU_SUSFS_HAS_MAGIC_MOUNT dependency to ensure it depends on KSU_SUSFS 2025-07-21 16:29:51 +08:00
ShirkNeko
f5541e215f kernel & KernelSU: Replace kabi member susfs_task_state of tast_struct and use...
kernel & KernelSU: Replace kabi member susfs_task_state of tast_struct and use tast_struct->thread_info.flags instead; Fix for sus_path not working on some OEM devices; KSU_SUSFS requires CONFIG_THREAD_INFO_IN_TASK now;

- Since the kabi member is not guaranteed to be unused by OEM, that is why some deivces may conflict with the kabi member added by susfs, we should use less kabi member as much as possible.
- Luckily we have task_struct->thread_info that is enabled by all gki kernels just like kprobes, so we can utilize thread_info->flags for faster check, but it needs CONFIG_THREAD_INFO_IN_TASK to be on which should always be enabled
- Big thanks to fatalcoder524 (https://github.com/fatalcoder524) who did an excellent debug process for me

Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-07-07 13:13:07 +08:00
WenHao2130
5a4a8da820 kernel: Fix typo error
Revise the explanation for KSU_MULTI_MANAGER_SUPPORT

Change-Id: I097b4e0d1a30c02fadd75d4123c7bcf346782f18
Signed-off-by: WenHao2130 <wenhao2130@outlook.com>
2025-07-01 12:47:58 +08:00
YC酱luyancib
4ad011c988 Update Kconfig (#224)
make sure kpm config requrement was enabled
2025-06-30 16:32:09 +08:00
ShirkNeko
8e192aaead kernel: add support for multi KernelSU manager in Kconfig 2025-06-27 00:10:19 +08:00
ShirkNeko
a873411a07 kernel: Bump SuSFS version to v1.5.8 2025-06-13 02:18:29 +08:00
ShirkNeko
1d1a404fa1 Updating the KPM configuration
- We don't know if KPM can run on arm32-bit devices, so to avoid some problems, add a dependency on 64-bit architectures

Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-05-17 18:36:42 +08:00
ShirkNeko
682fdf0afe Prioritize sukisu recognition.
Simplified manual hooks
2025-05-10 14:38:45 +08:00
ShirkNeko
41b8f854a4 Add KSU_CMDLINE configuration to enable the KernelSU command line option and implement the corresponding status read function
Co-authored-by: rsuntk <rsuntk@yukiprjkt.my.id>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-04-24 15:03:09 +08:00
ShirkNeko
dfaada7134 Patch update SuSFS version to 1.5.6 2025-04-22 16:20:41 +08:00
ShirkNeko
2c65af9e80 Add a dependency for KPM in Kconfig to ensure that KPM functionality can only be activated when KSU is enabled 2025-04-21 10:42:52 +08:00
ShirkNeko
970e7651a5 Refactoring Kconfig and Makefile to optimize KernelSU configuration logic and simplify kernel type determination 2025-04-19 16:02:18 +08:00
ShirkNeko
bd56bcf538 Refactoring Kconfig to optimize KernelSU-related configuration and simplify conditional dependency logic 2025-04-19 14:02:12 +08:00
ShirkNeko
28f006ed39 Refactor Kconfig and Makefile, update KPROBES related configurations, simplify conditional compilation logic 2025-04-17 19:46:14 +08:00
ShirkNeko
2fc0935f58 更新 KPM 配置,修改为 SukiSU KPM,并添加启用状态信息 2025-03-31 19:40:16 +08:00
ShirkNeko
743ddce9f7 添加 KPM 模块支持,包括 KPM 配置选项、核心功能实现及相关头文件 2025-03-30 02:54:23 +08:00
樱檩殇雪
ad064fea9e add susfs-dev branch files 2025-03-17 02:48:59 +08:00