stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix built-in early-load Intel microcode alignment
@ 2020-01-12 13:00 Jari Ruusu
  2020-01-12 13:03 ` Jari Ruusu
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Jari Ruusu @ 2020-01-12 13:00 UTC (permalink / raw)
  To: Borislav Petkov, Fenghua Yu, Luis Chamberlain, Linus Torvalds
  Cc: linux-kernel, stable

Intel Software Developer's Manual, volume 3, chapter 9.11.6 says:
"Note that the microcode update must be aligned on a 16-byte
boundary and the size of the microcode update must be 1-KByte
granular"

When early-load Intel microcode is loaded from initramfs,
userspace tool 'iucode_tool' has already 16-byte aligned those
microcode bits in that initramfs image. Image that was created
something like this:

 iucode_tool --write-earlyfw=FOO.cpio microcode-files...

However, when early-load Intel microcode is loaded from built-in
firmware BLOB using CONFIG_EXTRA_FIRMWARE= kernel config option,
that 16-byte alignment is not guaranteed.

Fix this by forcing all built-in firmware BLOBs to 16-byte
alignment.


Signed-off-by: Jari Ruusu <jari.ruusu@gmail.com>

--- a/drivers/base/firmware_loader/builtin/Makefile
+++ b/drivers/base/firmware_loader/builtin/Makefile
@@ -17,7 +17,7 @@
 filechk_fwbin = \
 	echo "/* Generated by $(src)/Makefile */"		;\
 	echo "    .section .rodata"				;\
-	echo "    .p2align $(ASM_ALIGN)"			;\
+	echo "    .p2align 4"					;\
 	echo "_fw_$(FWSTR)_bin:"				;\
 	echo "    .incbin \"$(fwdir)/$(FWNAME)\""		;\
 	echo "_fw_end:"						;\

-- 
Jari Ruusu  4096R/8132F189 12D6 4C3A DCDA 0AA4 27BD  ACDF F073 3C80 8132 F189

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-02-03 20:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 13:00 Fix built-in early-load Intel microcode alignment Jari Ruusu
2020-01-12 13:03 ` Jari Ruusu
2020-01-12 14:02   ` Greg KH
2020-01-13  6:30     ` Jari Ruusu
2020-01-13  6:42       ` Greg KH
2020-01-13 15:47 ` Luis Chamberlain
2020-01-13 19:44   ` Linus Torvalds
2020-01-15  2:27     ` Luis Chamberlain
2020-01-18 20:10       ` Bjorn Andersson
2020-01-13 19:58   ` Jari Ruusu
2020-01-13 20:08     ` Borislav Petkov
2020-01-13 20:30       ` Jari Ruusu
2020-01-13 20:46         ` Borislav Petkov
2020-01-15  2:15     ` Luis Chamberlain
2020-01-15 18:46       ` Jari Ruusu
2020-01-15 18:58         ` Luis Chamberlain
2020-01-15 19:41           ` Linus Torvalds
2020-01-15 19:00         ` Andy Lutomirski
2020-01-15 19:15           ` Jari Ruusu
2020-01-15 19:49             ` Linus Torvalds
2020-01-16  6:55               ` Jari Ruusu
2020-01-16 19:16                 ` Raj, Ashok
2020-01-17  9:47                   ` Jari Ruusu
2020-02-03 20:10 ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).