Add WSL section to README

This commit is contained in:
Samuel Aubertin 2022-04-13 17:37:29 +02:00
parent 2161eaf38b
commit 1bbb207ceb

View File

@ -5,19 +5,22 @@ Samuel AUBERTIN - EURECOM - 2022
![SPECTRE Octopus Logo](logo.png "SPECTRE Octopus Logo")
**OCTOPUS** is a [Spectre](https://spectreattack.com/spectre.pdf) V1 (_Bounds Check Bypass_) + V2 (_Branch Target Injection_) vulnerabilty tester.
**OCTOPUS** is a [Spectre](https://spectreattack.com/spectre.pdf) V1 (_Bounds Check Bypass_) + V2 (_Branch Target Injection_) vulnerabilty and mitigation tester.
It measures and uploads the success rate of the Spectre attacks on your CPU using different compilers:
- [GCC](https://gcc.gnu.org/)
- [Clang](https://clang.llvm.org/)
And compilation/linking flags such as:
... compilation/linking flags such as:
- Optimisation levels (```-O```).
- Static/dynamic linking.
- [Masking](https://github.com/torvalds/linux/blob/cb6416592bc2a8b731dabcec0d63cda270764fc6/arch/x86/include/asm/barrier.h#L27) and [lfence](https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/using-intel-compilers-to-mitigate-speculative-execution-side-channel-issues.html) mitigations against Spectre V1.
- [RETPOLINE](https://support.google.com/faqs/answer/7625886) mitigation against Spectre V2.
and mitigations:
- [Masking](https://github.com/torvalds/linux/blob/cb6416592bc2a8b731dabcec0d63cda270764fc6/arch/x86/include/asm/barrier.h#L27) and [lfence](https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/using-intel-compilers-to-mitigate-speculative-execution-side-channel-issues.html) against Spectre V1.
- [RETPOLINE](https://support.google.com/faqs/answer/7625886) against Spectre V2.
## Supported platforms
@ -28,6 +31,7 @@ And compilation/linking flags such as:
- _Alpine 3.15_
- _RHEL 8_
- _Fedora 35_
- _Ubuntu 20.04_
- _OpenBSD 7.0_
## Docker support
@ -36,6 +40,21 @@ A _Dockerfile_ is provided and used by ```make docker``` but be wary: the compil
You **have** to build the image on the actual CPU you want to test, otherwise you may stumble upon ```core dumped: illegal instruction``` errors.
## WSL support
The code runs on _WSL2_ using the default distribution (Ubuntu).
To install WSL, from a priviledged PowerShell prompt:
```PS C:\Users\user> wsl --install```.
Once the installation is complete, you can install the dependencies and run the experiment from the WSL console:
```
$ sudo apt update && sudo apt upgrade -y && sudo apt install git make gcc clang lld
$ git clone https://gitlab.eurecom.fr/aubertin/octopus.github
$ cd octopus
$ make all
```
## Results
Results are stored as JSON objects in an unique file for each run, following this pattern: ```result-$(UUID).json```