| Date | Wed, 22 Jul 2020 13:28:35 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH 4.19 034/133] iio:humidity:hts221 Fix alignment and data leak issues |
| |
Hi!
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > 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 [unhandled content-type:application/pgp-signature] |