Re: [PATCH v2 0/2] cpufreq: acpi-cpufreq: fix P-state index mismatch in freq lookups
Zhongqiu Han <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 8/13/2026 5:01 PM, lirongqing wrote: > From: Li RongQing <[email protected]> > > policy->freq_table is built with duplicate _PSS frequencies dropped, so it > no longer lines up positionally with perf->states[]; the original P-state > index is kept in freq_table[].driver_data. extract_io() and > get_cur_freq_on_cpu() indexed freq_table[] with a perf->states[] index > anyway, which can return the frequency of a wrong P-state. > > Changes since v1: > - Reword patch 1: v1 described it as an out-of-bounds read, which is wrong; > it is an index-mismatch / wrong-result bug, not a memory-safety issue. > - Add patch 2 for get_cur_freq_on_cpu(). > - Add Fixes: tags (not exact, but reasonable backport targets). Hi RongQing, The Fixes tag should point to the commit that introduced the bug. > > Li RongQing (2): > cpufreq: acpi-cpufreq: fix P-state index mismatch in extract_io() > cpufreq: acpi-cpufreq: fix P-state index mismatch in > get_cur_freq_on_cpu() > > drivers/cpufreq/acpi-cpufreq.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > -- Thx and BRs, Zhongqiu Han