FS#77722 - [linux] intel-spi drivers with "DANGEROUS" Kconfig prompt are enabled/loaded by default

Attached to Project: Arch Linux
Opened by Nico Huber (icon) - Saturday, 04 March 2023, 11:53 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Task Type General Gripe
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The following commit

 FS#71325 : Enable SPI_INTEL_SPI again
git-svn-id: file:///srv/repos/svn-packages/svn@418708 eb2447ed-0c53-47e4-bac8-5bc4a241df78

enabled drivers with prompts as follows:

tristate "Intel PCH/PCU SPI flash PCI driver (DANGEROUS)"
tristate "Intel PCH/PCU SPI flash platform driver (DANGEROUS)"

They say "DANGEROUS" for a good reason, Ubuntu once had to recall their
installation images because of these drivers. The Linux commit 1f37033f05bf
that added the "DANGEROUS" says:

mtd: spi-nor: intel-spi: Explicitly mark the driver as dangerous in Kconfig

The driver is not meant for normal users at all but instead such users
who really know what they are doing and are able to build their own
kernel to enable it. Mark both driver Kconfig entries as dangerous to
make sure the driver is not accidentally enabled without understanding
possible consequences in doing so.

The bug that caused the recall is fixed by now. But these drivers are not
generally working. I have not witnessed any flash corruption lately, hence
not adding this as a bug. However, we have a problem with `flashrom`: It
defaults to using kernel MTD drivers if present. Because those are supposed
to be reliable. So right now, people have trouble updating their firmware
because (for whatever reason) the Intel driver fails to write to flash.

We suddenly had two reports in the last 24h on #flashrom @libera.chat about
this, so it also seems possible that something regressed in the kernel.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/linux/issues/14
Comment by Nico Huber (icon) - Saturday, 04 March 2023, 11:55 GMT
Sorry, I didn't expect that markdown quoting wouldn't work. The first
paragraph after "mtd: ..." was part of the commit message.
Comment by Nico Huber (icon) - Saturday, 04 March 2023, 12:20 GMT
> We suddenly had two reports in the last 24h on #flashrom @libera.chat about
> this, so it also seems possible that something regressed in the kernel.

Scratch this. I didn't notice that writes are disable by default for _this_
driver (seems uncommon for MTD, but whatever). So might just be coincidence
that we had these reports.
Comment by sekret (sekret) - Friday, 24 March 2023, 14:05 GMT
I've just run into this, but with big issues. I'll file a separate bugreport on this with all the outputs.
Comment by sekret (sekret) - Friday, 24 March 2023, 15:11 GMT Comment by Swift Geek (swiftgeek) - Saturday, 25 March 2023, 04:41 GMT
If it indeed causes issues as is, perhaps those modules could be split into separate package, so user would have to explicitly install them?
Or maybe it could be simply blacklisted in linux package, inside /usr/local/lib/modprobe.d/*.conf, which could be easily overridden from /etc
Comment by loqs (loqs) - Tuesday, 01 August 2023, 14:13 GMT
Dangerous was removed from SPI_INTEL_PCI in 6.3 [1]. Is #flashrom continuing to receive reports about this issue particularly on current kernels?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?&id=7db738b5fea4533fa217dfb05c506c15bd0964d9

Loading...