mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] OPP: fix buffer overflow in indexed freq and bandwidth reads
@ 2024-11-28 10:07 Neil Armstrong
  2024-11-28 10:07 ` [PATCH 1/2] OPP: add index check to assert to avoid buffer overflow in _read_freq() Neil Armstrong
  2024-11-28 10:07 ` [PATCH 2/2] OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized Neil Armstrong
  0 siblings, 2 replies; 10+ messages in thread
From: Neil Armstrong @ 2024-11-28 10:07 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Manivannan Sadhasivam
  Cc: Viresh Kumar, linux-pm, linux-kernel, Neil Armstrong

While fixing a crash when calling dev_pm_opp_find_bw_ceil()
because the bandwdith table wasn't initialized, it happens
the index is not checked aswell for indexed freq finds.

In order to properly fix that, pass the index to the assert
function and add a specialized assert function for freq
and bandwidth.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Neil Armstrong (2):
      OPP: add index check to assert to avoid buffer overflow in _read_freq()
      OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized

 drivers/opp/core.c | 52 ++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 36 insertions(+), 16 deletions(-)
---
base-commit: 6f3d2b5299b0a8bcb8a9405a8d3fceb24f79c4f0
change-id: 20241128-topic-opp-fix-assert-index-check-f46fe5c3c7ba

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-29  9:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-28 10:07 [PATCH 0/2] OPP: fix buffer overflow in indexed freq and bandwidth reads Neil Armstrong
2024-11-28 10:07 ` [PATCH 1/2] OPP: add index check to assert to avoid buffer overflow in _read_freq() Neil Armstrong
2024-11-29  8:40   ` Viresh Kumar
2024-11-29  8:53     ` Neil Armstrong
2024-11-29  9:04       ` Viresh Kumar
2024-11-29  9:07         ` Neil Armstrong
2024-11-28 10:07 ` [PATCH 2/2] OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized Neil Armstrong
2024-11-29  8:41   ` Viresh Kumar
2024-11-29  9:34     ` Neil Armstrong
2024-11-29  9:39       ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®