move kafl_* script into a single package entrypoint with subcommands#22
move kafl_* script into a single package entrypoint with subcommands#22Wenzel merged 30 commits intoIntelLabs:masterfrom
Conversation
b2ca52e to
574f641
Compare
b193b2b to
bb7dc8d
Compare
|
Regarding the command line changes, if we take the Fuzzing the linux kernel tutorial: before KAFL_CONFIG_FILE=./kafl_config.yaml kafl_fuzz.py --purge -w /dev/shm/kafl \
--redqueen --grimoire -D --radamsa \
--kernel linux-guest/arch/x86/boot/bzImage \
-t 0.1 -ts 0.01 -m 512 --log-crashes -p 2now KAFL_CONFIG_FILE=./kafl_config.yaml kafl \
--purge -w /dev/shm/kafl -p2 \
fuzz \
--redqueen --grimoire -D --radamsa --kernel linux-guest/arch/x86/boot/bzImage \
-t 0.1 -ts 0.01 -m 512 --log-crashes
|
3a8979e to
a5d2bc6
Compare
|
The last update added the Also, I moved all the configuration default values into |
|
567693d to
9aca680
Compare
9aca680 to
9ef2af6
Compare
I had to resubmit when the PR changed, then saw it twice and deleted one... :-/
Ok, I suppose we can live with it for now. [ah fuck...edited instead of quote-reply...] |
58b55d3 to
439f6a6
Compare
439f6a6 to
4e55e9e
Compare
There was a problem hiding this comment.
This seems like a overly complicated fix, maybe we just keep the config.['reload']?
2bdcf01
e523384 to
5d7679a
Compare
|
@il-steffen the last update fixed the behavior of |
73bb370 to
f743eb5
Compare
|
Lets revert the two hacks for 'snapshot_reload' and 'kafl_work_dir'. The other things are just nitpicks, feel free to merge when ready. |
f743eb5 to
49caa8d
Compare


This is the beginning of a PR to fix #13
new
__main__.pyto make thekafl_fuzzerpackage executable (python -m kafl_fuzzer)kafl_fuzzerpackage, refactoring later onconfig.pyset_defaultsto automatically associate and call each subcommand's entrypoint.in


cmdline.py:confusewithdynaconfparser, which is not reliable long termsettings.pyand associated with the dynaconf settings.app_settings_files()function insettings.py, and already integrates loading theKAFL_CONFIG_FILEenvironment variablemainlook like this:So the new flow looks like this:
dynaconf is loading the settings files, according to the load order defined in
settings.pyparser.parse_args()parses the command line and returns aNamespaceobjectthis object is passed to

update_from_namespac()function, defined insettings.pythis function will update the dynaconf settings by extracting a dict from the
Namespaceobject and updating the settings dict.the validation step comes in, and the

validatefunction is called. Due to bug we had to write our own validation function and manually call the Validatorcastfunctions.the subcommand entrypoint is finally called in
__main__.pyTODO