Re: [PATCH 1/2] clk: bcm: dvp: Assign ->num before accessing ->hws

2024-04-29 Thread Stephen Boyd
Quoting Nathan Chancellor (2024-04-25 09:55:51) > Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with > __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' > with __counted_by, which informs the bounds sanitizer about the number > of elements in hws, so that it

Re: [PATCH 1/2] clk: bcm: dvp: Assign ->num before accessing ->hws

2024-04-25 Thread Florian Fainelli
On 4/25/24 09:55, Nathan Chancellor wrote: Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' with __counted_by, which informs the bounds sanitizer about the number of elements in hws, so that it can warn

Re: [PATCH 1/2] clk: bcm: dvp: Assign ->num before accessing ->hws

2024-04-25 Thread Kees Cook
On Thu, Apr 25, 2024 at 09:55:51AM -0700, Nathan Chancellor wrote: > Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with > __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' > with __counted_by, which informs the bounds sanitizer about the number > of elements

[PATCH 1/2] clk: bcm: dvp: Assign ->num before accessing ->hws

2024-04-25 Thread Nathan Chancellor
Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' with __counted_by, which informs the bounds sanitizer about the number of elements in hws, so that it can warn when hws is accessed out of bounds. As noted in