Re: [PATCH 4.19 034/133] iio:humidity:hts221 Fix alignment and data leak issues
From: Pavel Machek
Date: Wed Jul 22 2020 - 07:28:41 EST
Hi!
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> commit 5c49056ad9f3c786f7716da2dd47e4488fc6bd25 upstream.
>
> One of a class of bugs pointed out by Lars in a recent review.
> iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
> to the size of the timestamp (8 bytes). This is not guaranteed in
> this driver which uses an array of smaller elements on the stack.
I don't see documentation explaining alignment issues with
iio_push_to_buffers_with_timestamp(). Perhaps comment near that
function should explain that?
And as it seems to be common problem, perhaps
iio_push_to_buffers_with_timestamp should check alignment of its
arguments?
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: PGP signature