all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#51885] Blacksmith - Rowhammer Fuzzer
@ 2021-11-15 23:58 Raghav Gururajan via Guix-patches via
  2021-11-28  0:55 ` [bug#51885] [PATCH 1/2] gnu: Add asmjit jgart via Guix-patches via
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-11-15 23:58 UTC (permalink / raw)
  To: 51885


[-- Attachment #1.1.1: Type: text/plain, Size: 138 bytes --]

Hello Folks!

I am opening this thread for packaging blacksmith 
(https://comsec.ethz.ch/research/dram/blacksmith/).

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 1/2] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
@ 2021-11-28  0:55 ` 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
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: jgart via Guix-patches via @ 2021-11-28  0:55 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, guixrus

From: guixrus <jgart@dismail.de>

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Raghav Gururajan <rg@raghavgururajan.name>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9520a164f1..8ed639cc49 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1373,6 +1373,38 @@ (define-public jsonnet
 syntax with variables, conditions, functions and more.")
     (license license:asl2.0)))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/asmjit/asmjit")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+        `(#:configure-flags
+          '("-DASMJIT_TEST=TRUE")))
+      (synopsis "Machine code generation for C++")
+      (description
+"AsmJit is a lightweight library for machine code generation written
+in C++ language. It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set - from
+legacy MMX to the newest AVX-512 and AMX. It has a type-safe API that
+allows C++ compiler to do semantic checks at compile-time even before the
+assembled code is generated or executed. It also provides an optional
+register allocator that makes it easy to generate complex code without
+a significant development effort.")
+      (home-page "https://asmjit.com/")
+      (license license:zlib))))
+
 (define-public simdjson
   (package
     (name "simdjson")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 2/2] gnu: Add argagg.
  2021-11-28  0:55 ` [bug#51885] [PATCH 1/2] gnu: Add asmjit jgart via Guix-patches via
@ 2021-11-28  0:55   ` jgart via Guix-patches via
  0 siblings, 0 replies; 29+ messages in thread
From: jgart via Guix-patches via @ 2021-11-28  0:55 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, guixrus

From: guixrus <jgart@dismail.de>

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Raghav Gururajan <rg@raghavgururajan.name>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 8ed639cc49..486d25675e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1373,6 +1373,32 @@ (define-public jsonnet
 syntax with variables, conditions, functions and more.")
     (license license:asl2.0)))
 
