hibmc driver does not include "pci:" prefix in bus ID

Bug #1698700 reported by Daniel Axtens
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Daniel Axtens
Zesty
Fix Released
Medium
Daniel Axtens
Artful
Fix Released
Undecided
Unassigned

Bug Description

SRU Justification

[Impact]
On the HiSilicon D05 (arm64) board, X crashes when started. [0]

[Fix]
The crash is attributable to the bus ID that the hibmc driver reports for the hibmc graphics card on the board. In particular, the bus id is missing the "pci:" prefix that most other cards provide: [1]
- The busid reported on the arm64 system is "0007:a1:00.0"
- The busid reported on a amd64 system is "pci:0000:00:02.0"

X tests for this prefix. A missing prefix for PCI cards leads to an Xorg crash.

Fix this by using the set_pci_busid function from the DRM core.

[Testcase]
Successfully tested on a D05 board. [2]

[Regression Potential]
Changes are limited to the hibmc driver, so any regression should also be limited to that driver.

[Notes]
I submitted the patch upstream. However, upstream is refactoring the drm core, and set_busid is going away. That does fix this issue but the regression potential of the refactor is enormous, so this seems like the wiser approach. [3]

[0]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991
[1]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/16
[2]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/29
[3]: https://www.spinics.net/lists/dri-devel/msg143831.html

Revision history for this message
Daniel Axtens (daxtens) wrote :
tags: added: patch
Revision history for this message
Daniel Axtens (daxtens) wrote :

It looks like this will be rendered unnecessary by upcoming changes to the DRM core: http://www.spinics.net/lists/dri-devel/msg143831.html

The patch will still be needed for kernels that have already been released. I will proceed with this process.

tags: added: kernel-da-key
Daniel Axtens (daxtens)
description: updated
Seth Forshee (sforshee)
Changed in linux (Ubuntu Zesty):
assignee: nobody → Daniel Axtens (daxtens)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Stefan Bader (smb)
Changed in linux (Ubuntu Zesty):
importance: Undecided → Medium
status: New → Fix Committed
Daniel Axtens (daxtens)
description: updated
Revision history for this message
Daniel Axtens (daxtens) wrote :

Verified the proposed kernel on the D05.

tags: added: verification-done-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.0 KiB)

This bug was fixed in the package linux - 4.11.0-10.15

