unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Raghav Gururajan via Guix-patches via <guix-patches@gnu.org>
To: 51885@debbugs.gnu.org
Cc: Raghav Gururajan <rg@raghavgururajan.name>
Subject: [bug#51885] [PATCH 4/4] gnu: Add blacksmith.
Date: Tue, 30 Nov 2021 23:29:27 -0500	[thread overview]
Message-ID: <20211201042927.18454-4-rg@raghavgururajan.name> (raw)
In-Reply-To: <20211201042927.18454-1-rg@raghavgururajan.name>

* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
 gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/cybersecurity.scm b/gnu/packages/cybersecurity.scm
index e4614e908e..e096c41fd6 100644
--- a/gnu/packages/cybersecurity.scm
+++ b/gnu/packages/cybersecurity.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 c4droid <c4droid@foxmail.com>
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,10 +21,14 @@
 
 (define-module (gnu packages cybersecurity)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages engineering)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-crypto)
@@ -32,6 +37,79 @@ (define-module (gnu packages cybersecurity)
   #:use-module (gnu packages bioinformatics)      ;python-intervaltree
   #:use-module (gnu packages emulators))
 
+(define-public blacksmith
+  (let ((commit "c8e65b709a83665f9528efdedcf064abdb04859f")
+        (revision "0"))
+    (package
+      (name "blacksmith")
+      (version
+       (git-version "0.0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/comsec-group/blacksmith")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0kyp71wndf527dgza5iks5m5vj543mvxp5w7cjd8x0pilmd1xrls"))
+         (modules '((guix build utils)))
+         (snippet
+          `(begin
+             (delete-file-recursively "external")
+             (substitute* "CMakeLists.txt"
+               (("add_subdirectory\\(external\\)") "")
+               (("[ \t]*FetchContent_MakeAvailable\\(asmjit\\)")
+                (string-append "find_package(asmjit)\n"
+                               "find_package(nlohmann_json)")))
+             #t))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f                    ;no test-suite
+         #:imported-modules
+         ((guix build copy-build-system)
+          ,@%cmake-build-system-modules)
+         #:modules
+         (((guix build copy-build-system)
+           #:prefix copy:)
+          (guix build cmake-build-system)
+          (guix build utils))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-build
+             (lambda _
+               (substitute* "CMakeLists.txt"
+                 ;; Use default C++ standard instead.
+                 (("cxx_std_17") "")
+                 ;; This project tries to link argagg library,
+                 ;; which doesn't exist, as argagg project
+                 ;; is a single header file.
+                 (("argagg") ""))))
+           (replace 'install
+             (lambda args
+               (apply (assoc-ref copy:%standard-phases 'install)
+                      #:install-plan
+                      '(("." "bin"
+                         #:include ("blacksmith"))
+                        ("." "lib"
+                         #:include-regexp ("\\.a$")))
+                      args))))))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)))
+      (inputs
+       `(("argagg" ,argagg)
+         ("asmjit" ,asmjit)
+         ("json" ,json)))
+      (home-page "https://comsec.ethz.ch/research/dram/blacksmith")
+      (synopsis "Rowhammer fuzzer with non-uniform and frequency-based patterns")
+      (description "Blacksmith is an implementation of Rowhammer fuzzer that
+crafts novel non-uniform Rowhammer access patterns based on the concepts of
+frequency, phase, and amplitude.  It is able to bypass recent
+@acronym{TRR, Target Row Refresh}in-DRAM mitigations effectively and as such can
+could trigger bit flips.")
+      (license license:expat))))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





  parent reply	other threads:[~2021-12-01  4:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
2021-11-28  0:55 ` [bug#51885] [PATCH 1/2] gnu: Add asmjit jgart via Guix-patches via
2021-11-28  0:55   ` [bug#51885] [PATCH 2/2] gnu: Add argagg jgart via Guix-patches via
2021-11-28  1:01 ` [bug#51885] Guix Meetup Nov 27 2021: asmjit and argagg jgart via Guix-patches via
2021-12-01  4:29 ` [bug#51885] [PATCH 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-01  4:29   ` [bug#51885] [PATCH 2/4] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-01  4:29   ` [bug#51885] [PATCH 3/4] gnu: Add json Raghav Gururajan via Guix-patches via
2021-12-01  4:29   ` Raghav Gururajan via Guix-patches via [this message]
2021-12-09 10:52 ` [bug#51885] [PATCH v2 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-09 10:52   ` [bug#51885] [PATCH v2 2/4] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 10:52   ` [bug#51885] [PATCH v2 3/4] gnu: Add json Raghav Gururajan via Guix-patches via
2021-12-09 10:57     ` Nicolò Balzarotti
2021-12-09 13:26       ` Raghav Gururajan via Guix-patches via
2021-12-09 10:52   ` [bug#51885] [PATCH v2 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
2021-12-09 13:16 ` [bug#51885] [PATCH v3 1/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 13:16   ` [bug#51885] [PATCH v3 2/3] gnu: Add json Raghav Gururajan via Guix-patches via
2021-12-09 13:23 ` [bug#51885] [PATCH v4 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-09 13:23   ` [bug#51885] [PATCH v4 2/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 13:23   ` [bug#51885] [PATCH v4 3/3] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
2021-12-09 13:30 ` [bug#51885] [PATCH v5 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-09 13:30   ` [bug#51885] [PATCH v5 2/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 13:30   ` [bug#51885] [PATCH v5 3/3] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
2021-12-09 13:36 ` [bug#51885] [PATCH v6 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-09 13:36   ` [bug#51885] [PATCH v6 2/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 13:36   ` [bug#51885] [PATCH v6 3/3] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
2021-12-09 13:45 ` [bug#51885] [PATCH v7 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
2021-12-09 13:45   ` [bug#51885] [PATCH v7 2/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
2021-12-09 13:45   ` [bug#51885] [PATCH v7 3/3] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
2022-01-14  9:00 ` bug#51885: Blacksmith - Rowhammer Fuzzer Nicolas Goaziou

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20211201042927.18454-4-rg@raghavgururajan.name \
    --to=guix-patches@gnu.org \
    --cc=51885@debbugs.gnu.org \
    --cc=rg@raghavgururajan.name \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).