+(define-public argagg
+  (package
+    (name "argagg")
+    (version "0.4.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vietjtnguyen/argagg")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "12kb9rdh1ngn4qhzxc20kv2rl1kjwpn1y21ggmh9lx7hyw06aarh"))))
+    (build-system cmake-build-system)
+    (native-inputs
+      `(("doxygen" ,doxygen)))
+    (synopsis "Simple C++11 command line argument parser")
+    (description
+"This is yet another C++ command line argument/option parser.  It was
+written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve
+the majority of argument parsing needs in a simple manner with an easy
+to use API.")
+    (home-page "https://github.com/vietjtnguyen/simdjson")
+    (license license:expat)))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] Guix Meetup Nov 27 2021: asmjit and argagg
  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  1:01 ` jgart via Guix-patches via
  2021-12-01  4:29 ` [bug#51885] [PATCH 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 29+ messages in thread
From: jgart via Guix-patches via @ 2021-11-28  1:01 UTC (permalink / raw)
  To: 51885

Hi Guixers,

The above two packages were worked on with volunteers from today's Guix Meetup.

These packages are dependencies of Blacksmith.

all best,

jgart




^ permalink raw reply	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 1/4] gnu: Add asmjit.
  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  1:01 ` [bug#51885] Guix Meetup Nov 27 2021: asmjit and argagg jgart via Guix-patches via
@ 2021-12-01  4:29 ` 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
                     ` (2 more replies)
  2021-12-09 10:52 ` [bug#51885] [PATCH v2 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
                   ` (6 subsequent siblings)
  9 siblings, 3 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-01  4:29 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index e2f2279418..b8741a9be7 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -74,6 +74,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 2/4] gnu: Add argagg.
  2021-12-01  4:29 ` [bug#51885] [PATCH 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-01  4:29   ` 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   ` [bug#51885] [PATCH 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-01  4:29 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index b8741a9be7..2fe0d70a60 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -74,6 +74,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "Simple C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 3/4] gnu: Add json.
  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   ` Raghav Gururajan via Guix-patches via
  2021-12-01  4:29   ` [bug#51885] [PATCH 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-01  4:29 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, jgart

* gnu/packages/cpp.scm (json): New variable.

Co-authored-by: jgart <jgart@dismail.de>
---
 gnu/packages/cpp.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 2fe0d70a60..4b0f839b2a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -74,6 +74,69 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public json
+  (package
+    (name "json")
+    (version "3.10.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nlohmann/json")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "17kxwxl6515s8nb5x7zy69c8qy4gswac66fp15261x1g6sa2jnkx"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (delete-file-recursively "third_party")
+           (let ((keep
+                  ;; Custom forks which are incompatible with the ones in Guix.
+                  '("doctest" "fifo_map")))
+             (with-directory-excursion "test/thirdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep)))))
+             #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "-DJSON_TestDataDirectory="
+                       (assoc-ref %build-inputs "json_test_data")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "test/CMakeLists.txt"
+               ;; Requires network connection.
+               (("add_subdirectory\\(cmake_fetch_content\\)") "")))))))
+    (native-inputs
+     `(("json_test_data"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/nlohmann/json_test_data")
+             (commit "v3.0.0")))
+           (file-name
+            (git-file-name "json_test_data" "3.0.0"))
+           (sha256
+            (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))
+       ("python" ,python-wrapper)))
+    (home-page "https://json.nlohmann.me/")
+    (synopsis "JSON for C++")
+    (description "@code{json} is a C++ json library for converting to and from
+C++ data structures.  It's design goals emphasize intuitive syntax, trivial
+integration via a single header file, and serious test coverage involving all of
+the codebase.")
+    (license license:expat)))
+
 (define-public argagg
   (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH 4/4] gnu: Add blacksmith.
  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
  2 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-01  4:29 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan

* 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





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 1/4] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (2 preceding siblings ...)
  2021-12-01  4:29 ` [bug#51885] [PATCH 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-09 10:52 ` 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
                     ` (2 more replies)
  2021-12-09 13:16 ` [bug#51885] [PATCH v3 1/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
                   ` (5 subsequent siblings)
  9 siblings, 3 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 10:52 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..bbcdcd6be9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +77,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 2/4] gnu: Add argagg.
  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   ` 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:52   ` [bug#51885] [PATCH v2 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 10:52 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..a579c47ad9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "Simple C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 3/4] gnu: Add json.
  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   ` Raghav Gururajan via Guix-patches via
  2021-12-09 10:57     ` Nicolò Balzarotti
  2021-12-09 10:52   ` [bug#51885] [PATCH v2 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
  2 siblings, 1 reply; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 10:52 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, jgart

* gnu/packages/cpp.scm (json): New variable.

Co-authored-by: jgart <jgart@dismail.de>
---
 gnu/packages/cpp.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index a579c47ad9..28705d5bb6 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,69 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public json
+  (package
+    (name "json")
+    (version "3.10.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nlohmann/json")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "17kxwxl6515s8nb5x7zy69c8qy4gswac66fp15261x1g6sa2jnkx"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (delete-file-recursively "third_party")
+           (let ((keep
+                  ;; Custom forks which are incompatible with the ones in Guix.
+                  '("doctest" "fifo_map")))
+             (with-directory-excursion "test/thirdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep)))))
+             #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "-DJSON_TestDataDirectory="
+                       (assoc-ref %build-inputs "json_test_data")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "test/CMakeLists.txt"
+               ;; Requires network connection.
+               (("add_subdirectory\\(cmake_fetch_content\\)") "")))))))
+    (native-inputs
+     `(("json_test_data"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/nlohmann/json_test_data")
+             (commit "v3.0.0")))
+           (file-name
+            (git-file-name "json_test_data" "3.0.0"))
+           (sha256
+            (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))
+       ("python" ,python-wrapper)))
+    (home-page "https://json.nlohmann.me/")
+    (synopsis "JSON for C++")
+    (description "@code{json} is a C++ json library for converting to and from
+C++ data structures.  It's design goals emphasize intuitive syntax, trivial
+integration via a single header file, and serious test coverage involving all of
+the codebase.")
+    (license license:expat)))
+
 (define-public argagg
   (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 4/4] gnu: Add blacksmith.
  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:52   ` Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 10:52 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan

* 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..8c9bb986be 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
+trigger bit flips.")
+      (license license:expat))))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 3/4] gnu: Add json.
  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
  0 siblings, 1 reply; 29+ messages in thread
