Cherry pick from 8bb9518060a4a7db7f40
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
e13ec939e9bdd1d2d3d2c41fbad015ac452acae1
- 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>
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.
* 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
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>