Blacksmith - Rowhammer Fuzzer

  • Done
  • quality assurance status badge
Details
4 participants
  • Nicolò Balzarotti
  • jgart
  • Nicolas Goaziou
  • Raghav Gururajan
Owner
unassigned
Submitted by
Raghav Gururajan
Severity
normal
R
J
[PATCH 1/2] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211128005527.7661-1-jgart@dismail.de
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(+)

Toggle diff (45 lines)
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
J
[PATCH 2/2] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211128005527.7661-2-jgart@dismail.de
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(+)

Toggle diff (39 lines)
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
J
Guix Meetup Nov 27 2021: asmjit and argagg
(address . 51885@debbugs.gnu.org)
20211127200149.GB7702@gac.attlocal.net
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
R
R
Raghav Gururajan wrote on 1 Dec 2021 05:29
[PATCH 3/4] gnu: Add json.
(address . 51885@debbugs.gnu.org)
20211201042927.18454-3-rg@raghavgururajan.name
* gnu/packages/cpp.scm (json): New variable.

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

Toggle diff (76 lines)
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
R
R
Raghav Gururajan wrote on 1 Dec 2021 05:29
[PATCH 1/4] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211201042927.18454-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (45 lines)
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
R
R
Raghav Gururajan wrote on 1 Dec 2021 05:29
[PATCH 2/4] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211201042927.18454-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 1 Dec 2021 05:29
[PATCH 4/4] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
20211201042927.18454-4-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (109 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 11:52
[PATCH v2 1/4] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211209105212.29412-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (55 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 11:52
[PATCH v2 2/4] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209105212.29412-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 11:52
[PATCH v2 3/4] gnu: Add json.
(address . 51885@debbugs.gnu.org)
20211209105212.29412-3-rg@raghavgururajan.name
* gnu/packages/cpp.scm (json): New variable.

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

Toggle diff (76 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 11:52
[PATCH v2 4/4] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
20211209105212.29412-4-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (109 lines)
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
N
N
Nicolò Balzarotti wrote on 9 Dec 2021 11:57
Re: [bug#51885] [PATCH v2 3/4] gnu: Add json.
87tufikpv2.fsf@guix.i-did-not-set--mail-host-address--so-tickle-me
Hi, is this different from json-modern-cxx (except for the version)?

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

Toggle quote (83 lines)
> * 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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:16
[PATCH v3 1/3] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209131648.1752-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:16
[PATCH v3 2/3] gnu: Add json.
(address . 51885@debbugs.gnu.org)
20211209131648.1752-2-rg@raghavgururajan.name
* gnu/packages/cpp.scm (json): New variable.

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

Toggle diff (76 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:23
[PATCH v4 1/3] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211209132345.2018-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (55 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:23
[PATCH v4 2/3] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209132345.2018-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:23
[PATCH v4 3/3] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)
20211209132345.2018-3-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (109 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:26
Re: [bug#51885] [PATCH v2 3/4] gnu: Add json.
(name . Nicolò Balzarotti)(address . anothersms@gmail.com)
e4e6fe5f-83e7-798a-7613-80cd85320ce6@raghavgururajan.name
Hi Nicolò,
Toggle quote (1 lines)
> 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: OpenPGP_signature
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:30
[PATCH v5 1/3] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211209133045.2311-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (55 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:30
[PATCH v5 2/3] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209133045.2311-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:30
[PATCH v5 3/3] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
20211209133045.2311-3-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (109 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:36
[PATCH v6 1/3] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211209133614.2574-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (55 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:36
[PATCH v6 2/3] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209133614.2574-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:36
[PATCH v6 3/3] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
20211209133614.2574-3-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 78 ++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (109 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:45
[PATCH v7 1/3] gnu: Add asmjit.
(address . 51885@debbugs.gnu.org)
20211209134547.3139-1-rg@raghavgururajan.name
* 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(+)

Toggle diff (55 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:45
[PATCH v7 2/3] gnu: Add argagg.
(address . 51885@debbugs.gnu.org)
20211209134547.3139-2-rg@raghavgururajan.name
* 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(+)

Toggle diff (53 lines)
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
R
R
Raghav Gururajan wrote on 9 Dec 2021 14:45
[PATCH v7 3/3] gnu: Add blacksmith.
(address . 51885@debbugs.gnu.org)(name . Raghav Gururajan)(address . rg@raghavgururajan.name)
20211209134547.3139-3-rg@raghavgururajan.name
* gnu/packages/cybersecurity.scm (blacksmith): New variable.
---
gnu/packages/cybersecurity.scm | 75 ++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)

Toggle diff (106 lines)
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
N
N
Nicolas Goaziou wrote on 14 Jan 2022 10:00
Re: [bug#51885] Blacksmith - Rowhammer Fuzzer
(name . Raghav Gururajan via Guix-patches via)(address . guix-patches@gnu.org)
8735lq66ad.fsf@nicolasgoaziou.fr
Hello,

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

Toggle quote (3 lines)
> 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
?
Your comment

This issue is archived.

To comment on this conversation send an email to 51885@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 51885
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch