5ec1cff
ef037b86a5
setup my sign key
2025-03-08 23:47:55 +08:00
Ylarod
898e9d4f8c
[1.0] Drop Non-GKI Support ( #1483 )
...
Co-authored-by: weishu <twsxtd@gmail.com >
2024-06-01 14:50:46 +08:00
P. Thịnh
13ae650445
Fixed link typo in kernel/Makefile ( #1564 )
...
I spotted this typo when building the Kernel.
2024-03-30 22:16:46 +08:00
weishu
dc5f911e43
kernel: remove become_manager and minor refactors
2024-03-24 11:20:43 +08:00
weishu
4511d4b7bf
kernel: remove unused module_api
2024-03-21 11:36:36 +08:00
Fede2782
1fc1ffe2ab
Docs: add backport notice in module umount docs ( #1476 )
...
This aims to uniform the documentation since the official introduction
of pre-GKI modules umount feature
2024-03-19 15:41:22 +08:00
dabao1955
97faab6be4
kernel: Use CONFIG_KSU=m to compile lkm ( #1468 )
...
before:
CONFIG_KSU=y
CONFIG_KSU_MODULE=y
after:
CONFIG_KSU=m
---------
Signed-off-by: dabao1955 <dabao1955@163.com >
Co-authored-by: weishu <twsxtd@gmail.com >
2024-03-19 15:40:38 +08:00
backslashxx
b4cfc2f298
Suggest non-gki kernel users to backport path_umount ( #1464 )
...
Most kernel builders have to touch their kernel source code anyway, why
not also tell them to backport path_umount so even non-gki users can
benefit from this?
I know this might be a bit controversial as this will raise the barrier
of entry, but the benefits are just so high.
Idea was from OnlyTomInSecond on KernelSU group chat way back, and it
has been on the discussions for some time
references:
https://t.me/KernelSU_group/27237/176515
https://t.me/KernelSU_group/3249/184908
https://github.com/tiann/KernelSU/discussions/955#discussioncomment-7617166
03d233db8b
https://github.com/tiann/KernelSU/pull/1060
https://elixir.bootlin.com/linux/v5.9.1/source/fs/namespace.c#L1728
https://elixir.bootlin.com/linux/v5.10.9/source/fs/namespace.c#L1730
https://elixir.bootlin.com/linux/v6.5/source/fs/namespace.c#L1887
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002492107
Kernel side change examples
5.4
961d978862
4.19
164917f56d
4.14
c07c70a0c5
4.9
195f07593a
4.4
21ea33fe41
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002424069
ofcourse having someone on 3.18 confirm this will be nice.
**PROS**: umount modules for everyone
**CONS**: barrier of entry +1
---------
Co-authored-by: Christoph Hellwig <hch@lst.de >
Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com >
Co-authored-by: Tom <31297720+onlytominsecond@users.noreply.github.com >
2024-03-18 10:27:31 +08:00
weishu
cf210d629f
ci: Fix avd build ( #1457 )
2024-03-17 09:07:52 +08:00
Ylarod
7568d55be1
Build KernelSU as LKM ( #1254 )
...
Co-authored-by: weishu <twsxtd@gmail.com >
2024-03-15 18:53:24 +08:00
weishu
796f8a448a
kernel: fix bazel build
2024-02-26 16:54:14 +08:00
weishu
afe0e691aa
kernel: Unshallow the repo in Makefile. close #1365
2024-02-26 12:23:51 +08:00
weishu
d24813b2c3
Merge pull request from GHSA-86cp-3prf-pwqq
...
* kernel: deny v2 signature blocks with incorrect number
* kernel: reject v1 signature
* kernel: enforce manager package name at compile time
* kernel: don't specific package name in source code, use it in ci
2023-10-23 12:59:30 +08:00
weishu
a22959beae
kernel: harden the signature check ( #1027 )
2023-10-11 02:53:11 -05:00
セリカ・シルフィル
be413fd147
CI: Support set manager signature size and hash ( #757 )
...
close #739 , close #745 , close #752
2023-07-18 12:38:44 +08:00
Aquarius223
0856b718de
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

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!

(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
8858cc899e
kernel: remove no-macro-redefined
2023-05-22 10:50:04 +08:00
5ec1cff
f2d8f1ee60
kernel: fix search git in path ( #363 )
...
Prevent failing to get KSU_GIT_VERSION when PATH contains space.
[Details](https://github.com/5ec1cff/my-notes/blob/master/mi-kernel.md#%E4%B8%80%E4%B8%AA%E7%BC%BA%E5%B0%91%E5%BC%95%E5%8F%B7%E5%BC%95%E5%8F%91%E7%9A%84%E8%A1%80%E6%A1%88 )
2023-04-09 17:16:35 +08:00
Shatyuka
ecd5af76ab
kernel: use git from PATH ( #316 )
...
One should have git in PATH in order to build Android kernel.
Also it's weird that git is used in `setup.sh` without absolute path.
2023-03-23 15:01:24 +08:00
f19
89394245b1
fix KSU_GIT_VERSION is not defined while importing KSU by 'git submodule add' ( #224 )
...
.git is a text file while the module is imported by 'git submodule add'.
2023-02-10 16:34:47 +08:00
weishu
c2ac548ac7
kernel: allow use without git submodule
2023-02-06 15:30:58 +07:00
weishu
0a12d0139d
kernel: make sure KernelSU is a submodule to avoding incorrect git version
2023-02-05 16:31:50 +07:00
weishu
4da829792f
kernel: unify version
2023-02-03 23:01:02 +07:00
f19
4f2b8b7077
kernel: backport to 4.4 ( #166 )
...
These changes make KernelSU work on kernel4.4
[link](https://github.com/F-19-F/android_kernel_oneplus_msm8998 ).
LINUX_VERSION_CODE macro changes have been vertied on 4.4 4.9 4.14.
For kernel 4.4,just pick two commits
* [introduce
KernelSU](2993524f2f )
* [allow init exec ksud under
nosuid](3df9df42a6 )
2023-02-01 19:48:36 +08:00
Ylarod
905c041a76
ci: common kernel build and embed ksud ( #127 )
2023-01-28 12:24:43 +08:00
Ylarod
2f970f7ab8
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
weishu
deac6163d6
kernel: 1. use prctl lsm hook; 2. refine sucompat hook
2023-01-19 13:31:55 +07:00
weishu
ab36e1fa0c
kernel: add uid observer, correctly prune uid allowlist when app is installed/uninstalled.
2023-01-17 12:44:38 +07:00
Ylarod
c3f462d260
[skip ci] kernel: allow override EXPECTED_* by env ( #67 )
...
The original one can only override by `make EXPECTED_SIZE=123 EXPECTED_HASH=123`
2023-01-15 08:29:29 +08:00
Ylarod
5e77d1cd5b
kernel: add CONFIG_KSU_DEBUG ( #19 )
...
* Kconfig: add KSU_DEBUG
* print alert on debug mode
* allow shell by default
* store signature to var on debug mode
* format
* export as module_param
* rename apk_sign to kernelsu
2023-01-14 21:45:34 +08:00
SsageParuders
92a3be8af9
kernel: add ccflags ( #11 )
...
make `Mixing declarations and code is a C99 extension` disappear
2022-12-20 14:04:14 +08:00
Ylarod
8e89b90b80
Add ci for manager and userspace ( #2 )
...
* kernel: move EXPECTED_* macro to Makefile
* manager: add sign configs
* tools: add check_v2
* CI: build manager
* CI: build userspace
2022-12-15 12:22:43 +08:00
weishu
e9ed28077f
kernel: add su compat mode
2022-12-14 14:55:29 +07:00
tiann
51c84400cf
Init
2022-12-09 22:04:40 +08:00