16 Commits

Author SHA1 Message Date
weishu
a22959beae
kernel: harden the signature check (#1027) 2023-10-11 02:53:11 -05:00
longhuan1999
54ee400dc5
kernel: Adapt to low version Android init process (#973)
1. Adapt to low version Android init process
2. Add stop hook output
3. Fix output with missing line breaks
2023-10-02 12:00:24 +08:00
4qwerty7
c0066b68f5
kernel: support the case that init_task.mnt_ns != zygote.mnt_ns(WSA) (#698)
Basic support for the case that init_task.mnt_ns != zygote.mnt_ns(WSA),
just copy nsproxy and fs pointers for solve #276.

Note the copy in `apk_sign.c` is not required but suggested for
secure(ensure the checked mnt_ns is what ns android running, not created
by user, although many distributions does not have user ns.).

Tested with latest release on Win10 19045.3086(with WSAPatch).

Further review required for:
- [x] Security of this operation (without locking).
- [x] The impact of these modifications on other Android distributions.
2023-07-02 00:20:01 +08:00
rhjdvsgsgks
5c3df7e7a5
kernel: make some compiler happy again (#279)
e743722449
still not fix #252
2023-02-26 22:08:50 +08:00
weishu
683ba112aa kernel: add prefix to avoid symbol confliction 2023-02-20 18:51:59 +07:00
weishu
e743722449 kernel: make some compiler happy 2023-02-20 18:51:59 +07:00
weishu
388d2b0b59 kernel: disable inofity for fd opened for manager 2023-02-12 12:15:58 +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
06aaae1335
kernel: fix missing log tag (#117) 2023-01-25 22:24:00 +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
Ylarod
a30aab1da6
[skip ci] minor fixup (#72)
1. update README_CN.md
2. indent fixup
2023-01-15 17:05:08 +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
weishu
b427c86ab3 misc: code format(use kernel code stype: https://www.kernel.org/doc/html/v6.1/process/coding-style.html 2022-12-27 18:21:10 +07: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
tiann
210d36f91c
kernel: use release sign 2022-12-10 22:13:38 +08:00
tiann
51c84400cf
Init 2022-12-09 22:04:40 +08:00