Repository navigation
Conversation
Introduces a kprobe-based hook to manage shared mount propagation during boot (from post-fs-data until boot_complete), preventing the creation of mount peer groups by KernelSU modules. The hook operates on attach_recursive_mnt by temporarily clearing the MNT_SHARED flag on destination mounts and restoring it upon return. Automatically unregisters upon boot completion. Co-authored-by: JingMatrix <jingmatrix@gmail.com> Signed-off-by: JingMatrix <jingmatrix@gmail.com>
HSSkyBoy
force-pushed
the
mount_propagation
branch
from
August 27, 2026 10:15
d962817 to
7dc5531
Compare
ShirkNeko
force-pushed
the
main
branch
2 times, most recently
from
September 21, 2026 10:55
f65bc0d to
cf87e3f
Compare
ShirkNeko
force-pushed
the
main
branch
3 times, most recently
from
October 5, 2026 18:20
28cdad9 to
b48a288
Compare
Member
Author
|
[Blocked - do not merge] Blocking this until the stability concerns below are resolved. Stability comes first; this hook touches mount flags on every mount during early boot, so it needs to be provably safe on every supported kernel. Must fix
Should fix
Not built or run on a device by me; the points above come from reading the diff. |
HSSkyBoy
marked this pull request as draft
October 9, 2026 13:27
This branch has not been deployed
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.
Summary
This PR introduces a kprobe-based hook to manage shared mount propagation during the boot process, from the
post-fs-dataevent untilboot_complete. The primary goal is to prevent the creation of mount peer groups by KernelSU modules, which can be used as a vector for root detection.Original implementation by @JingMatrix (from JingMatrix/KernelSU).
Implementation Details
kernel/feature/mount_propagation.{c,h}:attach_recursive_mntvia kretprobe.MNT_SHAREDflag on destination mounts.kernel/runtime/boot_event.c:on_post_fs_data().on_boot_completed()to minimize runtime footprint.Credits
JingMatrix <jingmatrix@gmail.com>)