kernel: Synchronize with upstream (https://github.com/tiann/KernelSU/commits/main/)#1171
Merged
Conversation
Co-authored-by: Ylarod <me@ylarod.cn> Co-authored-by: Wang Han <416810799@qq.com>
Now that all sepolicy functions are called from a normal context, we can stop using GFP_ATOMIC.
- Validate `__versions` section in check_symbol to ensure lkm can be force loaded on some kernel.
After `escape_to_root`, `cred->uid` changes, but `cred->user` and `cred->ucounts` remain unchanged. Because `cred->user` does not change, `commit_creds()` does not decrement the `ucounts` associated with the original UID. When `execve` is executed afterwards, `cred->user` still does not change, but `cred->ucounts` changes. This happens because `cred->uid` is now different from `cred->ucounts->uid`. However, since `cred->user` is still unchanged, `commit_creds()` still does not decrement the original `ucounts`. After this point, it can never be decremented anymore, because `exit` will only decrease the `ucounts` of the new UID. Since the original UID’s `ucounts` increases every time `su` is executed, it will eventually exceed the limit until it reaches the `rlimit` threshold. This fixes tiann/KernelSU#3214.
Add dependency on EXT4_FS for KernelSU support for `ext4_unregister_sysfs`. Signed-off-by: shadichy <shadichy@blisslabs.org>
- Save output image when source is partition and `--flash` is not specified - Add `--out` for boot-restore, write output file if both `--flash` and `--out/--out-name` is specified
Collaborator
Author
|
Note: This excludes Magica. However, late load is in place for that work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add late-load mode support (tiann/KernelSU#3258)
kernel: enforcing selinux at late-load mode
kernel: sepolicy: use GFP_KERNEL (tiann/KernelSU#3271)
Now that all sepolicy functions are called from a normal context, we can stop using GFP_ATOMIC.
kernel: upgrade ddk, use ddk-min (tiann/KernelSU#3280)
__versionssection in check_symbol to ensure lkm can be force loaded on some kernel.kernel: Fix RLIMIT_NPROC leak on root escape (tiann/KernelSU#3286)
After
escape_to_root,cred->uidchanges, butcred->userandcred->ucountsremain unchanged. Becausecred->userdoes not change,commit_creds()does not decrement theucountsassociated with the original UID.When
execveis executed afterwards,cred->userstill does not change, butcred->ucountschanges. This happens becausecred->uidis now different fromcred->ucounts->uid. However, sincecred->useris still unchanged,commit_creds()still does not decrement the originalucounts. After this point, it can never be decremented anymore, becauseexitwill only decrease theucountsof the new UID.Since the original UID’s
ucountsincreases every timesuis executed, it will eventually exceed the limit until it reaches therlimitthreshold.This fixes tiann/KernelSU#3214.
Update KSU config to require EXT4_FS (tiann/KernelSU#3266)
Add dependency on EXT4_FS for KernelSU support for
ext4_unregister_sysfs.ksud: refine boot-patch (tiann/KernelSU#3281)
--flashis not specified--outfor boot-restore, write output file if both--flashand--out/--out-nameis specified