Skip to content

Commit

Permalink
KernelSU: 11872-klts
Browse files Browse the repository at this point in the history
This corresponds to v0.9.5 / 11872 upstream with the cherry-picks from upstream:
	Convert devpts domain to ksu_file (tiann#1801)
	throne_tracker: skip iterate if failed to open dir (tiann#1832)
	kernel: Relax dentry_path_raw compare in core_hook (tiann#2041)
	kernel/core_hook.c: use upstream ksu_umount_mnt
	kernel: require path_umount backporting

Addendums for the sake of legacy maintenance:
	treewide: tree prep for kernel-driver only
	kernel: expose allowlist workaround as Kconfig option
	kernel: selinux: add security_bounded_transition hook for < 4.14
	kernel: selinux: fix redefined KERNEL_SU_DOMAIN
	kernel/ksu.c: disable KPROBES=n warning
	KernelSU: 11872-klts

Warning:
	Kernel built with this branch will not work with the provided manager from this repo.
	Use KernelSU v1.0.1 Manager.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
  • Loading branch information
backslashxx committed Nov 27, 2024
1 parent 1bbfc5a commit 12881ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@ ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-

obj-$(CONFIG_KSU) += kernelsu.o

# .git is a text file while the module is imported by 'git submodule add'.
ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0)
$(shell cd $(srctree)/$(src); /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin [ -f ../.git/shallow ] && git fetch --unshallow)
KSU_GIT_VERSION := $(shell cd $(srctree)/$(src); /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin git rev-list --count HEAD)
# ksu_version: major * 10000 + git version + 200 for historical reasons
$(eval KSU_VERSION=$(shell expr 10000 + $(KSU_GIT_VERSION) + 200))
# hardcode!
$(eval KSU_VERSION=11872)
$(info -- KernelSU version: $(KSU_VERSION))
ccflags-y += -DKSU_VERSION=$(KSU_VERSION)
else # If there is no .git file, the default version will be passed.
$(warning "KSU_GIT_VERSION not defined! It is better to make KernelSU a git submodule!")
ccflags-y += -DKSU_VERSION=16
endif

ifeq ($(shell grep -q " current_sid(void)" $(srctree)/security/selinux/include/objsec.h; echo $$?),0)
ccflags-y += -DKSU_COMPAT_HAS_CURRENT_SID
Expand Down
2 changes: 1 addition & 1 deletion kernel/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ perform_cleanup() {
# Sets up or update KernelSU environment
setup_kernelsu() {
echo "[+] Setting up KernelSU..."
test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/tiann/KernelSU && echo "[+] Repository cloned."
test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/backslashxx/KernelSU -b 11872-klts --depth=1 && echo "[+] Repository cloned."
cd "$GKI_ROOT/KernelSU"
git stash && echo "[-] Stashed current changes."
if [ "$(git status | grep -Po 'v\d+(\.\d+)*' | head -n1)" ]; then
Expand Down

0 comments on commit 12881ea

Please sign in to comment.