public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
16327506e90a6894c2e815899b64a19aba6a1651 blob 933 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
//SPDX-License-Identifier: GPL-2.0-or-later

/* fuzz.h - AFL++ fuzzing support for passt
 *
 * Copyright Red Hat
 * Author: Anshu Kumari <anskuma@redhat.com>
 */

#ifndef FUZZ_H
#define FUZZ_H

#ifdef FUZZING

#include <time.h>
#include <unistd.h>
#include <sys/socket.h>
#include "fuzz-testbuf.h"

int fuzz_clock_gettime(clockid_t clk, struct timespec *tp);
void fuzz_clock_reset(void);
int fuzz_getsockopt(int fd, int level, int optname, void *optval,
		    socklen_t *optlen);
void fuzz_flow_cleanup(void);

extern const unsigned char *fuzz_sockopt_data;
extern int fuzz_sockopt_data_len;

#define clock_gettime(clk, tp)	fuzz_clock_gettime(clk, tp)
#define getsockopt(fd, level, name, val, len) \
	fuzz_getsockopt(fd, level, name, val, len)

#define fuzz_assert(expr)	do { if (!(expr)) _exit(0); } while (0)
#else /* !FUZZING */
#include <assert.h>
#define fuzz_assert(expr)	assert(expr)
#endif /* FUZZING */

#endif /* FUZZ_H */
debug log:

solving 16327506 ...
found 16327506 in https://archives.passt.top/passt-dev/20260928051727.2251281-6-anskuma@redhat.com/
found 311d7e79 in https://archives.passt.top/passt-dev/20260928051727.2251281-3-anskuma@redhat.com/

applying [1/2] https://archives.passt.top/passt-dev/20260928051727.2251281-3-anskuma@redhat.com/
diff --git a/fuzz.h b/fuzz.h
new file mode 100644
index 00000000..311d7e79


applying [2/2] https://archives.passt.top/passt-dev/20260928051727.2251281-6-anskuma@redhat.com/
diff --git a/fuzz.h b/fuzz.h
index 311d7e79..16327506 100644

Checking patch fuzz.h...
Applied patch fuzz.h cleanly.
Checking patch fuzz.h...
Applied patch fuzz.h cleanly.

index at:
100644 16327506e90a6894c2e815899b64a19aba6a1651	fuzz.h

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).