Bug 218041
Summary: | Buffer overrun in devfreq trans_stat_show() | ||
---|---|---|---|
Product: | Power Management | Reporter: | tnifc |
Component: | cpufreq | Assignee: | linux-pm (linux-pm) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | ansuelsmth, cwchoi00 |
Priority: | P3 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
tnifc
2023-10-23 14:06:45 UTC
Christian, could you take a look please? CC'ing Chanwoo as well. Can you describe the amount of frequency? An easy fix would be truncating the output but I don't think it would be a correct fix... If there isn't a bug in how the char are count I feel like the only solution is moving this to debugfs where there isn't the PAGE_SIZE limit. (In reply to Christian Marangi (Ansuel) from comment #3) > Can you describe the amount of frequency? There are 20 available frequencies on the Tegra 30 "Ouya" device. $ cat /sys/class/devfreq/6000c800.actmon/available_frequencies 12750000 25500000 27000000 51000000 54000000 102000000 108000000 204000000 266500000 333500000 375000000 400000000 416000000 450000000 500000000 533000000 625000000 667000000 750000000 800000000 Thanks for the report. I checked how the equivalent function for cpufreq works and as I tought it does fail the thing to write exceed PAGE_SIZE. I sent a patch upstream that fix the missing check. sysfs stuff is ABI so moving this to debugfs is a no go (due to we don't break userspace rule) so this is the only solution currently. If accepted, it will be queued for stable backport. BTW this has been fixed upstream and got backported. This can be closed as fixed. Thanks. |