Skip to content

Commit

Permalink
Trying to add RSB-checking CI job.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzcf committed Dec 17, 2024
1 parent 832d1ee commit 70a4dbc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/return_stack_buffer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Ensure the code can be protected against Spectre-RSB attacks."
on:
pull_request:
push:

jobs:
tests:
name: tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
parameter_set: ["44", "65", "87"]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-shell rsb-checker.nix --run 'echo Installed dependencies.'
- run: nix-shell rsb-checker.nix --run 'env PARAMETER_SET=${{ matrix.parameter_set }} make check-rsb'
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ check-ct: $(IMPLEMENTATION)/ml_dsa.jazz
check-sct: $(IMPLEMENTATION)/ml_dsa.jazz
env JASMINPATH="Common=$(COMMON)" $(JASMINCT) --speculative $^

.PHONY: check-rsb
check-rsb: $(IMPLEMENTATION)/ml_dsa.jazz
env JASMINPATH="Common=$(COMMON)" $(JASMINCT_RSB) --speculative $^

.PHONY: run-interpreter
run-interpreter: $(IMPLEMENTATION)/example.jazz $(IMPLEMENTATION)/ml_dsa.jazz
$(JASMINC) $(JASMINC_FLAGS) $< | grep 'true'
Expand Down
14 changes: 14 additions & 0 deletions rsb-checker.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
with (import <nixpkgs> {});
let
repo = builtins.fetchGit {
url = "https://github.com/sarranz/jasmin";
ref = "rsb3";
rev = "324715a088a48b2a43bb3a22aafccdfd003992a2";
};

jasmin-rsb = import (repo + "/default.nix") { inherit pkgs; };
in
mkShell {
buildInputs = [ jasmin-rsb ];
JASMINCT_RSB = "${jasmin-rsb}/bin/jasmin-ct";
}

0 comments on commit 70a4dbc

Please sign in to comment.