diff --git a/.github/workflows/amd64-linux-clear-stack.yml b/.github/workflows/amd64-linux-clear-stack.yml index d92bbb07..b8616038 100644 --- a/.github/workflows/amd64-linux-clear-stack.yml +++ b/.github/workflows/amd64-linux-clear-stack.yml @@ -9,58 +9,32 @@ on: jobs: - compile-clear-stack-loop: + compile-clear-stack: runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile - run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization loopSCT" default - - name: print logs - run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter - - name: return error if there are any errors - run: make -C src/ CI=1 err - - name: libjade-logs-src-clear-stack-loop.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-src-clear-stack-loop.tar.gz - path: src/libjade-logs-src.tar.gz - - - compile-clear-stack-unrolled: - runs-on: [self-hosted, linux, X64, amd64-main] + strategy: + matrix: + stack_zeroization: + - loop + - loopSCT + - unrolled + stack_zeroization_size: + - u8 + - u16 + - u32 + - u64 + - u128 + - u256 steps: - name: checkout uses: actions/checkout@v3 - name: compile - run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization unrolled" default - - name: print logs - run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter - - name: return error if there are any errors - run: make -C src/ CI=1 err - - - name: libjade-logs-src-clear-stack-unrolled.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-src-clear-stack-unrolled.tar.gz - path: src/libjade-logs-src.tar.gz + run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization ${{ matrix.stack_zeroization }} -stack-zeroization-size ${{ matrix.stack_zeroization_size }}" default - - compile-clear-stack-loop-register-zeroization-all: - runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile - run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization loopSCT -register-zeroization all" default - name: print logs run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter + - name: return error if there are any errors run: make -C src/ CI=1 err @@ -72,112 +46,42 @@ jobs: path: src/libjade-logs-src.tar.gz - compile-clear-stack-unrolled-register-zeroization-all: - runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile - run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 JFLAGS="-stack-zeroization unrolled -register-zeroization all" default - - name: print logs - run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter - - name: return error if there are any errors - run: make -C src/ CI=1 err - - - name: libjade-logs-src-clear-stack-unrolled.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-src-clear-stack-unrolled.tar.gz - path: src/libjade-logs-src.tar.gz - - - - - test-clear-stack-loop: + test-clear-stack: runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile and run - run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization loopSCT" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default - - name: print logs - run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter - - name: return error if there are any errors - run: make -C test/ CI=1 err - - name: libjade-logs-test-clear-stack-loop.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-test-clear-stack-loop.tar.gz - path: test/libjade-logs-test.tar.gz - - - test-clear-stack-unrolled: - runs-on: [self-hosted, linux, X64, amd64-main] + strategy: + matrix: + stack-zeroization: + - loop + - loopSCT + - unrolled + stack-zeroization-size: + - u8 + - u16 + - u32 + - u64 + - u128 + - u256 steps: - name: checkout uses: actions/checkout@v3 - name: compile and run - run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization unrolled" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default + run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization ${{ matrix.stack_zeroization }} -stack-zeroization-size ${{ matrix.stack_zeroization_size }}" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default - name: print logs run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter - - name: return error if there are any errors - run: make -C test/ CI=1 err - - - name: libjade-logs-test-clear-stack-unrolled.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-test-clear-stack-unrolled.tar.gz - path: test/libjade-logs-test.tar.gz - - test-clear-stack-loop-register-zeroization-all: - runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile and run - run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization loopSCT -register-zeroization all" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default - - name: print logs - run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter - - name: return error if there are any errors - run: make -C test/ CI=1 err - - - name: libjade-logs-test-clear-stack-loop-register-zeroization-all.tar.gz - contains non-empty logs and errors - if: always() - uses: actions/upload-artifact@v3 - with: - name: libjade-logs-test-clear-stack-loop-register-zeroization-all.tar.gz - path: test/libjade-logs-test.tar.gz - - test-clear-stack-unrolled-register-zeroization-all: - runs-on: [self-hosted, linux, X64, amd64-main] - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: compile and run - run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 JFLAGS="-stack-zeroization unrolled -register-zeroization all" EXCLUDE=crypto_sign/falcon/falcon512/amd64/avx2/ default - - name: print logs - run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter - name: return error if there are any errors run: make -C test/ CI=1 err - - name: libjade-logs-test-clear-stack-unrolled-register-zeroization-all.tar.gz - contains non-empty logs and errors + - name: libjade-logs-test-clear-stack-loop.tar.gz - contains non-empty logs and errors if: always() uses: actions/upload-artifact@v3 with: - name: libjade-logs-test-clear-stack-unrolled-register-zeroization-all.tar.gz + name: libjade-logs-test-clear-stack-loop.tar.gz path: test/libjade-logs-test.tar.gz diff --git a/src/Makefile.common b/src/Makefile.common index f9664f3f..94f5e68c 100644 --- a/src/Makefile.common +++ b/src/Makefile.common @@ -101,7 +101,7 @@ $(EC_DIR)/%_ct.ec : %.$(JEXT) $(DEPS_DIR)/%_ct.ec.d | $(DEPS_DIR) $(EC_DIR) $(CI .PRECIOUS: .%.stack-alloc.json -.%.stack-alloc.json: JFLAGS += -print-stack-alloc-json +.%.stack-alloc.json: JFLAGS += -print-stack-alloc-json -nowarning .%.stack-alloc.json: %.$(JEXT) $(DEPS_DIR)/%.s.d | $(DEPS_DIR) $(CI_DIR) $(DEPS) ($(JASMINC) $< 2>$@) $(CIT)