lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VerichvwEOHvYYsHdYYAVJUajYk=LaO0VRpS51DgAr29A@mail.gmail.com>
Date: Sat, 10 Feb 2024 17:12:15 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Petre Rodan <petre.rodan@...dimension.ro>, linux-iio@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v2 4/4] iio: pressure: hsc030pa add triggered buffer

On Sat, Feb 10, 2024 at 5:09 PM Jonathan Cameron <jic23@...nel.org> wrote:
> On Mon, 5 Feb 2024 18:39:02 +0200
> Petre Rodan <petre.rodan@...dimension.ro> wrote:
> > On Sun, Feb 04, 2024 at 06:03:28PM +0200, andy.shevchenko@...il.com wrote:

> > > > + memcpy(&data->scan.chan[1], &data->buffer[2], 2);
> > >
> > > Hmm... We don't have fixed-size memcpy() :-(
> >
> >       __be16 *ptr;
> >
> >       ptr = (__be16 *) data->buffer;
> >       data->scan.chan[0] = *ptr;
> >       data->scan.chan[1] = *++ptr;
> >
> > is this an acceptable replacement? I do not understand that your concern was, my
> > intent was to copy exactly 2 bytes over.
>
> Andy?
>
> I'm not sure what you meant here either.

It was just a rhetorical remark, no AR implied. I.o.w. the current code is okay.

> There is an existing oddity that the read_raw deals with this as a be32 and
> masking out the right sections for each channel rather than perhaps more logical
> be16 pair here.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