Commit Graph

40 Commits

Author SHA1 Message Date
Rifat Azad
c5847b480c kernel: KSU_VERSION fallback version bumped -> 11998 2024-12-15 06:09:31 +06:00
Rifat Azad
98a692370f kernel: Removed SuSFS Patch 2024-12-13 06:21:40 +06:00
Rifat Azad
c1d4f38c19 kernel: added SuSFS version 2024-12-13 06:21:38 +06:00
Rifat Azad
e15516040d Revert "kernel: susfs: CONFIG_KSU_SUSFS_INFO syscall to get susfs version & variant"
This reverts commit b78c9adf49.
2024-12-13 06:21:38 +06:00
Rifat Azad
b78c9adf49 kernel: susfs: CONFIG_KSU_SUSFS_INFO syscall to get susfs version & variant 2024-12-06 22:48:14 +06:00
Rifat Azad
68c9317885 kernel: additional custom v2_signature size/hash 2024-12-04 16:52:55 +06:00
Rifat Azad
e1d30d55af kernel: implement SuSFS v1.5.2 2024-12-04 16:30:28 +06:00
Ylarod
97d70b40fc [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
68622eb79f Fixed link typo in kernel/Makefile (#1564)
I spotted this typo when building the Kernel.
2024-03-30 22:16:46 +08:00
weishu
478fda6712 kernel: remove become_manager and minor refactors 2024-03-24 11:20:43 +08:00
weishu
97e8842000 kernel: remove unused module_api 2024-03-21 11:36:36 +08:00
Fede2782
072021c322 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
051e7e23e8 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
cbb215ea81 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
bb94ad6d4b ci: Fix avd build (#1457) 2024-03-17 09:07:52 +08:00
Ylarod
3f5d6ca54a Build KernelSU as LKM (#1254)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-15 18:53:24 +08:00
weishu
cfc3e73c45 kernel: fix bazel build 2024-02-26 16:54:14 +08:00
weishu
09b6c219e9 kernel: Unshallow the repo in Makefile. close #1365 2024-02-26 12:23:51 +08:00
weishu
4a5cdf25f1 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
02def78124 kernel: harden the signature check (#1027) 2023-10-11 02:53:11 -05:00
セリカ・シルフィル
76685769f3 CI: Support set manager signature size and hash (#757)
close #739, close #745, close #752
2023-07-18 12:38:44 +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
a3fdcdd901 kernel: remove no-macro-redefined 2023-05-22 10:50:04 +08:00
5ec1cff
a2bf1440fd 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
a79a8c2423 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
b2b4ca9f78 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
91db0b3248 kernel: allow use without git submodule 2023-02-06 15:30:58 +07:00
weishu
eb0cac3522 kernel: make sure KernelSU is a submodule to avoding incorrect git version 2023-02-05 16:31:50 +07:00
weishu
1b2a6fb6bc kernel: unify version 2023-02-03 23:01:02 +07:00
f19
b085db50dc 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
88cccf6ce5 ci: common kernel build and embed ksud (#127) 2023-01-28 12:24:43 +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
weishu
0b14cac87e kernel: 1. use prctl lsm hook; 2. refine sucompat hook 2023-01-19 13:31:55 +07:00
weishu
7da5189377 kernel: add uid observer, correctly prune uid allowlist when app is installed/uninstalled. 2023-01-17 12:44:38 +07:00
Ylarod
9cf907ee46 [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
c4cfd45f2c 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
db153671c8 kernel: add ccflags (#11)
make `Mixing declarations and code is a C99 extension`  disappear
2022-12-20 14:04:14 +08:00
Ylarod
fcafc23a01 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
44af9c5d2b kernel: add su compat mode 2022-12-14 14:55:29 +07:00
tiann
2f6031ad67 Init 2022-12-09 22:04:40 +08:00