aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSimone Weiß <simone.weiss@elektrobit.com>2024-04-15 14:30:03 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-22 08:46:42 +0000
commit36c961ad9dc0e5b72efc784a57717424a02bfa00 (patch)
treeda60380de7d0a95724187e8d4866071503d81ce1 /docs
parentaf24b0505c748561efb50f1d03c824d6642f6c0b (diff)
tools/syz-db: add more usage info for syz-db
Add some short notes on how syz-db can also be used manually. Signed-off-by: Simone Weiß <simone.weiss@elektrobit.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/db.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/db.md b/docs/db.md
new file mode 100644
index 000000000..e77daee59
--- /dev/null
+++ b/docs/db.md
@@ -0,0 +1,59 @@
+# syz-db
+
+`syz-db` program can be used to manipulate corpus.db databases that are used
+by syz-managers.
+
+## Build
+
+Build `syz-db` with `make db` or by changing to `tools/syz-db` and run `go build`.
+
+## Options
+
+`syz-db` currently overs the following generic arguments:
+
+```shell
+ -arch string
+ target arch
+ -os string
+ target OS
+ -version uint
+ database version
+ -vv int
+ verbosity
+```
+
+That can be used with
+
+```
+ syz-db pack dir corpus.db
+```
+
+to pack a database
+
+```
+ syz-db unpack corpus.db dir
+```
+
+to unpack a database. A file containing performed syscalls will be returned.
+
+```
+ syz-db merge dst-corpus.db add-corpus.db* add-prog*
+```
+
+to merge databases. No additional file will be created: The first file will be replaced by the merged result.
+
+```
+ syz-db bench corpus.db
+```
+
+to run a deserialization benchmark. For example:
+
+```
+syz-db -os=linux -arch=amd64 bench corpus.db
+```
+
+could give an output like
+
+```
+allocs 123 MB (123 M), next GC 123 MB, sys heap 123 MB, live allocs 123 MB (123 M), time 324s.
+```