diff options
author | John Levon <john.levon@nutanix.com> | 2022-04-21 13:43:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 13:43:44 +0100 |
commit | 3779fca8c766b18b6d68feda9ed7958aa60bd4cf (patch) | |
tree | 07401acbf0d8656dc1de00b2a9ecb3fec1d2a932 /lib/private.h | |
parent | 9ad7474568a6c9f1fbb12fb8048f2083078a8144 (diff) | |
download | libvfio-user-3779fca8c766b18b6d68feda9ed7958aa60bd4cf.zip libvfio-user-3779fca8c766b18b6d68feda9ed7958aa60bd4cf.tar.gz libvfio-user-3779fca8c766b18b6d68feda9ed7958aa60bd4cf.tar.bz2 |
support AFL++ fuzzing (#623)
To support fuzzing with AFL++, add a "pipe" transport that reads from stdin and
outputs to stdout: this is the most convenient way of doing fuzzing.
Add some docs on how to run a fuzzing session.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r-- | lib/private.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/private.h b/lib/private.h index 1d19e6f..4c483f2 100644 --- a/lib/private.h +++ b/lib/private.h @@ -65,7 +65,7 @@ * Outgoing requests are either stored in out.iov.iov_base, or out_iovecs. In * the latter case, the iovecs refer to data that should not be freed. */ -typedef struct { +typedef struct vfu_msg { /* in/out */ struct vfio_user_header hdr; @@ -81,30 +81,6 @@ typedef struct { size_t nr_out_iovecs; } vfu_msg_t; -struct transport_ops { - int (*init)(vfu_ctx_t *vfu_ctx); - - int (*get_poll_fd)(vfu_ctx_t *vfu_ctx); - - int (*attach)(vfu_ctx_t *vfu_ctx); - - int (*get_request_header)(vfu_ctx_t *vfu_ctx, struct vfio_user_header *hdr, - int *fds, size_t *nr_fds); - - int (*recv_body)(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); - - int (*reply)(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg, int err); - - int (*send_msg)(vfu_ctx_t *vfu_ctx, uint16_t msg_id, - enum vfio_user_command cmd, - void *send_data, size_t send_len, - struct vfio_user_header *hdr, - void *recv_data, size_t recv_len); - - void (*detach)(vfu_ctx_t *vfu_ctx); - void (*fini)(vfu_ctx_t *vfu_ctx); -}; - typedef struct { int err_efd; /* eventfd for irq err */ int req_efd; /* eventfd for irq req */ |