public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/
Date: Thu, 24 May 2018 12:30:22 +0000 (UTC)	[thread overview]
Message-ID: <1527165014.04384b5c8adb359c5a828ce1c34b4827122e917b.whissi@gentoo> (raw)

commit:     04384b5c8adb359c5a828ce1c34b4827122e917b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 12:29:59 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu May 24 12:30:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04384b5c

sys-firmware/intel-microcode: Split env var into MICROCODE_...

...{BLACKLIST,SIGNATURES}

Especially now, since we are shipping a lot of microcodes,
initramfs can become very large and users might want to install
only specific microcode updates for their processor via
MICROCODE_SIGNATURES="-S" option.

However, this would overwrite our default BLACKLIST.

To allow users to use "-S" option without the burden to manually
maintain a BLACKLIST, we introduced a new MICROCODE_BLACKLIST
environment variable to split things.

In addition, there was a typo is previous blacklisted
signature which was corrected to blacklist the correct microcode.

Bug: https://bugs.gentoo.org/654638
Package-Manager: Portage-2.3.38, Repoman-2.3.9

 ...6.ebuild => intel-microcode-20180426-r1.ebuild} | 49 ++++++++++++++--------
 1 file changed, 31 insertions(+), 18 deletions(-)

diff --git a/sys-firmware/intel-microcode/intel-microcode-20180426.ebuild b/sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild
similarity index 64%
rename from sys-firmware/intel-microcode/intel-microcode-20180426.ebuild
rename to sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild
index 648f16f204a..29a6958681d 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20180426.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild
@@ -28,21 +28,30 @@ RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
 S=${WORKDIR}
 
 # Blacklist bad microcode here.
-# 0x000604f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
-DEFAULT_MICROCODE_SIGNATURES="-s !0x000604f1"
+# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
+MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
+MICROCODE_BLACKLIST="${MICROCODE_BLACKLIST:=${MICROCODE_BLACKLIST_DEFAULT}}"
+
+# In case we want to set some defaults ...
+MICROCODE_SIGNATURES_DEFAULT=""
 
 # Advanced users only:
 # merge with:
 # only current CPU: MICROCODE_SIGNATURES="-S"
 # only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
 # exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
-MICROCODE_SIGNATURES="${MICROCODE_SIGNATURES:=${DEFAULT_MICROCODE_SIGNATURES}}"
+MICROCODE_SIGNATURES="${MICROCODE_SIGNATURES:=${MICROCODE_SIGNATURES_DEFAULT}}"
 
 pkg_pretend() {
-	if [[ "${MICROCODE_SIGNATURES}" != "${DEFAULT_MICROCODE_SIGNATURES}" ]]; then
+	if [[ "${MICROCODE_BLACKLIST}" != "${MICROCODE_BLACKLIST_DEFAULT}" ]]; then
+		ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
+	fi
+
+	if [[ "${MICROCODE_SIGNATURES}" != "${MICROCODE_SIGNATURES_DEFAULT}" ]]; then
 		ewarn "The user has opted in for advanced use:"
-		ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${DEFAULT_MICROCODE_SIGNATURES}\"!"
+		ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
 	fi
+
 	use initramfs && mount-boot_pkg_pretend
 }
 