From: Nicolò Balzarotti @ 2021-12-09 10:57 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, jgart

Hi, is this different from json-modern-cxx (except for the version)?

Raghav Gururajan via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/cpp.scm (json): New variable.
>
> Co-authored-by: jgart <jgart@dismail.de>
> ---
>  gnu/packages/cpp.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index a579c47ad9..28705d5bb6 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -77,6 +77,69 @@ (define-module (gnu packages cpp)
>    #:use-module (gnu packages web)
>    #:use-module (gnu packages xml))
>  
> +(define-public json
> +  (package
> +    (name "json")
> +    (version "3.10.4")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/nlohmann/json")
> +         (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "17kxwxl6515s8nb5x7zy69c8qy4gswac66fp15261x1g6sa2jnkx"))
> +       (modules '((guix build utils)
> +                  (ice-9 ftw)
> +                  (srfi srfi-1)))
> +       (snippet
> +        `(begin
> +           (delete-file-recursively "third_party")
> +           (let ((keep
> +                  ;; Custom forks which are incompatible with the ones in Guix.
> +                  '("doctest" "fifo_map")))
> +             (with-directory-excursion "test/thirdparty"
> +               (for-each delete-file-recursively
> +                         (lset-difference string=?
> +                                          (scandir ".")
> +                                          (cons* "." ".." keep)))))
> +             #t))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:configure-flags
> +       (list
> +        (string-append "-DJSON_TestDataDirectory="
> +                       (assoc-ref %build-inputs "json_test_data")))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'disable-failing-tests
> +           (lambda _
> +             (substitute* "test/CMakeLists.txt"
> +               ;; Requires network connection.
> +               (("add_subdirectory\\(cmake_fetch_content\\)") "")))))))
> +    (native-inputs
> +     `(("json_test_data"
> +        ,(origin
> +           (method git-fetch)
> +           (uri
> +            (git-reference
> +             (url "https://github.com/nlohmann/json_test_data")
> +             (commit "v3.0.0")))
> +           (file-name
> +            (git-file-name "json_test_data" "3.0.0"))
> +           (sha256
> +            (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))
> +       ("python" ,python-wrapper)))
> +    (home-page "https://json.nlohmann.me/")
> +    (synopsis "JSON for C++")
> +    (description "@code{json} is a C++ json library for converting to and from
> +C++ data structures.  It's design goals emphasize intuitive syntax, trivial
> +integration via a single header file, and serious test coverage involving all of
> +the codebase.")
> +    (license license:expat)))
> +
>  (define-public argagg
>    (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
>          (revision "0"))
> -- 
> 2.34.0




^ permalink raw reply	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v3 1/3] gnu: Add argagg.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (3 preceding siblings ...)
  2021-12-09 10:52 ` [bug#51885] [PATCH v2 1/4] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-09 13:16 ` 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
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:16 UTC (permalink / raw)
  To: 51885
  Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart,
	anothersms

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..0ce2b681c8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v3 2/3] gnu: Add json.
  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   ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:16 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, jgart, anothersms

* gnu/packages/cpp.scm (json): New variable.

Co-authored-by: jgart <jgart@dismail.de>
---
 gnu/packages/cpp.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 0ce2b681c8..d09de04f99 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,69 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public json
+  (package
+    (name "json")
+    (version "3.10.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nlohmann/json")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "17kxwxl6515s8nb5x7zy69c8qy4gswac66fp15261x1g6sa2jnkx"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (delete-file-recursively "third_party")
+           (let ((keep
+                  ;; Custom forks which are incompatible with the ones in Guix.
+                  '("doctest" "fifo_map")))
+             (with-directory-excursion "test/thirdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep)))))
+             #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "-DJSON_TestDataDirectory="
+                       (assoc-ref %build-inputs "json_test_data")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "test/CMakeLists.txt"
+               ;; Requires network connection.
+               (("add_subdirectory\\(cmake_fetch_content\\)") "")))))))
+    (native-inputs
+     `(("json_test_data"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/nlohmann/json_test_data")
+             (commit "v3.0.0")))
+           (file-name
+            (git-file-name "json_test_data" "3.0.0"))
+           (sha256
+            (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))
+       ("python" ,python-wrapper)))
+    (home-page "https://json.nlohmann.me/")
+    (synopsis "JSON for C++")
+    (description "@code{json} is a C++ json library for converting to and from
+C++ data structures.  It's design goals emphasize intuitive syntax, trivial
+integration via a single header file, and serious test coverage involving all of
+the codebase.")
+    (license license:expat)))
+
 (define-public argagg
   (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v4 1/3] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (4 preceding siblings ...)
  2021-12-09 13:16 ` [bug#51885] [PATCH v3 1/3] gnu: Add argagg Raghav Gururajan via Guix-patches via
@ 2021-12-09 13:23 ` 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
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:23 UTC (permalink / raw)
  To: 51885
  Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart,
	anothersms

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..bbcdcd6be9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +77,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v4 2/3] gnu: Add argagg.
  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   ` 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
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:23 UTC (permalink / raw)
  To: 51885
  Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart,
	anothersms

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..0ce2b681c8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v4 3/3] gnu: Add blacksmith.
  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   ` Raghav Gururajan via Guix-patches via
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:23 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, anothersms

* 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..8c9bb986be 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
+trigger bit flips.")
+      (license license:expat))))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v2 3/4] gnu: Add json.
  2021-12-09 10:57     ` Nicolò Balzarotti
@ 2021-12-09 13:26       ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:26 UTC (permalink / raw)
  To: Nicolò Balzarotti; +Cc: 51885, jgart


[-- Attachment #1.1: Type: text/plain, Size: 171 bytes --]

Hi Nicolò,

> Hi, is this different from json-modern-cxx (except for the version)?

Thanks for catching that. I dropped the commit in v4 patch-set.

Regards,
RG.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v5 1/3] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (5 preceding siblings ...)
  2021-12-09 13:23 ` [bug#51885] [PATCH v4 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-09 13:30 ` 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
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:30 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..bbcdcd6be9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +77,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v5 2/3] gnu: Add argagg.
  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   ` 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
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:30 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..0ce2b681c8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v5 3/3] gnu: Add blacksmith.
  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   ` Raghav Gururajan via Guix-patches via
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:30 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan

