Skip to content

Conversation

@F-19-F
Copy link
Contributor

@F-19-F F-19-F commented Feb 1, 2023

These changes make KernelSU work on kernel4.4 link.
LINUX_VERSION_CODE macro changes have been vertied on 4.4 4.9 4.14.
For kernel 4.4,just pick two commits

@F-19-F F-19-F changed the title changes for old Kernel kernel: changes for old Kernel Feb 1, 2023
@tiann tiann enabled auto-merge (squash) February 1, 2023 11:32
@tiann tiann merged commit 4f2b8b7 into tiann:main Feb 1, 2023
@ghost ghost mentioned this pull request Feb 1, 2023
tiann pushed a commit that referenced this pull request Feb 2, 2023
Signed-off-by: Ookiineko <[email protected]>
Co-authored-by: f19 <[email protected]>
Co-authored-by: Scirese <[email protected]>
tiann pushed a commit that referenced this pull request Feb 6, 2023
i didn't realize these typos in #181

Signed-off-by: Ookiineko <[email protected]>
itswill00 pushed a commit to itswill00/KernelSU-Next-4.14 that referenced this pull request Jan 19, 2025
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](F-19-F/android_kernel_oneplus_msm8998@2993524)
* [allow init exec ksud under
nosuid](F-19-F/android_kernel_oneplus_msm8998@3df9df4)
itswill00 pushed a commit to itswill00/KernelSU-Next-4.14 that referenced this pull request Jan 19, 2025
Signed-off-by: Ookiineko <[email protected]>
Co-authored-by: f19 <[email protected]>
Co-authored-by: Scirese <[email protected]>
itswill00 pushed a commit to itswill00/KernelSU-Next-4.14 that referenced this pull request Jan 19, 2025
i didn't realize these typos in tiann#181

Signed-off-by: Ookiineko <[email protected]>
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 12, 2025
Andrey0800770 pushed a commit to Andrey0800770/samsung_sdm845-kernel that referenced this pull request Feb 14, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 19, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 19, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 19, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 22, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 22, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 22, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 22, 2025
backslashxx pushed a commit to ximi-daisy-test/android_kernel_xiaomi_msm8953 that referenced this pull request Feb 22, 2025
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
Cartethyiaaa pushed a commit to Cartethyiaaa/xiaomi_kernel_surya that referenced this pull request Nov 7, 2025
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 7, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
KazuyaProject pushed a commit to KazuyaProject/kernel_xiaomi_ginkgo that referenced this pull request Nov 8, 2025
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
context: this is known by many as `selinux hook`, `4.9 hook`

add is_ksu_transition check which allows ksud execution under nosuid.
it also eases up integration on 3.X kernels that does not have check_nnp_nosuid.

Usage:
	if (is_ksu_transition(old_tsec, new_tsec))
		return 0;

on either check_nnp_nosuid or selinux_bprm_set_creds (after execve sid reset)

reference: https://github.com/backslashxx/msm8953-kernel/commits/dfe003c9fdfa394a2bffe74668987a19a0d2f546

taken from:
`allow init exec ksud under nosuid`
- LineageOS/android_kernel_oneplus_msm8998@3df9df4
- tiann#166 (comment)

250611-edit:
- remove ksu_execveat_hook entry check
- turns out some devices needs the transition for multiple times

Reported-by: edenadversary <[email protected]>
Signed-off-by: backslashxx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants