31 Commits

Author SHA1 Message Date
Rifat Azad
f08fcec777 kernel: changed constant value for CMD_HOOK_MODE to 0xC0DEAD1A and CMD_GET_MANAGER_UID to 16, to avoid future conflitcs with upstream 2025-07-10 00:50:45 +06:00
Rifat Azad
4e3f06d405 kernel: added new prctl CMD_GET_MANAGER_UID to get the uid of the crowned manager
manager: show crowned manager uid in infocard when developer options is enabled
2025-06-30 14:22:19 +06:00
rifsxd
ce37e17c87 kernel: added CMD_HOOK_MODE prctl to get the enabled su hook mode value 2025-05-21 18:07:41 +06:00
weishu
bb6c20339c kernel: add support for disable sucompat 2025-02-23 20:05:55 +06:00
weishu
2efefcea72 kernel: use library import 2024-04-27 09:55:24 +08:00
weishu
802549d8cd kernel: avoding umount when there isn't any module. close #556 2024-01-08 12:55:08 +08:00
Aquarius223
68a670ad63 kernel: Modify KERNEL_SU_VERSION logic and behavior (#696)
This patch modifies the following:
- Move the version addition logic in ksu.h to Makefile processing
- Print the current version number of KernelSU during make build

build test (normal):
 buildlog:
HOSTCC scripts/basic/bin2c Using .. as source for kernel -- KernelSU
version: 11055
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h

 KernelSU software:
  KernelSU Working Version: 11055 (v) Superusers: 0 Modules: 0


![11055](https://github.com/tiann/KernelSU/assets/47409494/10506289-04d2-41c0-bd48-bad9f0dbdec5)

build test (missing .git file):
 buildlog:
HOSTCC scripts/basic/bin2c Using .. as source for kernel
../drivers/kernelsu/Makefile:23: "KSU_GIT_VERSION not defined! It is
better to make KernelSU a git submodule!"
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h

 KernelSU software:
  KernelSU Working Version: 16 (v) Superusers: 0 Modules: 0

The current kernel version 16 is too low for the manager to function
properly. Please upgrade to version 10977 or higher!


![16](https://github.com/tiann/KernelSU/assets/47409494/9ea877a7-7b91-4a27-b6ab-58ce6e1b386f)

(cherry picked from commit 0c38a1614a77d80de752aba20908e3f9d21660a8)
Change-Id: I570f2ee33db224e1a36770f847137f290ba9bcfd

Co-authored-by: stic-server-open <1138705738@qq.com>
2023-06-28 21:45:36 +08:00
weishu
6a11cb706d kernel: bump format version to force clear allowlist, prepare to release a new version 2023-06-06 20:49:39 +08:00
weishu
fc96172655 kernel: make the profile uid, gid, capabilities really work 2023-06-04 17:29:12 +08:00
weishu
115e412cdc kernel: add more capailities 2023-06-04 16:09:27 +08:00
weishu
3a9e29f1ee kernel: Add version field for struct app_profile 2023-06-03 23:57:05 +08:00
weishu
14b1386879 kernel: support CMD_IS_UID_GRANTED_ROOT and CMD_IS_UID_SHOULD_UMOUNT 2023-06-03 22:44:01 +08:00
weishu
f8b18c06c8 kernel: minor fixes for profiles 2023-06-03 10:18:11 +08:00
weishu
e8d234ae66 kernel: baby version of profile 2023-06-03 00:01:00 +08:00
weishu
20fcc971e1 kernel: press KEY_VOLUMEDOWN over 2 seconds will enter safemode and disable all modules
Co-authored-by: Ylarod <me@ylarod.cn>
2023-02-13 21:23:28 +07:00
weishu
91db0b3248 kernel: allow use without git submodule 2023-02-06 15:30:58 +07:00
weishu
1b2a6fb6bc kernel: unify version 2023-02-03 23:01:02 +07:00
weishu
895fc30fdf kernel: version 15 2023-02-02 09:05:37 +07:00
weishu
fc3b6871dd kernel: version 14 2023-01-31 20:55:25 +07:00
weishu
df8aec5b55 kernel: bump version 13 2023-01-31 19:21:21 +07:00
weishu
3603778a8c kernel: support sepolicy 2023-01-31 18:54:31 +07:00
weishu
a2e57cbbf6 kernel: version 12 2023-01-26 16:16:00 +07:00
Ylarod
443c5867cd kernel: precise trigger timing of post-fs-data (#118)
* kernel: add report_event cmd

* ksud: report event

* kernel: trigger on_post_fs_data

* ksud: comment unused code

* [skip ci] run clang-format

Signed-off-by: Ylarod <me@ylarod.cn>

* ci: use custom key to sign official bootimgs

* format ksud

* reject non root

* remove

Signed-off-by: Ylarod <me@ylarod.cn>
2023-01-26 11:29:02 +08:00
Ylarod
b07b38c974 kernel: bump version to 11 2023-01-25 21:55:47 +08:00
Ylarod
3d07b7285b kernel: refact (#113)
* refact

* sort inlude

* update

* unregister execve kprobe

* update log

* don't unregister if not in kprobe

* opt for no kprobe

* opt for no kprobe

* stop debug

* don't forget to call ksu_uid_observer_exit

* rename core to core_hook

* direct call do_persistent_allow_list

* add prefix

* use getter, add warn

* add wrapper

* run clang-format

clang-format --style="{BasedOnStyle: InheritParentConfig, SortIncludes: true}" -i kernel/**/*.[ch]

* try fix wsa x64 build
2023-01-25 21:53:19 +08:00
Ylarod
ecfe4e9ebd kernel: allow to change manager in debug mode (#111) 2023-01-25 14:50:44 +08:00
weishu
7edf478901 kernel: bump version to 10 2023-01-24 19:49:08 +07:00
weishu
c345438b7a kernel: use rename lsm hook 2023-01-19 16:34:21 +07:00
weishu
0b14cac87e kernel: 1. use prctl lsm hook; 2. refine sucompat hook 2023-01-19 13:31:55 +07:00
weishu
a9dd171f0d kernel: unify workqueue 2023-01-18 18:37:27 +07:00
weishu
aa6ab8fcb9 kernel: don't use 0(root uid) as manager init uid 2023-01-17 13:49:30 +07:00