intent: follow 7.2 rename RANDOM_KMALLOC_CACHES -> KMALLOC_PARTITION_CACHES #57

Merged
zach merged 1 commit from fix-kmalloc-partition-rename into main 2026-09-14 04:49:59 +00:00
Owner

Fixes the failed v7.2.5-hardened1 build (run 3016): the fidelity assertion reported MISS CONFIG_RANDOM_KMALLOC_CACHES: want =y, got <absent>.

Cause. Upstream 7.2 renamed RANDOM_KMALLOC_CACHES → KMALLOC_PARTITION_CACHES and split it into a mode choice (KMALLOC_PARTITION_RANDOM, the former behaviour, or KMALLOC_PARTITION_TYPED via Clang ≥ 22 alloc tokens). The old symbol is a promptless transitional stub, so olddefconfig dropped our pin.

Fix.

  • configs/intent.config: pin KMALLOC_PARTITION_CACHES=y and KMALLOC_PARTITION_RANDOM=y. The mode is pinned explicitly because the choice defaults to TYPED whenever the compiler advertises alloc-token support; we build with GCC and a toolchain change should not flip a hardening mode unreviewed. Matches anthraxx 7.2.5.hardened1-1.
  • configs/POLICY.md: entry renamed, rename explained. Parity check passes locally.

Why the seed-bump PR said "no hardening-relevant changes". tools/bump-seed.sh's delta filter applies the HARDEN regex (anchored at line start for bare .config lines) to diff -u output, whose lines start with +/-. It could never match, so every seed-bump PR ever opened reported no hardening changes, including #55's 7.1 → 7.2 jump. Fixed in bump-seed.sh and reconcile-vs-anthraxx.sh by matching through the diff marker. On the real 7.1.9 → 7.2.5 seed diff the filter now prints exactly:

-CONFIG_RANDOM_KMALLOC_CACHES=y
+CONFIG_KMALLOC_PARTITION_CACHES=y
+CONFIG_KMALLOC_PARTITION_RANDOM=y

check-hardening-drift.sh feeds bare lines and was unaffected. KMALLOC_PARTITION|RANDOM_KMALLOC added to the HARDEN prefix set in all three scripts.

After merging: delete and re-cut v7.2.5-hardened1 (the tag push is the only build trigger). Independent of #56.

🤖 Generated with Claude Code

Fixes the failed `v7.2.5-hardened1` build (run 3016): the fidelity assertion reported `MISS CONFIG_RANDOM_KMALLOC_CACHES: want =y, got <absent>`. **Cause.** Upstream 7.2 renamed `RANDOM_KMALLOC_CACHES` → `KMALLOC_PARTITION_CACHES` and split it into a mode choice (`KMALLOC_PARTITION_RANDOM`, the former behaviour, or `KMALLOC_PARTITION_TYPED` via Clang ≥ 22 alloc tokens). The old symbol is a promptless transitional stub, so `olddefconfig` dropped our pin. **Fix.** - `configs/intent.config`: pin `KMALLOC_PARTITION_CACHES=y` and `KMALLOC_PARTITION_RANDOM=y`. The mode is pinned explicitly because the choice defaults to TYPED whenever the compiler advertises alloc-token support; we build with GCC and a toolchain change should not flip a hardening mode unreviewed. Matches anthraxx 7.2.5.hardened1-1. - `configs/POLICY.md`: entry renamed, rename explained. Parity check passes locally. **Why the seed-bump PR said "no hardening-relevant changes".** `tools/bump-seed.sh`'s delta filter applies the `HARDEN` regex (anchored at line start for bare `.config` lines) to `diff -u` output, whose lines start with `+`/`-`. It could never match, so every seed-bump PR ever opened reported no hardening changes, including #55's 7.1 → 7.2 jump. Fixed in `bump-seed.sh` and `reconcile-vs-anthraxx.sh` by matching through the diff marker. On the real 7.1.9 → 7.2.5 seed diff the filter now prints exactly: ``` -CONFIG_RANDOM_KMALLOC_CACHES=y +CONFIG_KMALLOC_PARTITION_CACHES=y +CONFIG_KMALLOC_PARTITION_RANDOM=y ``` `check-hardening-drift.sh` feeds bare lines and was unaffected. `KMALLOC_PARTITION|RANDOM_KMALLOC` added to the `HARDEN` prefix set in all three scripts. **After merging:** delete and re-cut `v7.2.5-hardened1` (the tag push is the only build trigger). Independent of #56. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
intent: follow 7.2 rename RANDOM_KMALLOC_CACHES -> KMALLOC_PARTITION_CACHES
All checks were successful
validate / pycompile (pull_request) Successful in 4s
validate / intent-matches-policy (pull_request) Successful in 4s
validate / dep-list-parity (pull_request) Successful in 3s
validate / seed-pins-well-formed (pull_request) Successful in 7s
validate / escape-hatches-are-plumbed (pull_request) Successful in 3s
validate / container-digests-pinned (pull_request) Successful in 3s
validate / workflow-shell (pull_request) Successful in 9s
validate / shellcheck (pull_request) Successful in 9s
validate / yamllint (pull_request) Successful in 9s
validate / workflow-expressions (pull_request) Successful in 4s
ee1cd2716a
The first v7.2.5-hardened1 build (run 3016) failed the fidelity assertion:
  MISS CONFIG_RANDOM_KMALLOC_CACHES: want =y, got <absent>

Upstream 7.2 renamed RANDOM_KMALLOC_CACHES to KMALLOC_PARTITION_CACHES and
split the mechanism into a mode choice (KMALLOC_PARTITION_RANDOM, the former
behaviour, or KMALLOC_PARTITION_TYPED via Clang >= 22 alloc tokens); the old
symbol is now a promptless transitional stub, so olddefconfig dropped it.

  - configs/intent.config: pin KMALLOC_PARTITION_CACHES=y and
    KMALLOC_PARTITION_RANDOM=y. The mode is pinned explicitly because the
    choice defaults to TYPED whenever the compiler advertises alloc-token
    support; we build with GCC, and a toolchain change should not flip a
    hardening mode unreviewed. Matches anthraxx 7.2.5.hardened1-1.
  - configs/POLICY.md: entry renamed and the rename explained.

Why nobody saw it coming: tools/bump-seed.sh's "kconfig delta
(hardening-relevant only)" filter applies HARDEN -- a regex anchored at
line start for bare .config lines -- to `diff -u` output, whose lines begin
with +/-. It could never match, so every seed-bump PR (including #55's
7.1 -> 7.2 jump) reported "no hardening-relevant changes". Fixed in
bump-seed.sh and reconcile-vs-anthraxx.sh by matching through the diff
marker; on the real 7.1.9 -> 7.2.5 seed diff the filter now prints
exactly the three lines above. check-hardening-drift.sh feeds bare lines
and was unaffected. KMALLOC_PARTITION|RANDOM_KMALLOC added to the HARDEN
prefix set in all three scripts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zach merged commit 51b838ce24 into main 2026-09-14 04:49:59 +00:00
zach deleted branch fix-kmalloc-partition-rename 2026-09-14 04:49:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
unredacted/linux-hardened-unredacted!57
No description provided.