---------------
linux (4.11.0-10.15) artful; urgency=low

  * linux: 4.11.0-10.15 -proposed tracker (LP: #1701271)

  * Artful update to v4.11.8 stable release (LP: #1701269)
    - clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset
    - clk: sunxi-ng: v3s: Fix usb otg device reset bit
    - clk: sunxi-ng: sun5i: Fix ahb_bist_clk definition
    - xen/blkback: fix disconnect while I/Os in flight
    - xen-blkback: don't leak stack data via response ring
    - ALSA: firewire-lib: Fix stall of process context at packet error
    - ALSA: pcm: Don't treat NULL chmap as a fatal error
    - ALSA: hda - Add Coffelake PCI ID
    - ALSA: hda - Apply quirks to Broxton-T, too
    - fs/exec.c: account for argv/envp pointers
    - powerpc/perf: Fix oops when kthread execs user process
    - autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
    - fs/dax.c: fix inefficiency in dax_writeback_mapping_range()
    - lib/cmdline.c: fix get_options() overflow while parsing ranges
    - perf/x86/intel: Add 1G DTLB load/store miss support for SKL
    - perf probe: Fix probe definition for inlined functions
    - KVM: x86: fix singlestepping over syscall
    - KVM: MIPS: Fix maybe-uninitialized build failure
    - KVM: s390: gaccess: fix real-space designation asce handling for gmap
      shadows
    - KVM: PPC: Book3S HV: Cope with host using large decrementer mode
    - KVM: PPC: Book3S HV: Preserve userspace HTM state properly
    - KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1
    - KVM: PPC: Book3S HV: Context-switch EBB registers properly
    - KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit
    - KVM: PPC: Book3S HV: Save/restore host values of debug registers
    - CIFS: Improve readdir verbosity
    - CIFS: Fix some return values in case of error in 'crypt_message'
    - cxgb4: notify uP to route ctrlq compl to rdma rspq
    - HID: Add quirk for Dell PIXART OEM mouse
    - random: silence compiler warnings and fix race
    - signal: Only reschedule timers on signals timers have sent
    - powerpc/kprobes: Pause function_graph tracing during jprobes handling
    - powerpc/64s: Handle data breakpoints in Radix mode
    - Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
    - brcmfmac: add parameter to pass error code in firmware callback
    - brcmfmac: use firmware callback upon failure to load
    - brcmfmac: unbind all devices upon failure in firmware callback
    - time: Fix clock->read(clock) race around clocksource changes
    - time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
    - arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
    - target: Fix kref->refcount underflow in transport_cmd_finish_abort
    - iscsi-target: Fix delayed logout processing greater than
      SECONDS_FOR_LOGOUT_COMP
    - iscsi-target: Reject immediate data underflow larger than SCSI transfer
      length
    - drm/radeon: add a PX quirk for another K53TK variant
    - drm/radeon: add a quirk for Toshiba Satellite L20-183
    - drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
    - drm/amdgpu: adjust default display clock
   ...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.1 KiB)

This bug was fixed in the package linux - 4.10.0-28.32

---------------
linux (4.10.0-28.32) zesty; urgency=low

  * linux: 4.10.0-28.32 -proposed tracker (LP: #1701013)

  * KILLER1435-S[0489:e0a2] BT cannot search BT 4.0 device (LP: #1699651)
    - Bluetooth: btusb: Add support for 0489:e0a2 QCA_ROME device

  * aacraid driver may return uninitialized stack data to userspace
    (LP: #1700077)
    - SAUCE: scsi: aacraid: Don't copy uninitialized stack memory to userspace

  * CVE-2017-9605
    - drm/vmwgfx: Make sure backup_handle is always valid

  * CVE-2017-1000380
    - ALSA: timer: Fix race between read and ioctl
    - ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT

  * XDP eBPF programs fail to verify on Zesty ppc64el (LP: #1699627)
    - [Config] ppc64el: build for Power8 not Power7

  * AACRAID for power9 platform (LP: #1689980)
    - scripts/spelling.txt: add "therfore" pattern and fix typo instances
    - scsi: aacraid: fix PCI error recovery path
    - scsi: aacraid: pci_alloc_consistent() failures on ARM64
    - scsi: aacraid: Remove __GFP_DMA for raw srb memory
    - scsi: aacraid: Fix DMAR issues with iommu=pt
    - scsi: aacraid: Added 32 and 64 queue depth for arc natives
    - scsi: aacraid: Set correct Queue Depth for HBA1000 RAW disks
    - scsi: aacraid: Remove reset support from check_health
    - scsi: aacraid: Change wait time for fib completion
    - scsi: aacraid: Log count info of scsi cmds before reset
    - scsi: aacraid: Print ctrl status before eh reset
    - scsi: aacraid: Using single reset mask for IOP reset
    - scsi: aacraid: Rework IOP reset
    - scsi: aacraid: Add periodic checks to see IOP reset status
    - scsi: aacraid: Rework SOFT reset code
    - scsi: aacraid: Rework aac_src_restart
    - scsi: aacraid: Use correct function to get ctrl health
    - scsi: aacraid: Make sure ioctl returns on controller reset
    - scsi: aacraid: Enable ctrl reset for both hba and arc
    - scsi: aacraid: Add reset debugging statements
    - scsi: aacraid: Remove reference to Series-9
    - scsi: aacraid: Update driver version to 50834

  * arm64 kernel crashdump support (LP: #1694859)
    - memblock: add memblock_clear_nomap()
    - memblock: add memblock_cap_memory_range()
    - arm64: limit memory regions based on DT property, usable-memory-range
    - arm64: kdump: reserve memory for crash dump kernel
    - arm64: mm: add set_memory_valid()
    - arm64: mm: use phys_addr_t instead of unsigned long in __map_memblock
    - arm64: kdump: protect crash dump kernel memory
    - arm64: hibernate: preserve kdump image around hibernation
    - arm64: kdump: implement machine_crash_shutdown()
    - arm64: kdump: add VMCOREINFO's for user-space tools
    - [Config] CONFIG_CRASH_DUMP=y on arm64
    - arm64: kdump: provide /proc/vmcore file
    - Documentation: kdump: describe arm64 port
    - Documentation: dt: chosen properties for arm64 kdump
    - efi/libstub/arm*: Set default address and size cells values for an empty dtb

  * hibmc driver does not include "pci:" prefix in bus ID (LP: #1698700)
    - SAUCE: drm: hibmc: Use set_busid function from drm core

  * Processes in "D" state due to za...

Read more...

Changed in linux (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
dann frazier (dannf) wrote :

Reopening for bionic/artful, as it is reported to have regressed post-zesty.

Changed in linux (Ubuntu):
status: Fix Released → New
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1698700

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Artful):
status: New → Incomplete
no longer affects: linux
Revision history for this message
Daniel Axtens (daxtens) wrote :

The patch does seem to be in Artful, following up with the user.

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

I use this following 17.10 ISO to test this xwindow for D05 board.

http://cdimage.ubuntu.com/releases/17.10/release/ubuntu-17.10-server-arm64.iso

Then set this next step:
 sudo apt install ubuntu-desktop
 sudo reboot.

this desktop will crash.

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :
Download full text (8.5 KiB)

       Starting Hostname Service...

Ubuntu 17.10 ubuntu ttyAMA0

[ 68.535458] Internal error: Attempting to execute userspace memory: 86000004 [#1] SMP
[ 68.543288] Modules linked in: nls_iso8859_1 joydev input_leds shpchp ipmi_ssif ipmi_si ipmi_devintf ipmi_msghandler ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ppdev lp parport ip_tables x_tables autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear ses enclosure hid_generic usbhid hid marvell hibmc_drm ttm aes_ce_blk drm_kms_helper aes_ce_cipher crc32_ce syscopyarea crct10dif_ce sysfillrect sysimgblt ghash_ce fb_sys_fops sha2_ce sha1_ce drm hisi_sas_v2_hw hisi_sas_main megaraid_sas libsas ehci_platform scsi_transport_sas hns_dsaf hns_enet_drv hns_mdio hnae aes_neon_bs aes_neon_blk crypto_simd cryptd
[ 68.607986] CPU: 39 PID: 2746 Comm: llvmpipe-1 Not tainted 4.13.0-16-generic #19-Ubuntu
[ 68.615975] Hardware name: Hisilicon D05/BC11SPCD, BIOS 1.29 07/17/2017
[ 68.622576] task: ffff8013b88ecb00 task.stack: ffff8013b8dc4000
[ 68.628485] PC is at 0x0
[ 68.631026] LR is at ttm_bo_vm_fault+0x218/0x520 [ttm]
[ 68.636151] pc : [<0000000000000000>] lr : [<ffff000001dd15d8>] pstate: 00400145
[ 68.643533] sp : ffff8013b8dc7ac0
[ 68.646834] x29: ffff8013b8dc7ac0 x28: 0000000000000000
[ 68.652134] x27: 0000ffff0cb63000 x26: 0000000000000000
[ 68.657434] x25: 0000000000000208 x24: 0000000000000000
[ 68.662734] x23: ffff8013dd0e5240 x22: ffff8013dd0e50b0
[ 68.668034] x21: 0000ffff0cb53000 x20: ffff8013b324d518
[ 68.673333] x19: ffff0000093b8c08 x18: 0000000000000000
[ 68.678633] x17: 0000000000000000 x16: 0000000000000000
[ 68.683933] x15: 0000000000000000 x14: 0000000000000000
[ 68.689232] x13: 0000000000000000 x12: ffff8013ddcadc00
[ 68.694531] x11: 0000000000000000 x10: ffff8013e5f62900
[ 68.699831] x9 : 00000000001000eb x8 : ffff000001dd85b8
[ 68.705130] x7 : 0000000000000000 x6 : ffff8013b8dc7bf8
[ 68.710430] x5 : 0000000000000000 x4 : 0000000000000008
[ 68.715730] x3 : 0000ffff0cb53000 x2 : 0000000000000000
[ 68.721029] x1 : 0000000000000000 x0 : ffff8013ddcadc00
[ 68.726329] Process llvmpipe-1 (pid: 2746, stack limit = 0xffff8013b8dc4000)
[ 68.733364] Stack: (0xffff8013b8dc7ac0 to 0xffff8013b8dc8000)
[ 68.739098] 7ac0: ffff8013b8dc7c00 ffff0000082585a4 ffff8013b8dc7cc0 0000000000000d73
[ 68.746914] 7ae0: ffff8013b324d518 ffff000008e20000 ffff8013b958bfe0 ffff8013b888a580
[ 68.754731] 7b00: ffff8013b324d518 0000000000000000 ffff8013b888a5e8 0000000000000003
[ 68.762547] 7b20: ffff8013ddcadc00 ffff8013ddcadc00 0000ffff0cb53000 0000ffff0cd5b000
[ 68.770363] 7b40: ffff8013b35824b0 ffff8013b3582ed8 ffff8013b35824d0 0000000000000000
[ 68.778180] 7b60: 0000000000000000 0000000000b53000 ffff8013b888a580 0068000000000f4f
[ 68.785996] 7b80: 00000000140440fb ffff8013bd2908f0 0000000000000000 0000000000000000
[ 68.793813] 7ba0: 00000000001002f2 ffff8013b324d590 ffff8013b324d590 0000000000000000
[ 68.801629] 7bc0: ffff000001dd85b8 00000000001000eb ffff8013e5f62900 0000000000000000
[ 68.809445] 7...

Read more...

tags: removed: kernel-da-key
Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

hi daniel

please take care of this following patchset, other distro exist some xwindow crash issue.

https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

this patch will solve commit #10 bug, please merge this patch.

thank you

Revision history for this message
Daniel Axtens (daxtens) wrote : Re: [Bug 1698700] Re: hibmc driver does not include "pci:" prefix in bus ID

Hi Fred,

I will have a look soon and update you.

Regards,
Daniel

On Mon, Dec 11, 2017 at 6:00 PM, Fred Kimmy
<email address hidden> wrote:
> this patch will solve commit #10 bug, please merge this patch.
>
> thank you
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1698700
>
> Title:
> hibmc driver does not include "pci:" prefix in bus ID
>
> Status in linux package in Ubuntu:
> Incomplete
> Status in linux source package in Zesty:
> Fix Released
> Status in linux source package in Artful:
> Incomplete
>
> Bug description:
> SRU Justification
>
> [Impact]
> On the HiSilicon D05 (arm64) board, X crashes when started. [0]
>
> [Fix]
> The crash is attributable to the bus ID that the hibmc driver reports for the hibmc graphics card on the board. In particular, the bus id is missing the "pci:" prefix that most other cards provide: [1]
> - The busid reported on the arm64 system is "0007:a1:00.0"
> - The busid reported on a amd64 system is "pci:0000:00:02.0"
>
> X tests for this prefix. A missing prefix for PCI cards leads to an
> Xorg crash.
>
> Fix this by using the set_pci_busid function from the DRM core.
>
> [Testcase]
> Successfully tested on a D05 board. [2]
>
> [Regression Potential]
> Changes are limited to the hibmc driver, so any regression should also be limited to that driver.
>
> [Notes]
> I submitted the patch upstream. However, upstream is refactoring the drm core, and set_busid is going away. That does fix this issue but the regression potential of the refactor is enormous, so this seems like the wiser approach. [3]
>
> [0]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991
> [1]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/16
> [2]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/29
> [3]: https://www.spinics.net/lists/dri-devel/msg143831.html
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1698700/+subscriptions

Revision history for this message
Daniel Axtens (daxtens) wrote :

There is another bug causing an artful regression - opening a new LP for that: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1738334

Changed in linux (Ubuntu Artful):
status: Incomplete → Fix Released
Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

hi daniel:

whether this following mainline patchset have merge into this artful branch or not?
If do not merge this patchset, this xwindow function will fail it.

Can you confirm it and provide this artful branch in order to test it for me

505a1b5 vgaarb: Factor out EFI and fallback default device selection
a37c0f4 vgaarb: Select a default VGA device even if there's no legacy VGA

Revision history for this message
Daniel Axtens (daxtens) wrote :

Hi Fred,

The artful repository is git://kernel.ubuntu.com/ubuntu/ubuntu-artful.git

It contains 4417ec7a7c8d ("UBUNTU: SAUCE: PCI: Support hibmc VGA cards
behind a misbehaving HiSilicon bridge")

This was an earlier version of those patches and should allow xorg
autoconfiguration to work.

Regards,
Daniel

On Fri, Dec 15, 2017 at 6:38 PM, Fred Kimmy
<email address hidden> wrote:
> hi daniel:
>
> whether this following mainline patchset have merge into this artful branch or not?
> If do not merge this patchset, this xwindow function will fail it.
>
> Can you confirm it and provide this artful branch in order to test it
> for me
>
> 505a1b5 vgaarb: Factor out EFI and fallback default device selection
> a37c0f4 vgaarb: Select a default VGA device even if there's no legacy VGA
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1698700
>
> Title:
> hibmc driver does not include "pci:" prefix in bus ID
>
> Status in linux package in Ubuntu:
> Incomplete
> Status in linux source package in Zesty:
> Fix Released
> Status in linux source package in Artful:
> Fix Released
>
> Bug description:
> SRU Justification
>
> [Impact]
> On the HiSilicon D05 (arm64) board, X crashes when started. [0]
>
> [Fix]
> The crash is attributable to the bus ID that the hibmc driver reports for the hibmc graphics card on the board. In particular, the bus id is missing the "pci:" prefix that most other cards provide: [1]
> - The busid reported on the arm64 system is "0007:a1:00.0"
> - The busid reported on a amd64 system is "pci:0000:00:02.0"
>
> X tests for this prefix. A missing prefix for PCI cards leads to an
> Xorg crash.
>
> Fix this by using the set_pci_busid function from the DRM core.
>
> [Testcase]
> Successfully tested on a D05 board. [2]
>
> [Regression Potential]
> Changes are limited to the hibmc driver, so any regression should also be limited to that driver.
>
> [Notes]
> I submitted the patch upstream. However, upstream is refactoring the drm core, and set_busid is going away. That does fix this issue but the regression potential of the refactor is enormous, so this seems like the wiser approach. [3]
>
> [0]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991
> [1]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/16
> [2]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991/comments/29
> [3]: https://www.spinics.net/lists/dri-devel/msg143831.html
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1698700/+subscriptions

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.