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  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:   Wed, 6 Jan 2021 10:29:17 +0000
From:   Jonathan Cameron <>
To:     Jyoti Bhayana <>
CC:     Jonathan Cameron <>,
        Hartmut Knaack <>,
        Lars-Peter Clausen <>,
        Peter Meerwald-Stadler <>,
        Mauro Carvalho Chehab <>,
        "David S. Miller" <>,
        Rob Herring <>,
        "Lukas Bulwahn" <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
Subject: Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based

On Tue, 5 Jan 2021 23:09:20 +0000
Jyoti Bhayana <> wrote:

> Hi Jonathan,
> > So, sensor_max_range can effectively be exposed as a combination of
> > scale and the *_raw_avail for a raw read (via the read_avail callback in IIO).
> > We'll ignore the fact the interface assumes a single value (so I assume symmetric?)  
> Based on the SCMI specification the sensor min range and max range are 64 bits signed number.
> looks like IIO_AVAIL_RANGE can only take the following
> types of data which all looks like 32 bit. IIO_VAL_FRACTIONAL
> also takes two int type numbers.
> How can I send 64 bit sensor range using this and read_avail callback?
> #define IIO_VAL_INT 1
> #define IIO_VAL_CHAR 12

Hmm It is a bit unfortunate that SCMI decided to pretend that real sensor resolutions were
greater than 32 bits. I doubt they will ever actually be any (as such accurate measurements
are completely pointless) and they aren't anywhere near that today.  Only way it might end
up looking a bit like that would be result of a highly non linear sensor being shoved through
an interface that pretends it isn't (goody).

Having said that, specifications are what they are and we have to cope with that.

There is no real problem with defining a new value type except for the fact that any
legacy userspace won't necessarily expect to see values that large. Given we need the full
64 bits it would have to be something like
IIO_VAL_INT_H32_L32 with the 64 bit values split up appropriately and put back together
at time of formatting.   Not particularly pretty but I'm not keep to put that much effort
in to support something like this for one driver (so not interesting in changing that
the read_raw_* interfaces)


> Thanks,
> Jyoti

Powered by blists - more mailing lists