Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty

Bug #1769610 reported by Shrirang Bagul on 2018-05-07
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux-oem (Ubuntu)
Critical
Unassigned
Bionic
Undecided
Unassigned

Bug Description

Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty

On systems using Intel Atom (Baytrail-I) SoC's, slave devices connected on
HSUART1/2 ports are described by the ACPI BIOS as virtual hardware using
HID's INT3511/INT3512 [1].

As a consequence, HW manufacturers have complete freedom to install any
devices on-board as long as they can be accessed over serial tty
interface. Once such device is Dell Edge 3002 IoT Gateway which sports
ZigBee & GPS devices on the HS-UART ports 1 & 2 respectively.

Post 4.15, with CONFIG_SERIAL_DEV_BUS=y, serdev port controller driver
handles the enumeration for the slaves connected on these ports. Also,
/dev/ttySx device nodes for these ports are no longer exposed to the
userspace.

This driver has been submitted upstream and is under review. This issue has
been identified as a regression in 4.15 and multiple solutions are being
explored. Meanwhile, to support customer and maintain release schedule,
this driver needs to be in Ubuntu 4.15 based kernels.

The impact is limited to systems based on Intel Atom E38XX (Baytrail-I)
SoC's.

More info:
https://marc.info/?t=152455871600007&r=1&w=2

Please don't triage, this bug is for tracking purposes only.

CVE References

