From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IAcCE0yIZmNcSAAAbAwnHQ (envelope-from ) for ; Sat, 05 Nov 2022 16:59:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yIlBEkyIZmOm3gAAG6o9tA (envelope-from ) for ; Sat, 05 Nov 2022 16:59:08 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A5530292AB for ; Sat, 5 Nov 2022 16:59:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orLZY-0005uI-Ip; Sat, 05 Nov 2022 11:59:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orLZW-0005s1-Us for guix-patches@gnu.org; Sat, 05 Nov 2022 11:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orLZW-0005G3-MN for guix-patches@gnu.org; Sat, 05 Nov 2022 11:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orLZW-0004lL-7w for guix-patches@gnu.org; Sat, 05 Nov 2022 11:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59053] [PATCH] gnu: Add spectre-meltdown-checker. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Nov 2022 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59053 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59053@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166766389318245 (code B ref -1); Sat, 05 Nov 2022 15:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Nov 2022 15:58:13 +0000 Received: from localhost ([127.0.0.1]:57861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orLYf-0004k9-MP for submit@debbugs.gnu.org; Sat, 05 Nov 2022 11:58:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:44182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orLYT-0004jZ-7n for submit@debbugs.gnu.org; Sat, 05 Nov 2022 11:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orLYT-0005Mw-2E for guix-patches@gnu.org; Sat, 05 Nov 2022 11:57:57 -0400 Received: from mail.boiledscript.com ([144.168.59.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orLYR-000512-8J for guix-patches@gnu.org; Sat, 05 Nov 2022 11:57:56 -0400 Date: Sat, 05 Nov 2022 23:57:31 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1667663870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ttl4L85m1+0yZ08LJcm7GzOCew1V1+q69FtD9JJH3/c=; b=WXXOI4CLHWaWqLKVc4UlLUHsp5f6co6wmX0ARhOULAMexXC+YvE1r0enpoFYjQ1dcxbguL YwSBeusTFIt4uTks/ra7PbMbIp+67Q5z3dI7uKXKBy2zvix4DJdGusagLVNffwqVLAMNGY Mu5bgCDDt64fNRaaYZyx+4ovIgMqd/5Tv2HllzM8f8C73ciPUx55uvKOjUfD3QpdYYDguU UH4T9KBkR7pQGBmlnKyGAH5mERj90TQjgYWs/W7DQ36NXxJjaw4lWiWEWI2CGdv9gA9x0g cc2RijIjrNW/KG66vQ/Zwu8PnotWhL4KOnS7hqVWwhs19xxd+izty1RA6wZwuA== Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667663948; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Ttl4L85m1+0yZ08LJcm7GzOCew1V1+q69FtD9JJH3/c=; b=GRZInEGEcQ9dDXA/dRKQtNCZsFX/8piHTIB8rkT2A08d01ZCwuneYXSAdG9MYljwfh36EB +H79VIgaI6Uxm5Eov4Lk0qUkCa1zlloma+4mcVpgtCRSS2sPjrazlEIXDc8jWlK84yZxr3 G4wjaFvzCZA7SWa5dnQWFhaOxuLHGDtBGBpVHKOXBwAMTq4x8UsL4Ru85mWZN1aUf/UHuA ZFO+n9cQqvcXiw5d0Zi1J/doGLnARGX73lBDhsd9PScqIii7J5aeldv38eCNLKM07hqVK9 z11ybrNh9juXcOctpc4cchBhFPuHatafkHQeFoou7nPlqf46v2+MhtXWk752Bw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667663948; a=rsa-sha256; cv=none; b=KgAhYzgHl3k8oZluGKip2D6Wu7gz1Gb7uEvnXm0a2P4dXPL77EmiRaosAz7471T9BYPmov Bt0F2hb6kFJhhBFymnEDUKRwrWK0r/2Rfr45XS89e0smquDX+UZ9WYuAU5CiuGMFvAfF0f C8onHZh3Ek9RAG//6pFQ4V9qxiorb/uVUpBzEhVD1TSd93cXtD21Stct6GAaMpk75iiBMq 74sO9JQ4roOiMo0cwU77OLkeMEdkA2gKKwwtsR4dtk+kQMwVbkPuA00DOZykJW3kWsYmL7 77jFGKt4R+7gFrB5RY9z1EPzzVOwjdqAWiVroJgVjto5y9hVKKO2zqpaYlQyfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=WXXOI4CL; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=WXXOI4CL; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A5530292AB X-Spam-Score: -3.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: MWUMf9BgNz6o * gnu/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch: New file. * gnu/packages/linux.scm (spectre-meltdown-checker): New variable. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 41 +++++++++++++++++++ ...n-checker-support-guix-system-kernel.patch | 26 ++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch diff --git a/gnu/local.mk b/gnu/local.mk index eb6ac3df58..88c1fa6278 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1848,6 +1848,7 @@ dist_patch_DATA = \ %D%/packages/patches/syslinux-strip-gnu-property.patch \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ %D%/packages/patches/snappy-add-inline-for-GCC.patch \ + %D%/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch \ %D%/packages/patches/sphinxbase-fix-doxygen.patch \ %D%/packages/patches/spice-vdagent-glib-2.68.patch \ %D%/packages/patches/sssd-optional-systemd.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index cf11a7fc1b..db199869a7 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -9512,3 +9512,44 @@ (define-public tp-smapi-module @acronym{SMAPI, System Management Application Program Interface} and direct access to the embedded controller.") (license license:gpl2+))) + +(define-public spectre-meltdown-checker + (package + (name "spectre-meltdown-checker") + (version "0.45") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/speed47/spectre-meltdown-checker") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches + (search-patches + ;; https://github.com/speed47/spectre-meltdown-checker/pull/441 + "spectre-meltdown-checker-support-guix-system-kernel.patch")) + (sha256 + (base32 + "1xx8h5791lhc2xw0dcbzjkklzvlxwxkjzh8di4g8divfy24fqsn8")))) + (build-system copy-build-system) + (arguments + (list #:install-plan + #~'(("spectre-meltdown-checker.sh" "bin/spectre-meltdown-checker")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fixpath + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "spectre-meltdown-checker.sh" + (("\\$\\{opt_arch_prefix\\}readelf") + (search-input-file inputs "/bin/readelf")) + (("perl") + (search-input-file inputs "/bin/perl")))))))) + (inputs (list binutils perl)) + (home-page "https://github.com/speed47/spectre-meltdown-checker") + (synopsis + "Spectre, Meltdown, Foreshadow, Fallout, RIDL, ZombieLoad vulnerability / +mitigation checker for Linux & BSD") + (description + "A shell script to assess your system's resilience against the several +transient execution CVEs that were published since early 2018, and give you +guidance as to how to mitigate them.") + (license license:gpl3))) diff --git a/gnu/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch b/gnu/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch new file mode 100644 index 0000000000..afec52b418 --- /dev/null +++ b/gnu/packages/patches/spectre-meltdown-checker-support-guix-system-kernel.patch @@ -0,0 +1,26 @@ +From 5b757d930ec0cf102b03fb9817d17e06c72e74b3 Mon Sep 17 00:00:00 2001 +From: Hilton Chain +Date: Sat, 5 Nov 2022 23:22:31 +0800 +Subject: [PATCH] Add support for Guix System kernel. + +--- + spectre-meltdown-checker.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh +index 248a444..855a090 100755 +--- a/spectre-meltdown-checker.sh ++++ b/spectre-meltdown-checker.sh +@@ -2251,6 +2251,8 @@ if [ "$opt_live" = 1 ]; then + [ -e "/boot/kernel-genkernel-$(uname -m)-$(uname -r)" ] && opt_kernel="/boot/kernel-genkernel-$(uname -m)-$(uname -r)" + # NixOS: + [ -e "/run/booted-system/kernel" ] && opt_kernel="/run/booted-system/kernel" ++ # Guix System: ++ [ -e "/run/booted-system/kernel/bzImage" ] && opt_kernel="/run/booted-system/kernel/bzImage" + # systemd kernel-install: + [ -e "/etc/machine-id" ] && [ -e "/boot/$(cat /etc/machine-id)/$(uname -r)/linux" ] && opt_kernel="/boot/$(cat /etc/machine-id)/$(uname -r)/linux" + # Clear Linux: + +base-commit: a6c943d38f315f339697ec26e7374a09b88f2183 +-- +2.38.0 base-commit: 2211f50ec1ebcf5f880454b4133ac40e41abac21 -- 2.38.0