Re: [PATCH] hwmon: (pc87360) Bounds check data->innr usage

2023-11-30 Thread Guenter Roeck
On 11/30/23 12:11, Gustavo A. R. Silva wrote: On 11/30/23 14:02, Kees Cook wrote: Without visibility into the initializers for data->innr, GCC suspects using it as an index could walk off the end of the various 14-element arrays in data. Perform an explicit clamp to the array size. Silences th

Re: [PATCH] hwmon: (pc87360) Bounds check data->innr usage

2023-11-30 Thread Gustavo A. R. Silva
On 11/30/23 14:02, Kees Cook wrote: Without visibility into the initializers for data->innr, GCC suspects using it as an index could walk off the end of the various 14-element arrays in data. Perform an explicit clamp to the array size. Silences the following warning with GCC 12+: ../drivers/

[PATCH] hwmon: (pc87360) Bounds check data->innr usage

2023-11-30 Thread Kees Cook
Without visibility into the initializers for data->innr, GCC suspects using it as an index could walk off the end of the various 14-element arrays in data. Perform an explicit clamp to the array size. Silences the following warning with GCC 12+: ../drivers/hwmon/pc87360.c: In function 'pc87360_upd