You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(kernel): repair diagnostic RAW builds and CFI calls - #371
CI stopped before kernel runtime qualification: root test fixtures did not model Android /data ownership, and the musl fixture oracle did not select an available C compiler. Once those stages ran, six kmod-QEMU builds and all builtin builds failed on compiler-rt outline atomic helpers; older GKI kernels also panicked when the diagnostic RAW control called kallsyms-resolved helpers through jump-table CFI.
Preserve the original /data test ownership/effective-group fix and NDK clang/llvm-ar selection.
Compile kernel diagnostic atomics inline for the .ko and builtin backends.
Put only the dynamically resolved PID/clock calls behind non-inlined __nocfi boundaries, following the existing module pattern; retain the other CFI checks and RAW authorization/expiry rules.
Print the complete bounded serial log on QEMU panic/timeout so the existing CI job log retains the failure evidence.
The diagnostic run confirmed the failure at ktime_get_with_offset from vpnhide_diag_raw_show on all four 5.10/5.15 kmod variants. It also verified all three builtin variants after the atomic fix: diagnostic CI.
Testing: pinned clang-format 18 check, rustfmt check, independent diagnostic scope C test, and all 11 builtin integration tests passed locally. The final CI passed on 3f97820, including all seven kmod-QEMU variants (full, RAW and protected fixtures), all three builtin-QEMU variants, Rust, Android and the required ci-ok gate. Each builtin rebuild restored its cache and had 99.82% compiler-cache hits (only five misses). These are isolated Linux/kernel checks; no Android device acceptance is claimed.
Correction: the CI rust job runs the tests as root inside the job container. There install() pins owner uid 0, so the platform data parent has to be system:system (1000:1000), but the tempdir was root:root. The code correctly refused the group-writable 0771 dir. The test now chowns data to 1000:1000 when euid == 0, matching AOSP. The data/adb 0771 case still has to fail. The egid change from the first commit fixes the same test for unprivileged runs where uid ≠ gid. Verified locally as root and as uid 4001/gid 4118.
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
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.
CI stopped before kernel runtime qualification: root test fixtures did not model Android /data ownership, and the musl fixture oracle did not select an available C compiler. Once those stages ran, six kmod-QEMU builds and all builtin builds failed on compiler-rt outline atomic helpers; older GKI kernels also panicked when the diagnostic RAW control called kallsyms-resolved helpers through jump-table CFI.
The diagnostic run confirmed the failure at ktime_get_with_offset from vpnhide_diag_raw_show on all four 5.10/5.15 kmod variants. It also verified all three builtin variants after the atomic fix: diagnostic CI.
Testing: pinned clang-format 18 check, rustfmt check, independent diagnostic scope C test, and all 11 builtin integration tests passed locally. The final CI passed on 3f97820, including all seven kmod-QEMU variants (full, RAW and protected fixtures), all three builtin-QEMU variants, Rust, Android and the required ci-ok gate. Each builtin rebuild restored its cache and had 99.82% compiler-cache hits (only five misses). These are isolated Linux/kernel checks; no Android device acceptance is claimed.