21 Commits

Author SHA1 Message Date
ShirkNeko
4e8d699654 sporadic deadlock fix
move to always kthreaded and mitigate sporadic deadlocks on

Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-09-16 19:36:47 +08:00
ShirkNeko
f8abf097d7 kernel: Improve dynamic manager functions and logging 2025-09-14 19:31:21 +08:00
ShirkNeko
debd7d5a01 kernel: throne_tracker: offload to kthread (tiann[#2632](https://github.com/SukiSU-Ultra/SukiSU-Ultra/issues/2632))
Run throne_tracker() in kthread instead of blocking the caller.
Prevents full lockup during installation and removing the manager.

First run remains synchronous for compatibility purposes (FDE, FBEv1, FBEv2)

Features:
- run track_throne() in a kthread after the first synchronous run
- prevent duplicate thread creation with a single-instance check
- spinlock-on-d_lock based polling adressing possible race conditions.

Race conditions adressed
- single instance kthread lock, smp_mb()
- is_manager_apk, apk, spinlock-on-d_lock based polling

This is a squash of:
https://github.com/tiann/KernelSU/pull/2632

Rebased on top of
https://github.com/tiann/KernelSU/pull/2757

Original skeleton based on:
`kernelsu: move throne_tracker() to kthread`
`kernelsu: check locking before accessing files and dirs during searching manager`
`kernelsu: look for manager UID in /data/system/packages.list, not /data/system/packages.list.tmp`
0b05e927...8783badd

Co-Authored-By: backslashxx <118538522+backslashxx@users.noreply.github.com>
Co-Authored-By: Yaroslav Zviezda <10716792+acroreiser@users.noreply.github.com>
Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-09-14 11:53:33 +08:00
ShirkNeko
fc5cd9e9ed kernel: Reworking Dynamic Manager Index Configuration 2025-09-06 15:06:10 +08:00
ShirkNeko
e81989302f kernel: Remove the ksu_ prefix from the dynamic manager signature. 2025-08-25 20:17:55 +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
ShirkNeko
444aefd5d5 kernel: Modified dynamic signature All files have been renamed to the correct names: Dynamic Manager 2025-08-24 11:08:09 +08:00
backslashxx
8bc11247fe kernel: apk_sign: fix return check for ksu_sha256
upstream used IS_ERR to check for negative return and that is int,
so correct it.

This is one headache for old compilers.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-08-21 13:06:56 +08:00
ShirkNeko
cf152f368d kernel: refactor APK signature verification functions for clarity and efficiency 2025-08-17 23:12:28 +08:00
ShirkNeko
9ff53ce683 kermel: Refactoring and separating dynamic signature-related structures and functions and implement hot-signature updates 2025-08-03 22:46:00 +08:00
ShirkNeko
0b03cd9faf kernel: simplified signature verification 2025-07-09 12:07:41 +08:00
ShirkNeko
b8f9a448f2 kernel: Add the ability to get active managers for multi-manager APKs 2025-07-06 00:25:42 +08:00
ShirkNeko
f7dcc82be5 kernel: add multi-manager support 2025-07-05 21:27:04 +08:00
ShirkNeko
f5c236c925 Add dynamic signature support 2025-07-05 15:59:58 +08:00
ShirkNeko
8e192aaead kernel: add support for multi KernelSU manager in Kconfig 2025-06-27 00:10:19 +08:00
ShirkNeko
682fdf0afe Prioritize sukisu recognition.
Simplified manual hooks
2025-05-10 14:38:45 +08:00
ShirkNeko
3082a9c90b Remove the SukiSU signature checking function and update the related signature verification logic. 2025-04-11 01:25:31 +08:00
ShirkNeko
3685058b29 Add SukiSU signature checking function and adjust the related constant definition. 2025-04-10 00:43:34 +08:00
ShirkNeko
2c7920275f Add more signatures 2025-03-21 00:30:50 +08:00
Pzqqt
50e1e7da20 kernel: Refactor manager apk check method
- When we have multiple apk sign keys available, just add to `apk_sign_keys`.
- Check all apk sign keys in one open file without opening the file repeatedly.
2025-03-21 00:29:55 +08:00
樱檩殇雪
ad064fea9e add susfs-dev branch files 2025-03-17 02:48:59 +08:00