Skip to content

Correct misdiagnosis: zpool sysfs parameter doesn't exist on some kernels - #21

Merged
modem7 merged 1 commit into
masterfrom
fix-zpool-parameter-may-not-exist
Jul 31, 2026
Merged

Correct misdiagnosis: zpool sysfs parameter doesn't exist on some kernels#21
modem7 merged 1 commit into
masterfrom
fix-zpool-parameter-may-not-exist

Conversation

@modem7

@modem7 modem7 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Corrects a wrong root-cause diagnosis from the previous fix (#18).

What was wrong: I misread /sys/kernel/security/lockdown's output format. The bracketed value ([none] integrity confidentiality) is the currently active mode — [none] means lockdown is off. I read it backwards and shipped a fix (modprobe zsmalloc) plus warning text blaming "kernel lockdown / Secure Boot," neither of which was the actual cause on pbs, samwise, or frodo.

Actual cause, confirmed via diagnostics pasted from all three real hosts: /sys/module/zswap/parameters/zpool doesn't exist on this kernel (7.0.14-8-pve) at all. ls only shows accept_threshold_percent, compressor, enabled, max_pool_percent, shrinker_enabled. dmesg shows zswap loading fine at boot (zswap: loaded using pool zstd / ... using pool lzo) with zero mention of zpool, despite zswap.zpool=zsmalloc being on the kernel cmdline. This kernel only compiles in zsmalloc — there's nothing to select, so the sysfs knob was never registered. Not a permission block, not lockdown — just a parameter that doesn't exist here.

Fix:

  • Step 3 checks the file exists before attempting to write to it, instead of always trying and treating the inevitable failure as a lockdown symptom.
  • Step 5 treats a missing zpool file as "not applicable to this kernel" rather than a configuration mismatch.
  • Result: samwise's actual live state (enabled: Y, compressor: zstd, no zpool file) now correctly reports as fully configured, instead of the false "caveat" warning from the previous version.

Test plan

  • bash -n syntax check passes
  • Traced through against actual diagnostic output pasted from pbs, samwise, and frodo — confirms this is the real cause on all three
  • Not re-run live end-to-end (no test VM currently available) — logic change only, reasoned through against real captured data instead

Previous fix (modprobe zsmalloc + blame kernel lockdown) was based on
misreading /sys/kernel/security/lockdown's output format — "[none]
integrity confidentiality" means lockdown is OFF (the bracketed value
is what's active), not that confidentiality lockdown is active. It
was never the actual cause on pbs/samwise/frodo.

Real cause, confirmed via diagnostics pasted from all three hosts:
/sys/module/zswap/parameters/zpool doesn't exist on this kernel at
all (only compressor, enabled, max_pool_percent, accept_threshold_percent,
shrinker_enabled are present), and dmesg shows zswap booting fine
without ever mentioning zpool. This kernel only compiles in zsmalloc,
so there's nothing to select — the parameter was simply never
registered, not blocked.

Now Step 3 checks the file exists before writing to it, and Step 5
treats a missing zpool file as "not applicable" rather than a
mismatch — samwise's actual state (enabled=Y, compressor=zstd, no
zpool file) now correctly reports as fully configured instead of a
false "caveat" warning.
@modem7
modem7 merged commit 987c5e7 into master Jul 31, 2026
3 checks passed
@modem7
modem7 deleted the fix-zpool-parameter-may-not-exist branch July 31, 2026 02:31
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.

1 participant