linux/drivers/iio/buffer
Gustavo A. R. Silva 2d255ec510 iio: hw_consumer: Use struct_size() helper in kzalloc()
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Also, address the following sparse warnings:
drivers/iio/buffer/industrialio-hw-consumer.c:63:23: warning: using sizeof on a flexible structure when using CF='-Wflexible-array-sizeof'

Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220120225243.GA37225@embeddedor
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-01-23 18:03:37 +00:00
..
industrialio-buffer-cb.c iio: buffer: Return error if no callback is given 2020-12-03 19:32:40 +00:00
industrialio-buffer-dma.c iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes 2020-04-19 16:56:31 +01:00
industrialio-buffer-dmaengine.c iio: dmaengine-buffer: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
industrialio-hw-consumer.c iio: hw_consumer: Use struct_size() helper in kzalloc() 2022-01-23 18:03:37 +00:00
industrialio-triggered-buffer.c iio: triggered-buffer: extend support to configure output buffers 2021-10-19 08:30:45 +01:00
Kconfig iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol 2020-09-29 17:27:08 +01:00
kfifo_buf.c iio: kfifo-buffer: Add output buffer support 2021-10-19 08:30:45 +01:00
Makefile iio: Add hardware consumer buffer support 2018-01-10 10:30:05 +00:00