Skip to content
This repository was archived by the owner on Jun 7, 2018. It is now read-only.

Commit afdaf8c

Browse files
committed
Fixed #30: CPU affinity settings removed from afl-multicore. (The
option for explicitly setting CPU affinity in afl was dropped in afl-2.17b.)
1 parent 8df3867 commit afdaf8c

File tree

6 files changed

+4
-28
lines changed

6 files changed

+4
-28
lines changed

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,6 @@ specific target than were previously started. Obviously `afl-multicore` can
229229
resume just as many afl instances as it finds output directories for! Use the
230230
`add` command to start additional afl instances!
231231

232-
If you want to use afl's CPU affinity feature use the `cpu_affinity`
233-
configuration option to provide a whitespace separated list of single (`1`) or
234-
tuple (`2,3`) CPU ids. For info on when to use single vs. tuple id specifications
235-
checkout out afl's `docs/perf_tips.txt`. In the `afl-multicore` configuration
236-
you need to provide a CPU id for **every** afl instance you want to assign to a
237-
specific CPU core. The first provided id is always used for the master afl
238-
instance. When starting more afl instances than CPU ids have been specified,
239-
all additional instances won't be assigned to a specific CPU core.
240-
**Note:** Don't use whitespaces in your tuple specifications!
241-
242232
`afl-fuzz` can be run using its `-f <file>` argument to specify the location of
243233
the generated sample. When using multiple `afl-fuzz` instances a single file
244234
obviously can't do the trick, because multiple fuzzers running in parallel would

afl_utils/afl_multicore.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ def afl_cmdline_from_config(config_settings, instance_number):
6868
afl_cmdline.append("-m")
6969
afl_cmdline.append(config_settings["mem_limit"])
7070

71-
if "cpu_affinity" in config_settings and instance_number < len(config_settings["cpu_affinity"]):
72-
afl_cmdline.append("-Z")
73-
afl_cmdline.append(config_settings["cpu_affinity"][instance_number])
74-
7571
if "qemu" in config_settings and config_settings["qemu"]:
7672
afl_cmdline.append("-Q")
7773

config/afl-multicore.conf.sample

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
"timeout": "200+",
99
"mem_limit": "150",
1010
"qemu": false,
11-
"cpu_affinity": [
12-
"0,1",
13-
"2,3",
14-
"4,5",
15-
"6,7"
16-
],
1711
"afl_margs": "-T banner",
1812
"dirty": false,
1913
"dumb": false,

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Version 1.29a
44

55
- afl-collect updated to not use a hard-coded path to the gdb binary
66
(suggested by Martin Lindhe).
7+
- Fixed #30: CPU affinity settings removed from afl-multicore. (The
8+
option for explicitly setting CPU affinity in afl was dropped in
9+
afl-2.17b.)
710

811
Version 1.28a
912

testdata/afl-multicore.conf2.test

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,5 @@
22
"target": "/usr/bin/target",
33
"input": "./in",
44
"cmdline": "-a -b -c -d",
5-
"cpu_affinity": [
6-
"0,1",
7-
"2,3",
8-
"4,5",
9-
"6,7"
10-
],
115
"output": "./out"
126
}

tests/test_afl_multicore.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
'target': '/usr/bin/target',
4646
'input': './in',
4747
'cmdline': '-a -b -c -d',
48-
'cpu_affinity': ['0,1', '2,3', '4,5', '6,7'],
4948
'output': './out'
5049
}
5150

@@ -72,7 +71,7 @@
7271
]
7372

7473
test_afl_cmdline2 = [
75-
'-Z', '2,3', '-i', './in', '-o', './out'
74+
'-i', './in', '-o', './out'
7675
]
7776

7877
test_afl_cmdline21 = [

0 commit comments

Comments
 (0)