lkml.org 
[lkml]   [2020]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2020-07-22 13:29    [W:0.464 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site