Re: [PATCH] perf/x86/amd/uncore: Add flex array to struct amd_uncore_ctx

2024-05-11 Thread Kees Cook
On Sat, May 11, 2024 at 04:51:54PM +0200, Erick Archer wrote: > This is an effort to get rid of all multiplications from allocation > functions in order to prevent integer overflows [1][2]. > > The "struct amd_uncore_ctx" can be refactored to use a flex array for > the "events" member. This way,

[PATCH] perf/x86/amd/uncore: Add flex array to struct amd_uncore_ctx

2024-05-11 Thread Erick Archer
This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. The "struct amd_uncore_ctx" can be refactored to use a flex array for the "events" member. This way, the allocation/freeing of the memory can be simplified. Specifically,