@@ -70,6 +79,7 @@ src_install() {
 	fi
 
 	opts=(
+		${MICROCODE_BLACKLIST}
 		${MICROCODE_SIGNATURES}
 		# be strict about what we are doing
 		--overwrite
@@ -112,18 +122,21 @@ pkg_postrm() {
 pkg_postinst() {
 	use initramfs && mount-boot_pkg_postinst
 
-	if [[ "${MICROCODE_SIGNATURES}" != "${DEFAULT_MICROCODE_SIGNATURES}" ]]; then
-		if kernel_is -lt 4 14 34; then
-			ewarn "${P} contains microcode updates which require"
-			ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
-			ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
-			ewarn "can crash your system!"
-			ewarn ""
-			ewarn "Those microcodes are blacklisted per default. However, you have altered"
-			ewarn "MICROCODE_SIGNATURES and maybe unintentionally re-enabled those microcodes."
-			ewarn ""
-			ewarn "Check ${EROOT%/}/usr/share/doc/${P}/releasenot* if your microcode update"
-			ewarn "requires additional kernel patches or not."
-		fi
+	# We cannot give detailed information if user is affected or not:
+	# If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
+	# to to force a specific, otherwise blacklisted, microcode. So we
+	# only show a generic warning based on running kernel version:
+	if kernel_is -lt 4 14 34; then
+		ewarn "${P} contains microcode updates which require"
+		ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
+		ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
+		ewarn "can crash your system!"
+		ewarn ""
+		ewarn "Those microcodes are blacklisted per default. However, if you have altered"
+		ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
+		ewarn "re-enabled those microcodes...!"
+		ewarn ""
+		ewarn "Check ${EROOT%/}/usr/share/doc/${P}/releasenot* if your microcode update"
+		ewarn "requires additional kernel patches or not."
 	fi
 }


             reply	other threads:[~2018-05-24 12:30 UTC|newest]

Thread overview: 181+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 12:30 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-03 17:47 [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/ Nowa Ammerlaan
2025-02-15 14:20 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-01-06 20:25 Nowa Ammerlaan
2024-11-26 15:09 Mike Pagano
2024-11-26 15:09 Mike Pagano
2024-11-14 20:41 Mike Pagano
2024-11-13 12:48 Mike Pagano
2024-10-20 18:10 Mike Pagano
2024-10-03 21:18 Mike Pagano
2024-09-15 16:26 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-08-15 22:21 Mike Pagano
2024-06-29  8:39 Andrew Ammerlaan
2024-06-26 18:58 Arthur Zamarin
2024-06-26 17:53 Arthur Zamarin
2024-06-01  2:55 Sam James
2024-06-01  2:11 Sam James
2024-06-01  1:00 Sam James
2024-05-17 12:07 Andrew Ammerlaan
2024-05-15 12:49 Sam James
2024-05-15 12:49 Sam James
2024-05-04  9:48 Arthur Zamarin
2024-05-04  7:20 Arthur Zamarin
2024-03-12 20:25 Mike Pagano
2023-11-17 15:09 Sam James
2023-11-17 13:54 Mike Pagano
2023-11-14 23:41 Mike Pagano
2023-11-12 12:20 Sam James
2023-11-12  8:20 Arthur Zamarin
2023-10-11 16:40 Mike Pagano
2023-08-09  3:20 Sam James
2023-08-08 18:46 Sam James
2023-07-24  4:15 Sam James
2023-06-15 23:44 Sam James
2023-06-15 16:55 Sam James
2023-06-10 13:35 Sam James
2023-06-10 13:35 Sam James
2023-05-12 23:14 Mike Pagano
2023-03-22  5:27 Sam James
2023-03-22  5:27 Sam James
2023-02-15  9:30 Sam James
2023-02-15  1:39 Sam James
2022-12-16  6:28 Sam James
2022-11-09  7:55 Sam James
2022-11-09  3:20 Sam James
2022-08-19  3:38 Sam James
2022-08-10 17:08 Mike Pagano
2022-08-10 17:08 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:05 Mike Pagano
2022-08-10 16:24 Mike Pagano
2022-08-10 16:23 Mike Pagano
2022-08-09 22:01 Mike Pagano
2022-08-09 20:43 Mike Pagano
2022-05-10 20:24 Mike Pagano
2022-05-02 20:46 Mike Pagano
2022-03-16  6:33 Ulrich Müller
2022-03-15 20:19 Sam James
2022-02-10  2:02 Thomas Deutschmann
2021-08-30 16:03 Thomas Deutschmann
2021-06-08 22:23 Thomas Deutschmann
2021-05-14 14:58 Thomas Deutschmann
2021-02-21  3:16 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-15 23:50 Thomas Deutschmann
2020-11-11  1:17 Thomas Deutschmann
2020-09-20 23:41 Thomas Deutschmann
2020-06-29 11:20 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-10  0:59 Thomas Deutschmann
2020-06-10  0:59 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2019-11-15 22:58 Thomas Deutschmann
2019-11-12 21:31 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-09-19 18:33 Thomas Deutschmann
2019-09-08 13:34 Thomas Deutschmann
2019-09-08 13:17 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-07-22 16:34 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-14 18:24 Thomas Deutschmann
2019-05-13  1:57 Thomas Deutschmann
2019-05-13  1:57 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-01-14  2:39 Thomas Deutschmann
2019-01-14  2:39 Thomas Deutschmann
2018-12-16 23:19 Thomas Deutschmann
2018-11-17 23:56 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-09 11:36 Mikle Kolyada
2018-08-24 19:40 Thomas Deutschmann
2018-08-24 19:40 Thomas Deutschmann
2018-08-23 17:17 Matt Thode
2018-08-08 23:46 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-24 12:31 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-06  1:04 Thomas Deutschmann
2018-06-23 11:46 Thomas Deutschmann
2018-06-19 13:46 Thomas Deutschmann
2018-06-07  0:02 Thomas Deutschmann
2018-06-02 10:26 Thomas Deutschmann
2018-05-30 22:41 Thomas Deutschmann
2018-05-30 12:57 Thomas Deutschmann
2018-05-29 23:18 Thomas Deutschmann
2018-05-29 23:15 Thomas Deutschmann
2018-05-23 18:24 Thomas Deutschmann
2018-04-13 23:22 Aaron Bauman
2018-03-15 14:13 Thomas Deutschmann
2018-03-14 11:02 Thomas Deutschmann
2018-02-07  3:26 Thomas Deutschmann
2018-02-07  3:26 Thomas Deutschmann
2018-01-12 19:27 Thomas Deutschmann
2018-01-12 18:53 Mike Gilbert
2018-01-10 22:14 Robin H. Johnson
2018-01-10  0:46 Thomas Deutschmann
2018-01-10  0:46 Thomas Deutschmann
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 20:48 Thomas Deutschmann
2018-01-06 17:53 Agostino Sarubbo
2018-01-04 16:25 Thomas Deutschmann
2017-11-21 20:08 Thomas Deutschmann
2017-07-14  7:13 Matt Turner
2017-07-04 15:49 Agostino Sarubbo
2017-07-04 10:17 Agostino Sarubbo
2017-06-05 21:23 Robin H. Johnson
2016-12-21 11:23 Thomas Deutschmann
2016-12-20 12:50 Tobias Klausmann
2016-11-24 20:17 Markos Chandras
2016-09-27 13:44 Tony Vroon
2016-06-24 20:12 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527165014.04384b5c8adb359c5a828ce1c34b4827122e917b.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox