platform/x86: asus-wmi: validate custom fan curves on enable - #10
Closed
Ghoul4500 wants to merge 1 commit into
Closed
platform/x86: asus-wmi: validate custom fan curves on enable#10Ghoul4500 wants to merge 1 commit into
Ghoul4500 wants to merge 1 commit into
Conversation
Custom fan curves reach firmware unchecked, so a curve whose temperature or PWM decreases from one point to the next is accepted. The firmware does not respect such a curve: a first point of 100% followed by 50% leaves every point running at 100%. The kernel keeps reporting the points that were written, so sysfs stops describing what the fans are actually doing. Reject the curve when it is enabled. Validate on enable rather than on write because fan curves are written one point at a time and are inconsistent mid-write. Fixes: 0f0ac15 ("platform/x86: asus-wmi: Add support for custom fan curves") Reported-by: Nir Yehoshua <nir@ciphersecuritylabs.com> Signed-off-by: Ahmed Yaseen <yaseen@ghoul.dev>
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.
Validate fan curve monotonicity when enabling it. I do this on enable instead of on writing every point because mid-write the data cannot be expected to be consistent