Channel data values for IIO based st_sensors (st_accel, st_pressure) are incorrect

Bug #1676356 reported by Shrirang Bagul
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Critical
Shrirang Bagul
linux (Ubuntu)
Fix Released
Critical
Shrirang Bagul
Nominated for Xenial by Thadeu Lima de Souza Cascardo

Bug Description

Multi-channel reads from IIO based st_sensors (st_pressure and st_accel) drivers fail to report correct results through the devfs (/dev/iio:deviceX) interface.

Dell IoT gateways have sensors which uses IIO kernel drivers to read values from STM accelerometer (lng2dm) and pressure sensor (lps22hb). Pressure, temperature and acceleration channel values are incorrect and not in agreement with the values reported from sysfs with the present drivers in Ubuntu Xenial kernel.

This bug is used for tracking purposes, please do not triage.

CVE References

Changed in linux (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Shrirang Bagul (shrirang-bagul)
tags: added: originate-from-1671050 plano
Changed in hwe-next:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Shrirang Bagul (shrirang-bagul)
tags: added: originate-from-1671056
tags: removed: originate-from-1671056
tags: added: originate-from-1671056
description: updated
description: updated
Revision history for this message
Shrirang Bagul (shrirang-bagul) wrote :

More details:

st_pressure: lps22hb:
=====================
Temperature reading on pressure sensor LPS22HB is not correct from IIO sysfs or devfs
Reading from I2C: 37.64 °C

Reading from IIO sysfs: 0 °C
in_temp_raw: 0
in_temp_scale: 10

Reading from IIO devfs: -307200.0 °C
"0088" is the raw output for temperature got from following output:
root@caracalla:~# cat /dev/iio\:device3 | xxd -
00000000: ee14 3e66 0088 3614 3e66 0088 7914 3e66 ..>f..6.>f..y.>f
00000010: 0088 ff14 3e66 0088 ff14 3e66 0088 8214 ....>f....>f....

st_accel: lng2dm:
=================
Reading of accelerometer LNG2DM is not correct from IIO devfs

From I2C:
Reading of accel_x channel from I2C: 0.15298374 m/(s^2)
Reading of accel_y channel from I2C: 9.9439431 m/(s^2)
Reading of accel_z channel from I2C: 0.91790244 m/(s^2)

From IIO sysfs(Got by (raw + offset)*scale ):
Reading of accel_x channel from IIO sysfs: 0.152983 m/(s^2)
Reading of accel_y channel from IIO sysfs: 9.943895000000001 m/(s^2)
Reading of accel_z channel from IIO sysfs: 0.9178980000000001 m/(s^2)

From IIO devfs:
Reading of accel_x channel from IIO devfs: 0.152983 m/(s^2)
Reading of accel_y channel from IIO devfs: 0.0 m/(s^2)
Reading of accel_z channel from IIO devfs: 9.943895000000001 m/(s^2)

Have checked channel index: 0 for x, 1 for y, 2 for z

So "01" for x, "00" for y, "41" for z are the raw output got from following output:
root@caracalla:/# cat /dev/iio\:device2 | xxd -
00000000: 0100 4101 0041 0100 4101 0041 0000 4101 ..A..A..A..A..A.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (29.1 KiB)

This bug was fixed in the package linux - 4.4.0-75.96

---------------
linux (4.4.0-75.96) xenial; urgency=low

  * linux: 4.4.0-75.96 -proposed tracker (LP: #1684441)

  * [Hyper-V] hv: util: move waiting for release to hv_utils_transport itself
    (LP: #1682561)
    - Drivers: hv: util: move waiting for release to hv_utils_transport itself

linux (4.4.0-74.95) xenial; urgency=low

  * linux: 4.4.0-74.95 -proposed tracker (LP: #1682041)

  * [Hyper-V] hv: vmbus: Raise retry/wait limits in vmbus_post_msg()
    (LP: #1681893)
    - Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

linux (4.4.0-73.94) xenial; urgency=low

  * linux: 4.4.0-73.94 -proposed tracker (LP: #1680416)

  * CVE-2017-6353
    - sctp: deny peeloff operation on asocs with threads sleeping on it

  * vfat: missing iso8859-1 charset (LP: #1677230)
    - [Config] NLS_ISO8859_1=y

  * Regression: KVM modules should be on main kernel package (LP: #1678099)
    - [Config] powerpc: Add kvm-hv and kvm-pr to the generic inclusion list

  * linux-lts-xenial 4.4.0-63.84~14.04.2 ADT test failure with linux-lts-xenial
    4.4.0-63.84~14.04.2 (LP: #1664912)
    - SAUCE: apparmor: fix link auditing failure due to, uninitialized var

  * regession tests failing after stackprofile test is run (LP: #1661030)
    - SAUCE: fix regression with domain change in complain mode

  * Permission denied and inconsistent behavior in complain mode with 'ip netns
    list' command (LP: #1648903)
    - SAUCE: fix regression with domain change in complain mode

  * unexpected errno=13 and disconnected path when trying to open /proc/1/ns/mnt
    from a unshared mount namespace (LP: #1656121)
    - SAUCE: apparmor: null profiles should inherit parent control flags

  * apparmor refcount leak of profile namespace when removing profiles
    (LP: #1660849)
    - SAUCE: apparmor: fix ns ref count link when removing profiles from policy

  * tor in lxd: apparmor="DENIED" operation="change_onexec"
    namespace="root//CONTAINERNAME_<var-lib-lxd>" profile="unconfined"
    name="system_tor" (LP: #1648143)
    - SAUCE: apparmor: Fix no_new_privs blocking change_onexec when using stacked
      namespaces

  * apparmor oops in bind_mnt when dev_path lookup fails (LP: #1660840)
    - SAUCE: apparmor: fix oops in bind_mnt when dev_path lookup fails

  * apparmor auditing denied access of special apparmor .null fi\ le
    (LP: #1660836)
    - SAUCE: apparmor: Don't audit denied access of special apparmor .null file

  * apparmor label leak when new label is unused (LP: #1660834)
    - SAUCE: apparmor: fix label leak when new label is unused

  * apparmor reference count bug in label_merge_insert() (LP: #1660833)
    - SAUCE: apparmor: fix reference count bug in label_merge_insert()

  * apparmor's raw_data file in securityfs is sometimes truncated (LP: #1638996)
    - SAUCE: apparmor: fix replacement race in reading rawdata

  * unix domain socket cross permission check failing with nested namespaces
    (LP: #1660832)
    - SAUCE: apparmor: fix cross ns perm of unix domain sockets

  * Xenial update to v4.4.59 stable release (LP: #1678960)
    - xfrm: policy: init locks early
    - virtio_balloon: init ...

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in hwe-next:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.