Commit Graph

67 Commits

Author SHA1 Message Date
Rifat Azad
d88bffdba2 kernel: bumped version 12800 2025-07-18 01:06:40 +06:00
Rifat Azad
278b1226dc kernel: bumped version 2025-07-16 22:37:16 +06:00
Rifat Azad
e4a6ade958 kernel/Makefile: hardcore driver version 2025-07-16 01:39:55 +06:00
Rifat Azad
6fe4fcbce0 kernel: susfs 1.5.9 a13-5.15 patch 2025-07-15 22:53:17 +06:00
Rifat Azad
bd03c296a1 kernel/Makefile: remove redundant get_cred_rcu backports 2025-07-14 20:11:13 +06:00
Rifat Azad
b97fc2bec2 Revert "kernel/Makefile: check kernelsu driver version from online git repo first, if fails then check local .git and if that also fails then use hardcoded fallback"
This reverts commit a37f398cc7.

- this is a very flawed logic for when we try to build with release tags or specific commit hashes instead of latest commit, the online logic will always append latest version instead of the actual version of code (i.e release tags or commit hashes)
2025-07-05 17:35:25 +06:00
Rifat Azad
a37f398cc7 kernel/Makefile: check kernelsu driver version from online git repo first, if fails then check local .git and if that also fails then use hardcoded fallback 2025-06-14 22:52:10 +06:00
rifsxd
5435992911 kernel: KernelSU-Next version fallback set to 11998 2025-02-06 17:58:00 +06:00
backslashxx
ae36e2085c kernel: handle optional backports (#99)
Cherry pick from 8bb9518060 a4a7db7f40

Backporting is cool, but not everyone has the skills for it.
This commit does NOT make it required, but it will allow compiler
to use whats in-kernel if it exists.

The following are backportable:
 - kernel_read / kernel_write
 	< 4.14, backport chain, tested on 4.9
 	e13ec939e9
	bdd1d2d3d2
	c41fbad015
	ac452acae1

 - strncpy_from_user_nofault
 	for 5.4, apply: bd88bb5d40
 	for 4.x, apply: 424e21f3b0
 	for any failures, just SKIP THIS or check dependency chain of, 3d7081822f
 		this got backported to v4.4.236, v4.9.236, v4.14.197, v4.19.144

- hint, `curl $url.patch | git am`

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-01-28 14:53:35 +06:00
Rifat Azad
14624ea966 kernel: dynamic get_cred_rcu patch for appropriate atomic function and apply patch accordingly 2025-01-17 15:34:34 +06:00
Rifat Azad
6f6dd29306 kernel: auto backport get_cred_rcu 2025-01-16 19:42:38 +06:00
rsuntk
0ada4ee5d4 kernel: improve get_cred_rcu guard
Signed-off-by: rsuntk <rissu.ntk@gmail.com>
2025-01-16 14:32:04 +06:00
rsuntk
3b045f6c16 kernel: Add entries
Signed-off-by: rsuntk <rissu.ntk@gmail.com>
2025-01-16 14:31:31 +06:00
rifsxd
5982cdb61d source: minor cleanup 2025-01-01 21:19:50 +06:00
rifsxd
4a07ce7d0b kernel: removed KSU (official) v2 signature size/hash 2024-12-31 11:02:34 +06:00
Rifat Azad
79d4f99cf4 kernel: small adjustment 2024-12-24 23:31:25 +06:00
Rifat Azad
af5496de80 kernel: auto backport path_umount and can_umount 2024-12-24 08:25:46 +06:00
Rifat Azad
8fbddc959a Revert "kernel: added susfs v1.5.3"
This reverts commit bdf81c0880.
2024-12-24 08:21:10 +06:00
Rifat Azad
bdf81c0880 kernel: added susfs v1.5.3 2024-12-24 07:34:30 +06:00
Rifat Azad
1f58c7bf12 kernel: KSU_NEXT v2 signature size/hash added 2024-12-24 06:59:24 +06:00
Rifat Azad
1a84f69f5c Revert "[1.0] Drop Non-GKI Support (#1483)"
This reverts commit 97d70b40fc.
2024-12-24 06:54:08 +06:00
Rifat Azad
8d2b017c96 kernel: sync with upstream 2024-12-24 06:53:54 +06:00
Rifat Azad
3fd1cf6329 kernel: rename KernelSU -> KernelSU-Next 2024-12-21 02:12:29 +06:00
Rifat Azad
fd1f829db6 kernel: auto backport path_umount to fs/namespace.c at build time 2024-12-18 21:34:04 +06:00
Rifat Azad
629d878558 kernel: New KSU_NEXT size/hash 2024-12-18 18:03:25 +06:00
rifsxd
57bffb5e7c kernel: fix missing endif in Makefile 2024-12-18 02:26:09 +06:00
backslashxx
36fb6085ef kernel: require path_umount backporting
Most kernel builders have to touch their kernel source code anyway so
we might as well tell them to backport path_umount to achieve some sort
of feature parity.

This enforces a path_umount backport, not a suggestion.
Its a requirement from now on.

You will backport path_umount and you will like it.
2024-12-17 22:45:23 +06:00
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