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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Mar 2021 13:00:37 +0000
From:   "Sa, Nuno" <Nuno.Sa@...log.com>
To:     Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Jonathan Cameron <jic23@...nel.org>
CC:     "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "zzzzArdelean, zzzzAlexandru" <alexandru.Ardelean@...log.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "Bogdan, Dragos" <Dragos.Bogdan@...log.com>
Subject: RE: [PATCH v3 0/6] iio: Add output buffer support



> -----Original Message-----
> From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Sent: Monday, March 8, 2021 12:52 PM
> To: Sa, Nuno <Nuno.Sa@...log.com>; Jonathan Cameron
> <jic23@...nel.org>
> Cc: Hennerich, Michael <Michael.Hennerich@...log.com>;
> zzzzArdelean, zzzzAlexandru <alexandru.Ardelean@...log.com>;
> linux-kernel@...r.kernel.org; linux-iio@...r.kernel.org;
> lars@...afoo.de; Bogdan, Dragos <Dragos.Bogdan@...log.com>
> Subject: Re: [PATCH v3 0/6] iio: Add output buffer support
> 
> [External]
> 
> On Mon, 8 Mar 2021 10:07:05 +0000
> "Sa, Nuno" <Nuno.Sa@...log.com> wrote:
> 
> > > -----Original Message-----
> > > From: Jonathan Cameron <jic23@...nel.org>
> > > Sent: Saturday, March 6, 2021 6:35 PM
> > > To: Hennerich, Michael <Michael.Hennerich@...log.com>
> > > Cc: zzzzArdelean, zzzzAlexandru
> <alexandru.Ardelean@...log.com>;
> > > linux-kernel@...r.kernel.org; linux-iio@...r.kernel.org;
> > > lars@...afoo.de; Sa, Nuno <Nuno.Sa@...log.com>; Bogdan,
> Dragos
> > > <Dragos.Bogdan@...log.com>
> > > Subject: Re: [PATCH v3 0/6] iio: Add output buffer support
> > >
> > > On Fri, 5 Mar 2021 08:57:08 +0000
> > > "Hennerich, Michael" <Michael.Hennerich@...log.com> wrote:
> > >
> > > > Hi Jonathan and others,
> > > >
> > > > With output/dac buffer support the semantics of the
> scan_element
> > > type may change.
> > > >
> > > > Today the Format is
> [be|le]:[s|u]bits/storagebitsXrepeat[>>shift].
> > > >
> > > > While shift (if specified) is the shift that needs to be applied prior
> to
> > > masking out unused bits.
> > > >
> > > > So far so good and it sounds universal.
> > > >
> > > > However, we use the right shift (operator) for that, which makes
> > > sense for capture devices.
> > > > For output devices the more logical operator would be the left
> shift.
> > > >
> > > > I'm not proposing a new Format here. I just want to get some
> > > agreement that for an output device
> > > >
> > > > le:s12/16>>4
> > > >
> > > > is understood as a left shift of 4, since the unused bits are then
> on
> > > the LSB.
> > >
> > > Good question. Guess I wasn't thinking ahead when I came up with
> > > that :)
> > >
> > > I'm not sure I'd mind if we did decide to define a new format for
> > > output
> > > buffers. Feels like it should be easy to do.
> > >
> > > What do others think?
> > >
> >
> > I guess the most straight forward thing would be just to add a 'shift_l'
> variable
> > to 'struct scan_type'' and make sure either 'shift_l' or 'shift' is defined
> and then
> > properly export either ">>" or "<<" to userspace?
> 
> Given we already know it's an output channel, can we not just use that
> to make the decision?
> 
> Jonathan

I would argue that having two variables gives us more flexibility for whatever
the future brings us :). But if we can sanely say that an output buffer will
always use left shifts, then we could definitely use that information... I mean,
we are already doing that assumption for input buffers and right shifts...

- Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