Style, more doc in README
This commit is contained in:
parent
47946f6aed
commit
334324466b
12
Makefile
12
Makefile
@ -15,10 +15,9 @@
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.PHONY: clean build upload
|
||||
.SILENT:
|
||||
.NOTPARALLEL:
|
||||
|
||||
EXECUTABLES = clang gcc uuid rsync lld taskset
|
||||
DEPENDENCIES := $(foreach exec,$(EXECUTABLES), $(if $(shell which $(exec) 2> /dev/null),X,$(error "No '$(exec)' in PATH, please install it and restart octopus !")))
|
||||
EXECUTABLES= clang gcc uuid rsync lld taskset
|
||||
XXXX:= $(foreach exec,$(EXECUTABLES), $(if $(shell which $(exec) 2> /dev/null),X,$(error "No '$(exec)' in PATH, please install it and restart octopus !")))
|
||||
|
||||
### Generic flags
|
||||
SRCS= spectre_v1 spectre_v2
|
||||
@ -50,9 +49,9 @@ VULN1:= $(shell cat /sys/devices/system/cpu/vulnerabilities/spectre_v1)
|
||||
VULN2:= $(shell cat /sys/devices/system/cpu/vulnerabilities/spectre_v2)
|
||||
|
||||
ifndef PROGRESS
|
||||
HIT_TOTAL != ${MAKE} ${MAKECMDGOALS} --dry-run PROGRESS="HIT_MARK" | grep -c "HIT_MARK"
|
||||
HIT_COUNT = $(eval HIT_N != expr ${HIT_N} + 1)${HIT_N}
|
||||
PROGRESS = echo "[`expr ${HIT_COUNT} '*' 100 / ${HIT_TOTAL}`%]"
|
||||
HIT_TOTAL!= $(MAKE) $(MAKECMDGOALS) --dry-run PROGRESS="HIT_MARK" | grep -c "HIT_MARK"
|
||||
HIT_COUNT= $(eval HIT_N != expr $(HIT_N) + 1)$(HIT_N)
|
||||
PROGRESS= echo "[`expr $(HIT_COUNT) '*' 100 / $(HIT_TOTAL)`%]"
|
||||
endif
|
||||
|
||||
SUB_ONE= $(word 1, $(subst -, ,$@))
|
||||
@ -108,7 +107,6 @@ PROGS+= $(RSCPROGS)
|
||||
PROGS+= $(RGROGS)
|
||||
PROGS+= $(RSGPROGS)
|
||||
|
||||
|
||||
all: upload
|
||||
echo -e "\033[1mThank you for helping science today !\033[0m"
|
||||
|
||||
|
22
README.md
22
README.md
@ -15,8 +15,13 @@ It measures the success rate of the attacks using different compilers:
|
||||
And compilation/linking flags such as:
|
||||
|
||||
- Optimisation levels (```-O```)
|
||||
- Static linking
|
||||
- RETPOLINE
|
||||
- Static/dynamic linking
|
||||
- Masking and lfence as mitigation against Spectre V1
|
||||
- RETPOLINE as mitigation against Spectre V2
|
||||
|
||||
## Results
|
||||
|
||||
Results are stored as JSON objects in an unique file for each run, following this pattern: ```result-$(UUID).json```
|
||||
|
||||
## Dependencies
|
||||
|
||||
@ -24,20 +29,21 @@ And compilation/linking flags such as:
|
||||
- ```gcc```
|
||||
- ```sftp```
|
||||
- ```uuid```
|
||||
- The libC static symbols ```glibc-static```
|
||||
- The libC static symbols: ```glibc-static```
|
||||
|
||||
## Execution
|
||||
|
||||
```make```
|
||||
Will build, execute and upload the results.
|
||||
|
||||
```make```
|
||||
|
||||
### Build only
|
||||
|
||||
```make build```
|
||||
```make [-j XXX] build``` where ```XXX``` is the number of parallel processes.
|
||||
|
||||
## Results aggregation
|
||||
|
||||
Results are automatically uploaded to a server with ```sftp``` using a dedicated account.
|
||||
Results are automatically uploaded to a server with a dedicated account using ```sftp```.
|
||||
|
||||
Here is an exhaustive list of the data sent:
|
||||
- CPU model name and microcode version.
|
||||
@ -49,7 +55,9 @@ Here is an exhaustive list of the data sent:
|
||||
|
||||
**NONE** of this data will be used for anyhting else except this experiment.
|
||||
|
||||
## Sources
|
||||
## References
|
||||
|
||||
Both implementations are heavily inspired by:
|
||||
|
||||
- [ErikAugust gist](https://gist.github.com/ErikAugust/724d4a969fb2c6ae1bbd7b2a9e3d4bb6)
|
||||
- [genua GmbH PoC](https://github.com/genua/meltdown)
|
||||
|
Loading…
Reference in New Issue
Block a user