fc5b87cf
c93cf58f48
kernel: Syncronize upstream changes ( #198 )
...
* Cherry-picked range: (kernel)
ebea31daa8..6915b62b9a
* Also merged unmerged pr:
https://github.com/tiann/KernelSU/pull/ 2909
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 >
2025-11-17 20:57:05 +08:00
Faris
a2211e2909
kernel, manager: Track upstream changes ( #195 )
...
* These commits are carefully picked from upstream (tiann/KernelSU)
- Picked range:
8c5f485f27..e5f43a3427
Signed-off-by: Faris <rissu.ntk@gmail.com >
Co-authored-by: Wang Han <416810799@qq.com >
Co-authored-by: TwinbornPlate75 <3342733415@qq.com >
Co-authored-by: KOWX712 <leecc0503@gmail.com >
Co-authored-by: Ylarod <me@ylarod.cn >
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com >
Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com >
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com >
Co-authored-by: weishu <twsxtd@gmail.com >
2025-11-11 15:38:53 +08:00
Faris
a473707c10
kernel: fix anon_get_inode_* compat
...
* Yes, we don't have fancy secure fd thing on older kernels.
Signed-off-by: Faris <rissu.ntk@gmail.com >
2025-11-08 21:53:21 +08:00
Azyr Ruthless
5782afe481
kernel: add __poll_t compat for pre-4.16 and backported kernels ( #194 )
...
__poll_t was introduced in v4.16-rc1. Add Makefile header check to detect and provide fallback for older kernels and those with backports.
Signed-off-by: AzyrRuthless <azyrruthless@tutamail.com >
2025-11-08 12:11:35 +08:00
Faris
29c6e2dbcc
kernel, ksud: clean headers and add fd wrapper for devpts ( #193 )
...
* Now Official KernelSU devpts compat is questionable
Squashed commits:
4893fad235
e7c3d4a6a6
4bb2dae3f5
Signed-off-by: Faris <rissu.ntk@gmail.com >
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com >
Co-authored-by: weishu <twsxtd@gmail.com >
Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com >
2025-11-08 12:08:54 +08:00
ShirkNeko
2b97c77a6d
Use a more appropriate minor version number
2025-11-06 03:56:52 +08:00
ShirkNeko
68f3be2cbe
kernel, ksud, manager: New supercalls implementations
...
* This commit squashes new supercall impl:
3138651a38..562a3b9be7
Thanks to these people below:
Official KernelSU:
Co-authored-by: Wang Han <416810799@qq.com >
Co-authored-by: weishu <twsxtd@gmail.com >
Co-authored-by: Ylarod <me@ylarod.cn >
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com >
xxKSU maintainer:
Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com >
MMRL maintainer:
Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com >
KSUN maintainer:
Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com >
KOWSU maintainer:
Co-authored-by: KOWX712 <leecc0503@gmail.com >
2025-11-06 03:54:44 +08:00
ShirkNeko
c55a918957
Kernel(Makefile): Add KSU_SRC to set path correctly #483
...
try Fix version define for 6.12 Kernel
Co-authored-by: YC酱luyancib <luyancib@qq.com >
2025-10-21 16:38:59 +08:00
ShirkNeko
07320d9e11
bump KSU_VERSION_API to 3.2.0
2025-09-24 22:35:59 +08:00
ShirkNeko
1b732f62e8
kernel: Added legacy throne tracker support, using packages.list to scan application UIDs
2025-09-21 17:37:43 +08:00
JackAltman
36742cc17e
feat: detect proc_ops support via header parsing instead of version check. ( #411 )
...
Some kernels (e.g. 5.4 with backports) include proc_ops despite being
older than 5.6.0. Replace hardcoded version check with runtime header
detection to handle these cases.
- Check for "struct proc_ops" in include/linux/proc_fs.h
- Use KSU_COMPAT_HAS_PROC_OPS macro for conditional compilation
- Fixes build failures on kernels with backported proc_ops
Signed-off-by: JackAltman
2025-09-20 13:31:18 +08:00
ShirkNeko
3a61da7f45
Add vfs_getattr compatibility for kernels < 4.14
...
Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com >
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com >
2025-09-20 13:24:29 +08:00
ShirkNeko
9b96f853e9
Kernel: Improved throne communication module for user space UID rescan
2025-09-18 22:58:01 +08:00
rsuntk
cc8cf28cbc
kernel: handle optional backport for selinux_inode
...
* For supporting kernel 4.19 with 5.10 bpf backports.
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-09-12 14:41:31 +08:00
dabao1955
a670b82bb6
kernel: Removs extra strip for hook choice ( #361 )
...
* kernel: Removs extra strip for hook choice
extra changes for #353
* kernel: Fix Makefile
2025-08-28 10:20:09 +08:00
rsuntk
98d543e989
kernel: nuke creds wrapper
...
* Little bit complicated, so let's remove it.
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-08-27 15:15:17 +08:00
ShirkNeko
e24c09acbd
kernel: Bump KSU_VERSION_API to 3.1.9
2025-08-24 11:46:20 +08:00
dabao1955
2ab242a209
kernel: Remove unnecessary strip in CONFIG_KSU_TRACEPOINT_HOOK check ( #353 )
...
The 'strip' function is redundant when checking Kconfig variables, as
values from CONFIG options (like CONFIG_KSU_TRACEPOINT_HOOK) are already
trimmed and do not contain leading/trailing whitespace.
Simplify the condition for better readability and maintainability:
- Remove unnecessary $(strip ...)
- Add consistent spacing around the comma
This change aligns with kernel Makefile conventions and improves code clarity
without altering behavior.
Signed-off-by: dabao1955 <dabao1955@163.com >
2025-08-24 11:42:43 +08:00
ShirkNeko
605ef68b3a
kernel: Modified dynamic signature All files have been renamed to the correct names: Dynamic Manager
2025-08-24 11:22:54 +08:00
M. Faris
ff6a68221f
kernel: add wrapper for creds, refine disable_seccomp, revert some changes ( #131 )
...
1. Wrapper for creds:
* Some older kernel does not have {.val}, so, for nicer compatibility support and clean code,
make some wrapper for credential use.
* After this change, do not use current_uid().val, instead, use ksu_current_uid(). For more
info, check kernel/include/ksu_creds.h.
2. Refine disable_seccomp (need to add k6.11+ support)
https://github.com/tiann/KernelSU/pull/2708
https://github.com/tiann/KernelSU/issues/2706
3. Revert "Handle unmount for isolated process correctly"
Reason: https://github.com/tiann/KernelSU/pull/2696#issuecomment-3181866301
4. consolidate most of the gaps
Co-authored-by: Wang Han <416810799@qq.com >
2025-08-16 13:11:58 +08:00
ShirkNeko
68f2f5a0ae
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
Improve and merge types that do not require hooks
Introducing the hook type prctl
These patches is based on backslashxx/KernelSU#5
Co-authored-by: Cloud_Yun <1770669041@qq.com >
Co-authored-by: Prslc <prslc113@gmail.com >
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com >
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com >
2025-08-14 22:19:07 +08:00
ShirkNeko
a9e3c1cc8f
kermel: Refactoring and separating dynamic signature-related structures and functions and implement hot-signature updates
2025-08-03 22:51:38 +08:00
ShirkNeko
dd4cf956dd
kernel: bump KSU_VERSION_API to 3.1.8
2025-07-21 21:24:32 +08:00
ShirkNeko
6bbb47bad4
kernel: bump KSU_VERSION to 3.1.7
2025-06-30 17:05:44 +08:00
rsuntk
f820b9aaa8
kernel: phase out devpts_hook
...
* Since it's interceptable from LSM Hook,
then we just need to remove ksu_handle_devpts and
make a decoy for it.
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-06-27 12:26:55 +08:00
古塵
f1ba7127b8
kernel: refactor CMD_GET_FULL_VERSION to safely initialize version string ( #220 )
...
Use strscpy()/strlcpy() to populate the version buffer in CMD_GET_FULL_VERSION
instead of relying on uninitialized memory. This ensures the returned string
is null-terminated and avoids exposing garbage data to user space.
Signed-off-by: schqiushui <orochi9999@gmail.com >
2025-06-27 00:26:17 +08:00
ShirkNeko
1a43244288
kernel/Makefile: enhance version retrieval logic with GitHub commit count
2025-06-24 23:12:42 +08:00
ShirkNeko
8752b82fdc
kernel: Rewrite kernle version code management
...
Co-authored-by: lamadaemon <i@lama.icu >
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com >
2025-06-24 20:12:36 +08:00
Prslc
ddea10e0d8
Kernel: use main branch commit count for consistent versioning ( #209 )
2025-06-23 20:04:50 +08:00
ShirkNeko
4c4dce98f4
kernel/Makefile: check kernelsu driver version from online git repo first, if fails then check local .git and if that also fails then use hardcoded fallback
...
Co-authored-by: rifsxd <rifat.44.azad.rifs@gmail.com >
2025-06-21 17:13:42 +08:00
rsuntk
ea7e2f4db6
kernel: allow GKI kprobes to use LSM hook for ksu_handle_devpts
...
* Also minor changes on comments
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-06-20 00:28:20 +08:00
rsuntk
8987312fc1
[skip ci] kernel: just search for ksu_handle_devpts
...
* only to make 100% sure?
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-06-19 18:23:17 +08:00
backslashxx
2394fc67fc
kernel: intercept devpts via security_inode_permission LSM
...
* This changes:
+ Avoid conflicts with other devpts hooks.
+ We keep pts_unix98_pre for KPROBES for simplifying things.
Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com >
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id >
2025-06-19 18:23:03 +08:00
rsuntk
71bb5a3d3b
kernel: kernel_compat: Remove inline get_cred_rcu
...
Since commit:
kernel: core_hook: switch to prepare_creds (c58e102)
get_cred_rcu is no longer needed.
Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com >
2025-06-11 14:50:52 +08:00
rsuntk
3b8445cdaa
kernel: Remove more stray backslash in grep regex and move path_umount as optional backport
2025-06-07 00:35:23 +08:00
Tashfin Shakeer Rhythm
6225985f6f
kernel: Makefile: Remove stray backslash from path_umount grep regex ( #103 )
...
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com >
2025-06-07 00:35:14 +08:00
rsuntk
98d25694dc
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 14:33:05 +08:00
ShirkNeko
0973cd1ae0
kernel: handle samsung selinux driver
...
* Some samsung kernel source have SEC_SELINUX_PORTING_COMMON
* This commit mayfix false warning to sepolicy.
Mayfix: I haven't test it yet
Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com >
2025-05-12 19:29:25 +08:00
ShirkNeko
037c5b6c73
kernel: rename KernelSU to SukiSU and update versioning logic
2025-05-10 14:12:48 +08:00
ShirkNeko
9d920e7cc5
kernel: added compatibility for non-GKI devices
...
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-05-10 13:19:30 +08:00
ShirkNeko
acf2e1a5ec
Update KSU_GIT_VERSION to use the master branch count and change the KernelSU manager name to SukiSU
2025-04-21 17:33:29 +08:00
ShirkNeko
33dd0ca16b
Add check for GKI version and KERNEL_TYPE setting
2025-04-19 21:44:41 +08:00
ShirkNeko
a7c557222c
修复Makefile中KPM状态信息的重复输出
2025-03-31 20:27:28 +08:00
ShirkNeko
074903a299
更新支持的非官方管理器信息,添加 udochina
2025-03-30 19:50:14 +08:00
ShirkNeko
0db25f14f1
添加 KPM 状态信息输出,并更新支持的非官方管理器信息
2025-03-30 19:45:10 +08:00
ShirkNeko
562baac934
添加 KernelSU KPM 功能配置选项
2025-03-30 02:23:01 +08:00
ShirkNeko
8972327faa
manager: add KPM module with control codes and compact symbol handling
2025-03-29 21:04:54 +08:00
ShirkNeko
ff99ab8e62
Changing the custom background expand more options logic
...
Co-authored-by:ShirkNeko <ShirkNeko@alone2832165@gmail.com >
2025-03-22 16:37:30 +08:00
ShirkNeko
ba26677cfc
Merge some files and rewrite the update history
2025-03-22 14:09:21 +08:00
5ec1cff
ef037b86a5
setup my sign key
2025-03-08 23:47:55 +08:00