From 2f417d7e945469c9aa0ecda0276431ae415c3401 Mon Sep 17 00:00:00 2001 From: vnescape <78116885+vnescape@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:41:31 +0200 Subject: [PATCH 1/2] Fix typo in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbbdca7fb..e9aa9fc44 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Here, we provide a quick overview of the most interesting targets. For further documentation about parameters look into the Makefile. EL3XIR is designed to be extended with other secure monitor binaries. If trying to fuzz a new secure monitor with EL3XIR the following steps are required: -* Implement rehosting environment: This includes a bootloader stub, secure world stub, normal world stup, and handling of hardware interactions. +* Implement rehosting environment: This includes a bootloader stub, secure world stub, normal world stub, and handling of hardware interactions. You may look into `../secmonRehosting/rehostingEnvironments/` to find examples. Section 4.1 of our paper explains a high-level systematic process for rehosting secure monitor binaries. We note that our rehosting environments are directly dependent on the exact binary, i.e., if you use a new binary you need to adjust breakpoint locations. @@ -169,4 +169,4 @@ The following output files should be found when successful: | Path | Description | | :--- | :--- | | `/out/$TARGET/mmio-logs-$HARNESS-$MMIO_FUZZ.log` | Combined logging of all rerun test cases with MMIO read logging. You may search for `MMIO fuzz read` to find entries manually. | -| `/out/$TARGET/mmio-summary-$TARGET-$HARNESS-$MMIO_FUZZ.txt` | Summary of modeled MMIO registers, values, and affected runtime services. | \ No newline at end of file +| `/out/$TARGET/mmio-summary-$TARGET-$HARNESS-$MMIO_FUZZ.txt` | Summary of modeled MMIO registers, values, and affected runtime services. | From 3d7eafc221064d267437b567cf6d0cc4819c1942 Mon Sep 17 00:00:00 2001 From: vnescape Date: Sun, 20 Oct 2024 16:45:30 +0200 Subject: [PATCH 2/2] Add macOS support for Makefile --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b1f74fffd..ab5161113 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,14 @@ KERNEL_CONF ?= defconfig # specific for Linux # leave at least one core free -NCORES = $(shell echo $$((`grep -c ^processor /proc/cpuinfo`-2))) +# Determine the number of cores +ifeq ($(shell uname), Linux) + NCORES = $(shell echo $$((`grep -c ^processor /proc/cpuinfo` - 2))) +else ifeq ($(shell uname), Darwin) + NCORES = $(shell sysctl -n hw.physicalcpu | awk '{print $1 - 1}') +else + NCORES = 4 # Default to 4 cores if OS is not detected +endif NRUNS = $(shell seq 0 $(NCORES)) # for running two campaigns at once with the same number of cores