[Artful SRU] Fix capsule update regression

Bug #1746019 reported by Manoj Iyer on 2018-01-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
Manoj Iyer
Nominated for Xenial by Manoj Iyer
Artful
Undecided
Unassigned

Bug Description

[IMPACT]
Commit 82c3768b8d68 ("efi/capsule-loader: Use a cached copy of the
capsule header") refactored the capsule loading code that maps the
capsule header, to avoid having to map it several times. However,
as it turns out, the vmap() call we ended up removing did not just
map the header, but the entire capsule image, and dropping this
virtual mapping breaks capsules that are processed by the firmware
immediately (i.e., without a reboot).

[FIX]
The following patch fixes the issue
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/firmware/efi/capsule-loader.c?id=f24c4d478013d82bd1b943df566fff3561d52864

[TEST]
Please see comments below for testing information and details.

[REGRESSION POTENTIAL]
This patch fixes a regression in 4.13 and onward.

Manoj Iyer (manjo) on 2018-01-29
summary: - [Artful/Bionic] Fix capsule update regression.
+ [Artful/Bionic] Fix capsule update regression since kernel v4.13.

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 1746019

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
tags: added: artful

== Artful stock kernel ==
Fails to upgrade CAP file.

ubuntu@awrep7:~$ sudo modprobe capsule-loader
ubuntu@awrep7:~$ sudo su
root@awrep7:/home/ubuntu# cd fw/
root@awrep7:/home/ubuntu/fw# cat 0ACJA510.CAP > /dev/efi_capsule_loader
cat: write error: Invalid argument
root@awrep7:/home/ubuntu/fw#

Jan 30 16:27:20 awrep7 kernel: [ 505.615127] efi: capsule update failed

Manoj Iyer (manjo) wrote :

== Artful with patched kernel - upgrade FW ==

== update fw from OS ==
ubuntu@awrep7:~/fw$ uname -a
Linux awrep7 4.13.0-32-generic #35~lp1746019+test.1 SMP Mon Jan 29 21:45:44 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@awrep7:~/fw$ sudo modprobe capsule-loader
ubuntu@awrep7:~/fw$ sudo su
root@awrep7:/home/ubuntu/fw# cat 0ACJA520.CAP > /dev/efi_capsule_loader
root@awrep7:/home/ubuntu/fw#

== kernlog message ==
Jan 30 17:07:00 awrep7 kernel: [ 541.347822] efi: Successfully upload capsule file with reboot type 'RESET_COLD'

== perform cold reset ==
$ ipmitool -I lanplus -H 10.228.66.120 -U admin -P admin chassis power off
$ ipmitool -I lanplus -H 10.228.66.120 -U admin -P admin chassis power on

== FW upgrade in process ==
DEBUG Mode : Off
Progress: [5F]
FW Family : Qualcomm Centriq(TM) 2400
FW Version : XBL.DF.2.0.R1-00705 QDF2400_REL CRM
Build Info : 64b Dec 16 2017 00:23:59
Boot Mode : Flash update
Checkpoint 78

Bionic has this kernel patch under the 4.14 tags.

eecfbd644fb4 efi/capsule-loader: Reinstate virtual capsule mapping

summary: - [Artful/Bionic] Fix capsule update regression since kernel v4.13.
+ [Artful SRU] Fix capsule update regression since kernel v4.13.
description: updated
Manoj Iyer (manjo) on 2018-01-31
summary: - [Artful SRU] Fix capsule update regression since kernel v4.13.
+ [Artful SRU] Fix capsule update regression
Changed in linux (Ubuntu Artful):
status: New → 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
Manoj Iyer (manjo) wrote :

-- Stock 17.10 kernel --

ubuntu@awrep06:~$ uname -a
Linux awrep06 4.13.0-37-generic #42-Ubuntu SMP Wed Mar 7 14:13:33 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@awrep06:~$ sudo modprobe capsule-loader
ubuntu@awrep06:~$ sudo su
root@awrep06:/home/ubuntu# cat 0ACJA530.CAP > /dev/efi_capsule_loader
cat: write error: Invalid
root@awrep06:/home/ubuntu#

-- Proposed kernel --

ubuntu@awrep06:~$ apt policy linux-image-generic
linux-image-generic:
  Installed: 4.13.0.37.40
  Candidate: 4.13.0.38.41
  Version table:
     4.13.0.38.41 500
        500 http://ports.ubuntu.com/ubuntu-ports artful-proposed/main arm64 Packages
 *** 4.13.0.37.40 500
        500 http://ports.ubuntu.com/ubuntu-ports artful-updates/main arm64 Packages
        500 http://ports.ubuntu.com/ubuntu-ports artful-security/main arm64 Packages
        100 /var/lib/dpkg/status
     4.13.0.16.17 500
        500 http://ports.ubuntu.com/ubuntu-ports artful/main arm64 Packages

ubuntu@awrep06:~$ uname -a
Linux awrep06 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:22:25 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@awrep06:~$ sudo modprobe capsule-loader
ubuntu@awrep06:~$ sudo su
root@awrep06:/home/ubuntu# cat 0ACJA530.CAP > /dev/efi_capsule_loader
root@awrep06:/home/ubuntu# tail -n5 /var/log/kern.log
Mar 27 17:23:48 awrep06 kernel: [ 19.439681] qcom-emac QCOM8070:00 enaqcom8070i0: Link is Down
Mar 27 17:23:48 awrep06 kernel: [ 22.511124] qcom-emac QCOM8070:00 enaqcom8070i0: Link is Up - 1Gbps/Full - flow control rx/tx
Mar 27 17:23:48 awrep06 kernel: [ 22.511132] IPv6: ADDRCONF(NETDEV_CHANGE): enaqcom8070i0: link becomes ready
Mar 27 17:23:48 awrep06 kernel: [ 46.136253] new mount options do not match the existing superblock, will be ignored
Mar 27 17:24:59 awrep06 kernel: [ 116.552854] efi: Successfully upload capsule file with reboot type 'RESET_COLD'
root@awrep06:/home/ubuntu#

NOTICE: BL31: v1.3(release):STB_TZ.DF.2.0.R1__00935-2-g4917d82
NOTICE:_override variabNOTICE: ***** IMC-TZ SYNC POINT REACHED *****
INFO: TPM NOT IDENTIFIED
INFO: TPM VID : 0xFFFF DID : 0xFFFF
INFO: QUP version 2.5.1
ERROR: CRB Driver Init Failed with error=4100
ERROR: TPM APP failed to initialize
NOTICE: BL31: Preparing for EL3 exit to normal world
DEBUG Mode : Off
Progress: [5F]
FW Family : Qualcomm Centriq(TM) 2400
FW Version : XBL.DF.2.0.R1-00868 QDF2400_REL CRM
Build Info : 64b Feb 23 2018 15:37:40
Boot Mode : Flash update

Version 2.19.1269. Copyright (C) 2018 American Megatrends, Inc.
BIOS Date: 03/06/2018 13:04:36 Ver: 0ACJA530
EVALUATION COPY.
Press <DEL> or <ESC> to enter setup.

ubuntu@awrep06:~$ uname -a
Linux awrep06 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:22:25 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@awrep06:~$

tags: added: verification-done-artful
removed: 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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers