Ubuntu16.04.03: ISAv3 initialize MMU registers before setting partition table

Bug #1736145 reported by bugproxy on 2017-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
High
Canonical Kernel Team
linux (Ubuntu)
High
Joseph Salisbury
Artful
High
Joseph Salisbury
Bionic
High
Joseph Salisbury

Bug Description

== SRU Justification ==
Kexec can leave MMU registers set, PIDR in particular, when booting the
new kernel. The boot sequence does not zero PIDR ever, and it only gets
changed as CPUs first switch to userspace processes. This can leave a
window where speculative accesses from a CPU to quadrant 0 can pick up
translations in the partition table that may be set up for processes
running on other CPUs. These cached translations will not be involved in
the invalidation protocol, so we can end with stable TLB and PWC.

This commit was included in mailine as of v4.15-rc5 and fixes commit 7e381c0ff618.

== Fix ==
commit 371b80447ff33ddac392c189cf884a5a3e18faeb
Author: Nicholas Piggin <email address hidden>
Date: Wed Dec 6 18:21:14 2017 +1000

    powerpc/64s: Initialize ISAv3 MMU registers before setting partition table

== Regression Potential ==
Low. This fix is specific to powerpc. It has also been cc'd to upstream stable,
so it has had additional upstream review.

==Original Bug Description: ==
== Comment: #0 - Breno Leitao <email address hidden> - 2017-12-04 05:50:27 ==
kexec can leave MMU registers set, PIDR in particular, when booting the
new kernel. The boot sequence does not zero PIDR ever, and it only gets
changed as CPUs first switch to userspace processes. This can leave a
window where speculative accesses from a CPU to quadrant 0 can pick up
translations in the partition table that may be set up for processes
running on other CPUs. These cached translations will not be involved in
the invalidation protocol, so we can end with stable TLB and PWC.

We need to have this patch included in Ubuntu kernel.
https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-December/166424.html

We do not have commit id, but once we have, I will post here. There is no need to include the patch prior to upstream acceptance.