description: updated
Changed in linux-oem (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
description: updated
Timo Aaltonen (tjaalton) 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-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

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-bionic
tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :
Download full text (6.7 KiB)

This bug was fixed in the package linux-oem - 4.15.0-1006.9

---------------
linux-oem (4.15.0-1006.9) bionic; urgency=medium

  * linux-image-4.15.0-20-generic install after upgrade from xenial breaks
    (LP: #1767133)
    - Packaging: Depends on linux-base that provides the necessary tools

  [ Ubuntu: 4.15.0-22.24 ]

  * CVE-2018-3639 (powerpc)
    - powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit
    - stf-barrier: set eieio instruction bit 6 for future optimisations
  * CVE-2018-3639 (x86)
    - x86/nospec: Simplify alternative_msr_write()
    - x86/bugs: Concentrate bug detection into a separate function
    - x86/bugs: Concentrate bug reporting into a separate function
    - x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits
    - x86/bugs, KVM: Support the combination of guest and host IBRS
    - x86/bugs: Expose /sys/../spec_store_bypass
    - x86/cpufeatures: Add X86_FEATURE_RDS
    - x86/bugs: Provide boot parameters for the spec_store_bypass_disable
      mitigation
    - x86/bugs/intel: Set proper CPU features and setup RDS
    - x86/bugs: Whitelist allowed SPEC_CTRL MSR values
    - x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested
    - x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest
    - x86/speculation: Create spec-ctrl.h to avoid include hell
    - prctl: Add speculation control prctls
    - x86/process: Allow runtime control of Speculative Store Bypass
    - x86/speculation: Add prctl for Speculative Store Bypass mitigation
    - nospec: Allow getting/setting on non-current task
    - proc: Provide details on speculation flaw mitigations
    - seccomp: Enable speculation flaw mitigations
    - x86/bugs: Make boot modes __ro_after_init
    - prctl: Add force disable speculation
    - seccomp: Use PR_SPEC_FORCE_DISABLE
    - seccomp: Add filter flag to opt-out of SSB mitigation
    - seccomp: Move speculation migitation control to arch code
    - x86/speculation: Make "seccomp" the default mode for Speculative Store
      Bypass
    - x86/bugs: Rename _RDS to _SSBD
    - proc: Use underscores for SSBD in 'status'
    - Documentation/spec_ctrl: Do some minor cleanups
    - x86/bugs: Fix __ssb_select_mitigation() return type
    - x86/bugs: Make cpu_show_common() static
  * LSM Stacking prctl values should be redefined as to not collide with
    upstream prctls (LP: #1769263) // CVE-2018-3639
    - SAUCE: LSM stacking: adjust prctl values

linux-oem (4.15.0-1005.8) bionic; urgency=medium

  * linux-oem: 4.15.0-1005.8 -proposed tracker (LP: #1767398)
    - source built with a clean tree

  * [i915 CNL-Y] system hangs soon after bootup (LP: #1769843)
    - SAUCE: drm/i915/execlists: Use rmb() to order CSB reads

  * hts221 sensor stops working after resume from S3/S4 (LP: #1769658)
    - SAUCE: iio: humidity: hts221: Fix sensor reads after resume

  * Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty
    (LP: #1769610)
    - serdev: ttyport: release tty lock sooner on open
    - serdev: ttyport: ignore carrier detect to avoid hangups
    - serdev: ttyport: do not used keyed wakeup in write_wakeup
    - serdev: Make .remove in struct serdev_device_d...

Read more...

Changed in linux-oem (Ubuntu Bionic):
status: New → Fix Released
Changed in linux-oem (Ubuntu):
status: Confirmed → Fix Released
Denis Turischev (huso113) wrote :

Hi,
I have an Intel Atom E3930 system, /dev/ttyS6 device node is no longer exposed to the userspace starting from 4.15+ Ubuntu kernels.

BTW, it works fine on Debian kernels, for example on 4.16.0-2-amd64

I've tried supposed linux-oem-4.15.0-1006.9 but device node is still missing, although appears in /proc/tty/driver/serial

$ uname -r
4.15.0-1006-oem

$ sudo cat /proc/tty/driver/serial | grep -v unknown
serinfo:1.0 driver revision:
4: uart:16550A mmio:0x7FFFF16000 irq:4 tx:0 rx:0
5: uart:16550A mmio:0x7FFFF14000 irq:5 tx:0 rx:0 RTS|CTS|DTR
6: uart:16550A mmio:0x280000000 irq:6 tx:0 rx:0 RTS|DTR
7: uart:16550A mmio:0x7FFFF12000 irq:7 tx:0 rx:0 CTS

$ stat /dev/ttyS6
stat: cannot stat '/dev/ttyS6': No such file or directory

tags: added: verification-failed-bionic
removed: verification-done-bionic
Shrirang Bagul (shrirang-bagul) wrote :

@Denis,

Have you looked at the RFC patch submitted to linux-serial (see bug Description)?
The driver provided as fix for this issue will only attach if the BIOS on your HW describes virtual serial devices with HID's INT3511/INT3512.

Denis Turischev (huso113) wrote :

@Shrirang

Yes, I think I have:

$ sudo acpidump | grep "3511\|3512"
  39C0: 54 33 35 31 31 00 14 17 5F 53 54 41 00 A0 0C 93 T3511..._STA....
  3A90: 49 4E 54 33 35 31 32 00 14 17 5F 53 54 41 00 A0 INT3512..._STA..

Shrirang Bagul (shrirang-bagul) wrote :

@Denis,

Then the /dev/ttyS6 may now appear as /dev/ttyHSx. Can you confirm this?

Denis Turischev (huso113) wrote :

Confirm it's renamed to /dev/ttyHS1

Denis Turischev (huso113) wrote :

Is it possible to avoid such renaming?

Not as long as this regression in Serdev is fixed.

In your case, the port controller /dev/ttyS6 is actually created by the kernel, but not exposed to the user. So, ttyS6 cannot be re-claimed by the Intel HS-UART driver.

Dorian Scholz (dorianscholz) wrote :

Same problem on an IB8000 Atom Braswell board using 16.04.
Also shows the two ports when checking with acpidump, but the bionic OEM kernel mentioned here did not fix it when installed on my 16.04. It booted fine but no ttyS or ttyHS...
What really did the trick was the Debian 4.16.0-2 mentioned above as well. This one brought back the ports on the normal ttyS names on 16.04!

@Dorian,

Can you please share the acpidump for IB8000 Atom Braswell board?

Also, please check if Debian 4.16.0-2 has CONFIG_SERIAL_DEV_BUS=y enabled by default. If not, then ttySx ports on this kernel will not be claimed by the Serdev bus sub-system.

Following comment#8, changing tags back to verification-done-bionic

tags: added: verification-done-bionic
removed: verification-failed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers