Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4631091ybl; Wed, 22 Jan 2020 01:37:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxVC9Kmq/3PcFbGL+Lr4xq50XQxfy8FdlFV5JOzNj/GMs2hL9VkxZm4sjX14xUEAVmYwtuN X-Received: by 2002:aca:fdd1:: with SMTP id b200mr5933447oii.133.1579685877260; Wed, 22 Jan 2020 01:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579685877; cv=none; d=google.com; s=arc-20160816; b=TtoeRIgscf+aAirF7Jw8zNtTzAWGLt3mYcoB02uOCzxy36t/m5NtcBr88d/JgI2ftf R8sQGXtJclkiSovu/Dc7cT39fK6UUu6K9hRGB6Jk9C6KJkYip7CqyfN9IJ3Xn2MPJ8DZ BUBWgLEYf+bBm9gSwmIjTCrfOEAba3zrlTH3f+FOWwvfJc2c1vSi/ld2KXk4gNdtyGVR ntEv1FcwgyL8cxuOJzGm6pZ1dzh1uv3ITLQg/uD/Q4Fd7rk7NpJmRzcexcwmYIaQ1CJ9 lRpqZjOQ3Dc7YUSY6J0uUel+dVR1rkmgNOaU3tj7NL2FS+28xtrSIN12FwBa7+RAZ9ll lfvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yA4i3QTRTcPzShLzDJ6MC2Lg5gn3T8O6nqXVLtVb7GE=; b=qb9HY+IqHmuRWUaewMXj9xbTOo8w8+Z6q5fvsxW9hnEjjS75yQvLkYhH9xaFwUHGt7 IY619Ne5FfyRwZNL8psfCg/IyPSAHv67J0XNKL5VlqwEPvqkKLOmc/7mp0nynYtKxmDW VsYlQEpIJamdQfcIcy8s3dhoFR5ColfZG/amVFl272aYPKbDiAFYhHIHSBpn3Rl0uLNk 7+AVoxtftvw6qOOD0YYQYphAXMDIoMeFNb5ugRuXqfQqC9whIiBbMpAvAzPQ7owPboaT HdBKIYyc+Ki6txH1zqB8l8JJVmAdLCdotBD7s7YL9vkjrO60BYnDKMcu+8hhu8kVgDQD mJhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QYCE2cm+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si20273562oic.225.2020.01.22.01.37.45; Wed, 22 Jan 2020 01:37:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QYCE2cm+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731451AbgAVJg6 (ORCPT + 99 others); Wed, 22 Jan 2020 04:36:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:52604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729827AbgAVJgy (ORCPT ); Wed, 22 Jan 2020 04:36:54 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0A8324686; Wed, 22 Jan 2020 09:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579685814; bh=U01ImcXiMVQ+6F1rV4sEe5fLN+vVgVK5/h8301HQ7L4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QYCE2cm+/wxyIufUJkBqRsEgsNJnxiNvWBztYJlUg0VLTUZUFf7kkWCUpcwhmQgOp pKXoa+dtPNRde1gp5h3iw1inY2hU5nKZ9owivAmbnqabqt8Z0yM2UIhlXUdl0Nm3G3 /FrAf0u/hJOLjeVkmUUn5FdMy0266r2Bw19Jb7Uw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jari Ruusu , Borislav Petkov , Fenghua Yu , Luis Chamberlain , stable@kernel.org, Linus Torvalds Subject: [PATCH 4.9 54/97] Fix built-in early-load Intel microcode alignment Date: Wed, 22 Jan 2020 10:28:58 +0100 Message-Id: <20200122092805.117049806@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092755.678349497@linuxfoundation.org> References: <20200122092755.678349497@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jari Ruusu commit f5ae2ea6347a308cfe91f53b53682ce635497d0d upstream. 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. [ If we end up having other firmware with much bigger alignment requirements, we might need to introduce some method for the firmware to specify it, this is the minimal "just increase the alignment a bit to account for this one special case" patch - Linus ] Signed-off-by: Jari Ruusu Cc: Borislav Petkov Cc: Fenghua Yu Cc: Luis Chamberlain Cc: stable@kernel.org Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- firmware/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/firmware/Makefile +++ b/firmware/Makefile @@ -156,7 +156,7 @@ quiet_cmd_fwbin = MK_FW $@ PROGBITS=$(if $(CONFIG_ARM),%,@)progbits; \ echo "/* Generated by firmware/Makefile */" > $@;\ echo " .section .rodata" >>$@;\ - echo " .p2align $${ASM_ALIGN}" >>$@;\ + echo " .p2align 4" >>$@;\ echo "_fw_$${FWSTR}_bin:" >>$@;\ echo " .incbin \"$(2)\"" >>$@;\ echo "_fw_end:" >>$@;\