Commit d9018976cdb6 missing in Kernels <4.14.x preventing lasting fix of Intel SPI bug on certain serial flash

Bug #1742696 reported by Christian
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Critical
Joseph Salisbury
Artful
Fix Released
Critical
Joseph Salisbury

Bug Description

== SRU Justification ==
New bug forked out of Bug #1734147 "corrupted BIOS due to Intel SPI bug in kernel Edit"

When trying to apply the proposed fix in Bug #1734147 to a Lenovo Yoga with Serial Flash s25fl064k, the actual fix works, however reverting back to original available Kernel <4.14.x again locks the BIOS for write.

How to identify chip: Using the Fix Kernel from Bug #1734147 the kernel log will show intel-spi entries.
In lower part serial is shown as below:

intel-spi intel-spi: s25fl064k (8192 Kbytes)

Additional Information:
Lenovo Yoga running Linux Mint 18.3 (based on Xenial 16.04)
Bug #1734147 occured when trying Ubuntu 17.10

Explanation by Mika Westerberg (Bug #1734147, Comment #524)
"commit d9018976cdb6 is missing with this particular BIOS/system because every time you boot the system, the BIOS resets to default when it finds BCR register is changed. This is different issue than the CMP=1 issue most of the users have reported. This one also is not permanent so everything is fine as long as you don't touch that BCR register. In this case you either need to always boot to a kernel where that fix (d9018976cdb6) is included or blacklist lpc_ich.ko. Ubuntu v4.14.x kernels have that fix included so you might want to take one of them or build your own."

== Fixes ==
d9018976cdb6 ("mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/Broadwell")
9d63f17661e2 ("spi-nor: intel-spi: Fix broken software sequencing codes")

== Regression Potential ==
Low, these patches fix an existing critical regression.

New bug requested to discuss this separate from main Bug #1734147
Anthony Wong (Bug #1734147, Comment #525)
"Looks like we need to cherry-pick it to 4.13 after all.
Christian, do you mind opening a new bug for your issue? We should continue the discussion and fix over there."

Revision history for this message
Christian (list-christian) wrote :
Revision history for this message
Christian (list-christian) wrote :
summary: Commit d9018976cdb6 missing in Kernels <4.14.x preventing lasting fix of
- Intel SPI bug
+ Intel SPI bug on certain serial flash
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 1742696

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):
status: Incomplete → Confirmed
Revision history for this message
Christian (list-christian) wrote :

So how are we going on with this?
As it seems I am the only one so far in this unique combination. Hence it might be too much asked to cherry pick the 4.13 kernels just for me?

I could try to build by current kernel (4.13.0-26) with patches and then stay on that one until 4.14 gets available? (never done that but would be worth a try?)
If more people show up here with the issue the cherry pick is still an option.

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Changed in linux (Ubuntu Artful):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a test kernel with two commits d9018976cdb6 and 9d63f1766. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1742696

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!

Revision history for this message
Christian (list-christian) wrote :

#5
Using the test kernel I can confirm, that the BIOS is writable, keeps settings over reboot and the bios changed message has disappeared.
Thanks a lot!

Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Artful):
assignee: nobody → Joseph Salisbury (jsalisbury)
status: Triaged → In Progress
Changed in linux (Ubuntu):
status: Triaged → In Progress
description: updated
Changed in linux (Ubuntu):
importance: Medium → Critical
Changed in linux (Ubuntu Artful):
importance: Medium → Critical
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
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
Revision history for this message
Christian (list-christian) wrote :

@ Joseph (Or anyone who knows), can you help me our here.

As I am not developer, I am not getting on how Ubuntu versioning and Kernel updates work.
Why is there an artful-proposed needed? Is the 4.13 Kernel versioned under artful, but still used in Xenial?
Then I would need to add the artful-proposed to my Xenial sources? Sounds weird, but I am ok with trying.

Revision history for this message
Christian (list-christian) wrote :

*NOT WORKING*

So checked to install from artful-proposed the following packages:

linux-image-4.13.0-37-generic/artful-proposed
linux-image-extra-4.13.0-37-generic/artful-proposed

Following sequence:
1. Install fix kernel from bug #1734147
2. Reboot with fix kernel
3. Reboot into BIOS, doing some changes
4. Continue reboot with fix kernel (BIOS reset message disappeared)
5. Reboot into BIOS, check if changes have been retained, result: YES)
6. Continue reboot with fix kernel
7. Install artful-proposed kernel (by sudo apt-get install linux-image-4.13.0-37-generic/artful-proposed and sudo apt-get install linux-image-extra-4.13.0-37-generic/artful-proposed)
8. Reboot artful-proposed kernel
9. Reboot artful-proposed Kernel (BIOS reset message reappears)

To make sure, I checked to install Josephs Kernel (from #5) in Step 7. Result after 3 reboots: BIOS reset message is still gone.

Hence something is not working correctly in the artful-proposed kernel (or my tests).
Any ideas?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The -proposed kernel is actually version 4.13.0-38. I confirmed that kernel has commits d9018976cdb6 and 9d63f1766. Can you git the -38 kernel a try?

Revision history for this message
Christian (list-christian) wrote :

*WORKING*

Ok, was on -36 hence thought -37 would be the next one.

Tested with
linux-image-4.13.0-38-generic/artful-proposed
linux-image-extra-4.13.0-38-generic/artful-proposed

and fix worked. BIOS is writable after applying fix kernel. Stays writable after returning to 4.13.0-38.

tags: added: verification-done-artful
removed: verification-needed-artful
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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