Correct misdiagnosis: zpool sysfs parameter doesn't exist on some kernels - #21
Merged
Merged
Conversation
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.
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
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/zpooldoesn't exist on this kernel (7.0.14-8-pve) at all.lsonly showsaccept_threshold_percent,compressor,enabled,max_pool_percent,shrinker_enabled.dmesgshows zswap loading fine at boot (zswap: loaded using pool zstd/... using pool lzo) with zero mention of zpool, despitezswap.zpool=zsmallocbeing on the kernel cmdline. This kernel only compiles inzsmalloc— 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:
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 -nsyntax check passes