Quoting Gustavo A. R. Silva (2023-10-16 15:05:27)
> `struct clk_hw_onecell_data` is a flexible structure, which means that
> it contains flexible-array member at the bottom, in this case array
> `hws`:
>
> include/linux/clk-provider.h:
> 1380 struct clk_hw_onecell_data {
> 1381 unsigned in
Quoting Gustavo A. R. Silva (2023-10-16 15:06:16)
> In order to gain the bounds-checking coverage that __counted_by provides
> to flexible-array members at run-time via CONFIG_UBSAN_BOUNDS (for array
> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions),
> we must make sure tha
Quoting Gustavo A. R. Silva (2023-10-23 19:48:00)
>
> >> Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and
> >> reset driver")
> >> Cc: sta...@vger.kernel.org
> >> Reviewed-by: Kees Cook
> >> Acked-by: Nobuhiro Iwamatsu
> >> Signed-off-by: Gustavo A. R. Silva
> >> ---
>
Quoting Gustavo A. R. Silva (2023-10-23 20:30:52)
> `struct clk_hw_onecell_data` is a flexible structure, which means that
> it contains flexible-array member at the bottom, in this case array
> `hws`:
>
> include/linux/clk-provider.h:
> 1380 struct clk_hw_onecell_data {
> 1381 unsigned in
Quoting Gustavo A. R. Silva (2023-10-23 20:31:42)
> In order to gain the bounds-checking coverage that __counted_by provides
> to flexible-array members at run-time via CONFIG_UBSAN_BOUNDS (for array
> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions),
> we must make sure tha
Quoting Jonathan Cameron (2023-10-28 08:26:38)
> On Thu, 26 Oct 2023 23:53:28 +
> Justin Stitt wrote:
>
> > We're doing some needless string copies when trying to assign the proper
> > `prop` string. We can make `prop` a const char* and simply assign to
> > string literals.
> >
> > For the cas
7;t get
"We'll get one" twice?
> another one until the "bark" interrupt is cleared and asserts again.
>
> This matches how many older Qualcomm SoCs have things configured.
>
> Fixes: 28cc13e4060c ("arm64: dts: qcom: sc7180: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson
> ---
Reviewed-by: Stephen Boyd
Quoting Justin Stitt (2023-12-11 16:42:52)
> diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c
> index 438f9c9aba6e..e3bc30b57b19 100644
> --- a/drivers/iio/proximity/sx9324.c
> +++ b/drivers/iio/proximity/sx9324.c
> @@ -873,6 +873,32 @@ static int sx9324_init_compensatio
Link:
> https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
> [1]
> Link: https://github.com/KSPP/linux/issues/90
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Justin Stitt
> ---
Reviewed-by: Stephen Boyd
Link:
> https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
> [1]
> Link: https://github.com/KSPP/linux/issues/90
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Justin Stitt
> ---
Reviewed-by: Stephen Boyd
Quoting Erick Archer (2024-01-21 06:29:46)
> As noted in the "Deprecated Interfaces, Language Features, Attributes,
> and Conventions" documentation [1], size calculations (especially
> multiplication) should not be performed in memory allocator (or similar)
> function arguments due to the risk of
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 c
Quoting Nathan Chancellor (2024-04-25 09:55:52)
> 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 c
Quoting Gustavo A. R. Silva (2024-11-14 15:55:16)
> Flexible-array member `hws` in `struct clk_hw_onecell_data` is annotated
> with the `counted_by()` attribute. This means that when memory is
> allocated for this array, the _counter_, which in this case is member
> `num` in the flexible structure,
Quoting Gustavo A. R. Silva (2024-11-14 14:49:21)
> Some heap space is allocated for the flexible structure `struct
> clk_hw_onecell_data` and its flexible-array member `hws` through
> the composite structure `struct loongson2_clk_provider` in function
> `loongson2_clk_probe()`, as shown below:
>
Quoting Haoyu Li (2024-12-03 06:29:15)
> With the new __counted_by annocation in clk_hw_onecell_data, the "num"
> struct member must be set before accessing the "hws" array. Failing to
> do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS
> and CONFIG_FORTIFY_SOURCE.
>
> Fixes:
Quoting Ethan Carter Edwards (2024-12-29 21:28:58)
> Use 2-factor multiplication argument form kcalloc() instead
> of kzalloc().
>
> Link: https://github.com/KSPP/linux/issues/162
>
> Signed-off-by: Ethan Carter Edwards
> ---
Applied to clk-next
17 matches
Mail list logo