Commit Graph

63 Commits

Author SHA1 Message Date
rsuntk
1ce706823e kernel: guard nuke_ext4_sysfs
Rather than using depends on / select,
i just prefer this way, although, yes, it is
an ifdef hell.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
2025-05-24 15:03:24 +08:00
rsuntk
84a0ab78fb kernel: make path_umount backporting as optional
Since https://github.com/backslashxx/KernelSU/commit/4f8943a, path_umount is no longer needed.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
2025-05-24 15:02:40 +08:00
backslashxx
cd32ee21be kernel: core_hook: screw path_umount backport, call sys_umount directly
I am repasting here what I posted on the source code originally:

/*
 * turns out path_umount backport is completely unneeded
 * we copy the trick used on strncpy_from_unsafe_user / strncpy_from_user_nofault
 * https://elixir.bootlin.com/linux/v4.4.302/source/mm/maccess.c#L184
 * basically
 *
 *     mm_segment_t old_fs = get_fs();     // remember original fs segment
 *     set_fs(USER_DS);                    // or KERNEL_DS *
 *     do_whatever_in_userspace();
 *     set_fs(old_fs);                     // restore fs segment
 *
 *  * kernel -> user, KERNEL_DS, user -> kernel, USER_DS
 *
 * so yes, we can try to straight up call a syscall from kernel space
 *
 * NOTE: on newer kernels you can use force_uaccess_begin + force_uaccess_end
 * ref: https://elixir.bootlin.com/linux/v5.10.237/source/mm/maccess.c#L250
 *
 */

path_umount backport now optional — neat trick, werks, what can I say.

Backports? Nah, we’re good.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-24 14:43:07 +08:00
ShirkNeko
bbb072b776 Refactoring KPM support to check KPM status using CMD_ENABLE_KPM 2025-05-24 14:36:41 +08:00
ShirkNeko
95c47b8602 Fixed misspelling of CONFIG_KSU_HOOK_KPROBES to CONFIG_KSU_KPROBES_HOOK in Makefile and related files. 2025-05-17 18:33:29 +08:00
ShirkNeko
d9063377af Rearrange KSU related conditional compilation support in core_hook.c to improve code readability 2025-04-23 15:35:19 +08:00
ShirkNeko
dfaada7134 Patch update SuSFS version to 1.5.6 2025-04-22 16:20:41 +08:00
ShirkNeko
f0a14e54e6 在core_hook.c中添加对KPM的条件编译支持 2025-04-21 10:31:50 +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
6cf8f77b61 Add an uninstall attempt for the “/data/adb/kpm” path in the kernel mount logic to enhance the integrity of path management 2025-04-11 20:22:48 +08:00
ShirkNeko
6c4b73a38e 更新 KPM 模块,调整函数参数以支持额外的用户结果返回 2025-03-31 20:10:32 +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