[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/14: gnu: Add mce-inject.
From: |
guix-commits |
Subject: |
07/14: gnu: Add mce-inject. |
Date: |
Wed, 27 Jul 2022 19:08:07 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 054c001d265ac5b8189abdf6ea55e30a4d0c2436
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 24 02:00:00 2022 +0200
gnu: Add mce-inject.
* gnu/packages/linux.scm (mce-inject): New public variable.
---
gnu/packages/linux.scm | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 81a7f99693..ad839ae45a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6630,6 +6630,65 @@ the default @code{nsswitch} and the experimental
@code{umich_ldap}.")
@code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
(license license:gpl2+)))
+(define-public mce-inject
+ (let ((revision "0") ; no git tags :-/
+ (commit "4cbe46321b4a81365ff3aafafe63967264dbfec5"))
+ (package
+ (name "mce-inject")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gjapg2hrlxp8ssrnhvc19i3r1xpcnql7xv0zjgbv09zyha08g6z"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; There is no test suite. There's a test/ directory, but it just holds
+ ;; example text files you could feed to the programme to crash
something.
+ (list #:tests? #f
+ #:make-flags
+ #~(list (string-append "prefix=" #$output)
+ (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (add-after 'install 'install-examples
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc/" #$name))
+ (dir (string-append doc "/examples")))
+ (copy-recursively "test" dir )))))))
+ (native-inputs
+ (list bison flex))
+ (supported-systems (list "i686-linux" "x86_64-linux"))
+ (home-page
+ "https://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git/about/")
+ (synopsis
+ "Inject x86 @acronym{MCEs, machine-check exceptions} into Linux")
+ (description
+ "This simple tool injects fake @acronym{MCEs, machine-check exceptions}
+into a running Linux kernel, to debug or test the kernel's @acronym{EDAC, error
+detection and correction}-handling code specific to x86 and x86_64 platforms.
+
+Real MCEs are internal CPU errors. Handling them correctly can be important to
+system stability and even prevent physical damage. In contrast, simulated MCEs
+produced by @command{mce-inject} are purely synthetic: injection happens only
at
+the software level, inside the kernel, and is not visible to the platform
+hardware or firmware.
+
+A convenient feature of @command{mce-inject} is that the input language used to
+describe MCEs is similar to the format used in Linux panic messages, with a few
+extensions. In general, you should be able to pipe in any logged MCE panic to
+simulate that same MCE.
+
+The target kernel must have the @code{CONFIG_X86_MCE_INJECT} option enabled and
+the @code{mce-inject} module loaded if it exists.")
+ (license license:gpl2))))
+
(define-public mcelog
(package
(name "mcelog")
- branch master updated (97285a431b -> bdb2e262fc), guix-commits, 2022/07/27
- 03/14: gnu: btrbk: Use SEARCH-INPUT-FILES., guix-commits, 2022/07/27
- 09/14: gnu: duc: Run tests., guix-commits, 2022/07/27
- 07/14: gnu: Add mce-inject.,
guix-commits <=
- 12/14: gnu: console-setup: Clean up #:make-flags., guix-commits, 2022/07/27
- 10/14: gnu: console-setup: Update to 1.209., guix-commits, 2022/07/27
- 05/14: gnu: pegtl: Update to 3.2.7., guix-commits, 2022/07/27
- 04/14: gnu: libkeyfinder: Update to 2.2.7., guix-commits, 2022/07/27
- 13/14: gnu: console-setup: Use G-expressions., guix-commits, 2022/07/27
- 08/14: gnu: duc: Update to 1.4.5., guix-commits, 2022/07/27
- 01/14: gnu: btrbk: Add findutils to PATH., guix-commits, 2022/07/27
- 02/14: gnu: btrbk: Update to 0.32.2., guix-commits, 2022/07/27
- 06/14: gnu: nanodbc: Update to 2.14.0., guix-commits, 2022/07/27
- 11/14: gnu: console-setup: Fix cross-compilation., guix-commits, 2022/07/27