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: <20250728144541.004f380a@jic23-huawei>
Date: Mon, 28 Jul 2025 14:45:41 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Akshay Jindal <akshayaj.lkd@...il.com>
Cc: anshulusr@...il.com, dlechner@...libre.com, nuno.sa@...log.com,
 andy@...nel.org, shuah@...nel.org, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: light: ltr390: Add conditional data freshness
 check with sysfs control

On Mon, 28 Jul 2025 01:42:19 +0530
Akshay Jindal <akshayaj.lkd@...il.com> wrote:

> On Fri, Jul 25, 2025 at 12:24 AM Akshay Jindal <akshayaj.lkd@...il.com> wrote:
> >
> > I agree that this will break the user behaviour.
> > Before dumping this off, I wanted to explore an idea.
> > What if this remains disabled by default, i.e. data->data_fresh_check_en = 0;
> > So this way the regular sensor read_data calls will not break, and
> > based on demand,
> > the application can configure the driver to check for data freshness,
> > by toggling the sysfs attribute to 1.
> > i.e. echo 1 | sudo tee /sys/bus/iio/devices/iio\:device0/data_fresh_check_enable
> >  
> Hi,
> Is there any feedback on this?

It's a fairly esoteric interface in general. I'm not yet convinced there
is a reason to have such an indicator at all. Key here is that custom ABI
is (more or less) unused ABI that bit rots.

So I think there are three possible paths forwards
- Harden whatever algorithm you are feeding this data to so that it doesn't
  matter if you get occasional duplicate data. i.e. make it a userspace problem.
- Handle the complexity of a buffered interface with freshness guarantee.
  Basically that means polling for new data - typically checking at double
  the expected sampling frequency and only pushing to the buffers if the
  data is fresh.
- Propose generic support for such an indicator and show that it is useful
  for a couple of devices and how we'd retrofit into existing drivers
  cleanly.

Jonathan

> 
> Thanks,
> Akshay.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