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]
Message-ID: <20250210190942.21ba97cc@jic23-huawei>
Date: Mon, 10 Feb 2025 19:09:42 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Hermes Zhang <chenhuiz@...s.com>
Cc: Hermes Zhang <Hermes.Zhang@...s.com>, robh@...nel.org, lars@...afoo.de,
 krzk+dt@...nel.org, kernel@...s.com, linux-kernel@...r.kernel.org,
 linux-iio@...r.kernel.org
Subject: Re: [PATCH 3/3] iio: chemical: add support for Sensirion
 SEN5x/SEN6x

On Mon, 10 Feb 2025 17:16:57 +0800
Hermes Zhang <chenhuiz@...s.com> wrote:

> Hi Jonathan,
> 
> Thanks a lot for your review. I will fix most of them in v2, just one 
> question below.
> 
> Best Regards,
> Hermes
> 
> 
> On 2025/2/9 0:15, Jonathan Cameron wrote:
> > On Thu, 6 Feb 2025 14:15:17 +0800
> > Hermes Zhang <Hermes.Zhang@...s.com> wrote:
> >
> >  
> >> +
> >> +	state->last_update = jiffies;
> >> +
> >> +	return 0;
> >> +}
> >> +
> >> +static ssize_t status_show(struct device *dev, struct device_attribute *attr,
> >> +			   char *buf)
> >> +{
> >> +	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> >> +	struct sen_common_state *state = iio_priv(indio_dev);
> >> +	int status;
> >> +	int ret;
> >> +
> >> +	ret = sen_common_status(state->client, &status);  
> > This is custom ABI. So it would need documentation and will need
> > to overcome quite a high barrier.
> >
> > Superficially this looks like debug perhaps that should be
> > in debugfs?  
> 
> The status is one of the support commands from the chip, we (from 
> userspace) could read it and notify customer if the sensor is wrong or 
> not. So it is ued in normal usage, regarding the ABI, I see your point, 
> so instead of my way, do you have any suggestion for how to handle it in 
> iio? Thanks.

What is actually reporting?  I hope something more specific than
'wrong'.  Also when do you read it?  Standard software is never going to
so you may be better of doing some scheduled reading or reading it
on the back of a channel read.  Unfortunately the nature of failure modes
is that they are not easy to describe in a generic ABI - sometimes
our best bet is to just log an error (rate limited).

Some of these look like they mean the data read is garbage when they
are happening?

Jonathan


> 
> Best Regards,
> 
> Hermes
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