* 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..8c9bb986be 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
+trigger bit flips.")
+      (license license:expat))))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v6 1/3] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (6 preceding siblings ...)
  2021-12-09 13:30 ` [bug#51885] [PATCH v5 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-09 13:36 ` 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
  2022-01-14  9:00 ` bug#51885: Blacksmith - Rowhammer Fuzzer Nicolas Goaziou
  9 siblings, 2 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:36 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..bbcdcd6be9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +77,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v6 2/3] gnu: Add argagg.
  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   ` 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
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:36 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..0ce2b681c8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v6 3/3] gnu: Add blacksmith.
  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   ` Raghav Gururajan via Guix-patches via
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:36 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan

* 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..c280ed48dc 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-modern-cxx" ,json-modern-cxx)))
+      (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
+trigger bit flips.")
+      (license license:expat))))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v7 1/3] gnu: Add asmjit.
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (7 preceding siblings ...)
  2021-12-09 13:36 ` [bug#51885] [PATCH v6 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2021-12-09 13:45 ` 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
  9 siblings, 2 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:45 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..bbcdcd6be9 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +77,38 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/asmjit/asmjit")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DASMJIT_TEST=TRUE")))
+      (home-page "https://asmjit.com/")
+      (synopsis "Machine code generation for C++")
+      (description "AsmJit is a lightweight library for machine code generation
+written in C++ language.  It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set from legacy MMX to
+the newest AVX-512 and AMX.  It has a type-safe API that allows C++ compiler to
+do semantic checks at compile-time even before the assembled code is generated
+or executed.  It also provides an optional register allocator that makes it easy
+to generate complex code without a significant development effort.")
+      (license license:zlib))))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v7 2/3] gnu: Add argagg.
  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   ` 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
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:45 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan, Julien Lepiller, Disseminate Dissent, jgart

* gnu/packages/cpp.scm (argagg): New variable.

Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
Co-authored-by: Disseminate Dissent <disseminatedissent@protonmail.com>
---
 gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bbcdcd6be9..0ce2b681c8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,6 +77,46 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
+(define-public argagg
+  (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748")
+        (revision "0"))
+    (package
+      (name "argagg")
+      (version (git-version "0.4.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vietjtnguyen/argagg")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
+      (build-system cmake-build-system)
+      (outputs '("out" "doc"))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'move-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((name ,(package-name argagg))
+                      (out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                 (mkdir-p (string-append doc "/share/doc"))
+                 (rename-file
+                  (string-append out "/share/doc/" name)
+                  (string-append doc "/share/doc/" name))))))))
+      (native-inputs
+       `(("doxygen" ,doxygen)))
+      (home-page "https://github.com/vietjtnguyen/argagg")
+      (synopsis "C++11 command line argument parser")
+      (description "ArgAgg is yet another C++ command line argument/option parser.
+It was written as a simple and idiomatic alternative to other frameworks like
+getopt, Boost program options, TCLAP, and others.  The goal is to achieve the
+majority of argument parsing needs in a simple manner with an easy to use API.")
+      (license license:expat))))
+
 (define-public asmjit
   (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
         (revision "0"))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [bug#51885] [PATCH v7 3/3] gnu: Add blacksmith.
  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   ` Raghav Gururajan via Guix-patches via
  1 sibling, 0 replies; 29+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-09 13:45 UTC (permalink / raw)
  To: 51885; +Cc: Raghav Gururajan

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

diff --git a/gnu/packages/cybersecurity.scm b/gnu/packages/cybersecurity.scm
index e4614e908e..2ebdf6a8f8 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,76 @@ (define-module (gnu packages cybersecurity)
   #:use-module (gnu packages bioinformatics)      ;python-intervaltree
   #:use-module (gnu packages emulators))
 
+(define-public blacksmith
+  (package
+    (name "blacksmith")
+    (version "0.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/comsec-group/blacksmith")
+         (commit version)))
+       (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-modern-cxx" ,json-modern-cxx)))
+    (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
+trigger bit flips.")
+    (license license:expat)))
+
 (define-public ropgadget
   (package
     (name "ropgadget")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 29+ messages in thread

* bug#51885: Blacksmith - Rowhammer Fuzzer
  2021-11-15 23:58 [bug#51885] Blacksmith - Rowhammer Fuzzer Raghav Gururajan via Guix-patches via
                   ` (8 preceding siblings ...)
  2021-12-09 13:45 ` [bug#51885] [PATCH v7 1/3] gnu: Add asmjit Raghav Gururajan via Guix-patches via
@ 2022-01-14  9:00 ` Nicolas Goaziou
  9 siblings, 0 replies; 29+ messages in thread
From: Nicolas Goaziou @ 2022-01-14  9:00 UTC (permalink / raw)
  To: Raghav Gururajan via Guix-patches via; +Cc: 51885-done, Raghav Gururajan

Hello,

Raghav Gururajan via Guix-patches via <guix-patches@gnu.org> writes:

> I am opening this thread for packaging blacksmith
> (https://comsec.ethz.ch/research/dram/blacksmith/).

I applied the v7 of this patch set.  Thank you.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-01-14  9:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [bug#51885] [PATCH 4/4] gnu: Add blacksmith Raghav Gururajan via Guix-patches via
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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.