== Comment: #2 - VIPIN K. PARASHAR <email address hidden> - 2017-12-04 06:57:52 ==
(In reply to comment #0)
>
> We need to have this patch included in Ubuntu kernel.
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-December/166424.html
>
> We do not have commit id, but once we have, I will post here. There is no
> need to include the patch prior to upstream acceptance.
>

.. Patch subject reads as follows:

[PATCH] powerpc/64s: ISAv3 initialize MMU registers before setting partition table

bugproxy (bugproxy) on 2017-12-04
tags: added: architecture-ppc64le bugnameltc-162133 severity-high targetmilestone-inin16043
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → linux (Ubuntu)
tags: added: triage-g
Changed in ubuntu-power-systems:
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
importance: Undecided → High
Manoj Iyer (manjo) on 2017-12-04
Changed in linux (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team)
Changed in ubuntu-power-systems:
status: New → Triaged
Manoj Iyer (manjo) on 2017-12-04
Changed in linux (Ubuntu):
importance: Undecided → High
Joseph Salisbury (jsalisbury) wrote :

I don't see the patch in linux-next yet. Can you post a comment here when the patch lands upstream? When it does, I'll build test kernels and start the SRU process.

Changed in linux (Ubuntu):
status: New → Triaged
assignee: Canonical Kernel Team (canonical-kernel-team) → Joseph Salisbury (jsalisbury)

------- Comment From <email address hidden> 2017-12-04 11:03 EDT-------
(In reply to comment #5)
> I don't see the patch in linux-next yet. Can you post a comment here when
> the patch lands upstream? When it does, I'll build test kernels and start
> the SRU process.

Sure. I will update this bug once the patch lands upstream.

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-12-07 06:03 EDT-------
Patch made powerpc-tree now.

https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=371b80447ff33ddac392c189cf884a5a3e18faeb

tags: added: kernel-da-key
Manoj Iyer (manjo) on 2018-02-05
tags: added: triage-a
removed: triage-g
Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Artful):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Joseph Salisbury (jsalisbury) wrote :

I built an Artful test kernel with commit 371b80447ff33dd. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1736145

Can you test this kernel and see if it resolves this bug?

Note, to test this kernel, you need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance!

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-02-05 12:40 EDT-------
(In reply to comment #9)
> I built an Artful test kernel with commit 371b80447ff33dd. The test kernel
> can be downloaded from:
> http://kernel.ubuntu.com/~jsalisbury/lp1736145
>
> Can you test this kernel and see if it resolves this bug?

Yes. I just installed it here and I can't see the problem:

$ uname -a
Linux 1604 4.13.0-32-generic #35~lp1736145 SMP Mon Feb 5 17:01:30 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

Thanks!

Manoj Iyer (manjo) on 2018-02-12
tags: added: triage-g
removed: triage-a
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Manoj Iyer (manjo) on 2018-03-05
Changed in ubuntu-power-systems:
status: Triaged → Fix Committed
Stefan Bader (smb) 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-artful' to 'verification-done-artful'. If the problem still exists, change the tag 'verification-needed-artful' to 'verification-failed-artful'.

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-artful
Launchpad Janitor (janitor) wrote :
Download full text (18.9 KiB)

This bug was fixed in the package linux - 4.13.0-38.43

---------------
linux (4.13.0-38.43) artful; urgency=medium

  * linux: 4.13.0-38.43 -proposed tracker (LP: #1755762)

  * Servers going OOM after updating kernel from 4.10 to 4.13 (LP: #1748408)
    - i40e: Fix memory leak related filter programming status
    - i40e: Add programming descriptors to cleaned_count

  * [SRU] Lenovo E41 Mic mute hotkey is not responding (LP: #1753347)
    - platform/x86: ideapad-laptop: Increase timeout to wait for EC answer

  * fails to dump with latest kpti fixes (LP: #1750021)
    - kdump: write correct address of mem_section into vmcoreinfo

  * headset mic can't be detected on two Dell machines (LP: #1748807)
    - ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
    - ALSA: hda - Fix headset mic detection problem for two Dell machines
    - ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines

  * CIFS SMB2/SMB3 does not work for domain based DFS (LP: #1747572)
    - CIFS: make IPC a regular tcon
    - CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
    - CIFS: dump IPC tcon in debug proc file

  * i2c-thunderx: erroneous error message "unhandled state: 0" (LP: #1754076)
    - i2c: octeon: Prevent error message on bus error

  * hisi_sas: Add disk LED support (LP: #1752695)
    - scsi: hisi_sas: directly attached disk LED feature for v2 hw

  * EDAC, sb_edac: Backport 1 patch to Ubuntu 17.10 (Fix missing DIMM sysfs
    entries with KNL SNC2/SNC4 mode) (LP: #1743856)
    - EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode

  * [regression] Colour banding and artefacts appear system-wide on an Asus
    Zenbook UX303LA with Intel HD 4400 graphics (LP: #1749420)
    - drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA

  * DVB Card with SAA7146 chipset not working (LP: #1742316)
    - vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems

  * [Asus UX360UA] battery status in unity-panel is not changing when battery is
    being charged (LP: #1661876) // AC adapter status not detected on Asus
    ZenBook UX410UAK (LP: #1745032)
    - ACPI / battery: Add quirk for Asus UX360UA and UX410UAK

  * ASUS UX305LA - Battery state not detected correctly (LP: #1482390)
    - ACPI / battery: Add quirk for Asus GL502VSK and UX305LA

  * support thunderx2 vendor pmu events (LP: #1747523)
    - perf pmu: Extract function to get JSON alias map
    - perf pmu: Pass pmu as a parameter to get_cpuid_str()
    - perf tools arm64: Add support for get_cpuid_str function.
    - perf pmu: Add helper function is_pmu_core to detect PMU CORE devices
    - perf vendor events arm64: Add ThunderX2 implementation defined pmu core
      events
    - perf pmu: Add check for valid cpuid in perf_pmu__find_map()

  * lpfc.ko module doesn't work (LP: #1746970)
    - scsi: lpfc: Fix loop mode target discovery

  * Ubuntu 17.10 crashes on vmalloc.c (LP: #1739498)
    - powerpc/mm/book3s64: Make KERN_IO_START a variable
    - powerpc/mm/slb: Move comment next to the code it's referring to
    - powerpc/mm/hash64: Make vmalloc 56T on hash

  * ethtool -p fails to light NIC LED on HiSilicon D05 systems (LP: #1748567)
    - net...

Changed in linux (Ubuntu Artful):
status: Fix Committed → Fix Released
Manoj Iyer (manjo) wrote :

Marking bionic fix-released since the patch identified here is already in master
371b80447ff3 powerpc/64s: Initialize ISAv3 MMU registers before setting partition table

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers