1
The following changes since commit 27c94566379069fb8930bb1433dcffbf7df3203d:
1
The following changes since commit ca61fa4b803e5d0abaf6f1ceb690f23bb78a4def:
2
2
3
Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2020-04-30.for-upstream' into staging (2020-04-30 16:47:23 +0100)
3
Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211006' into staging (2021-10-06 12:11:14 -0700)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://github.com/stefanha/qemu.git tags/block-pull-request
7
https://gitlab.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to cc1adc4488059ac16d4d2772a7aa7cd1323deeca:
9
for you to fetch changes up to 1cc7eada97914f090125e588497986f6f7900514:
10
10
11
lockable: Replace locks with lock guard macros (2020-05-01 09:19:25 +0100)
11
iothread: use IOThreadParamInfo in iothread_[set|get]_param() (2021-10-07 15:29:50 +0100)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
Fix the QEMU_LOCK_GUARD() macros, use them more widely, and allow fuzzer
17
targets to be invoked depending on argv[0].
18
19
----------------------------------------------------------------
16
----------------------------------------------------------------
20
17
21
Alexander Bulekov (1):
18
Stefano Garzarella (2):
22
fuzz: select fuzz target using executable name
19
iothread: rename PollParamInfo to IOThreadParamInfo
20
iothread: use IOThreadParamInfo in iothread_[set|get]_param()
23
21
24
Daniel Brodsky (2):
22
iothread.c | 28 +++++++++++++++-------------
25
lockable: fix __COUNTER__ macro to be referenced properly
23
1 file changed, 15 insertions(+), 13 deletions(-)
26
lockable: replaced locks with lock guard macros where appropriate
27
28
Simran Singhal (1):
29
lockable: Replace locks with lock guard macros
30
31
include/qemu/lockable.h | 7 +++---
32
include/qemu/rcu.h | 2 +-
33
block/iscsi.c | 7 ++----
34
block/nfs.c | 51 +++++++++++++++++++----------------------
35
cpus-common.c | 14 ++++-------
36
hw/display/qxl.c | 43 ++++++++++++++++------------------
37
hw/hyperv/hyperv.c | 15 ++++++------
38
hw/rdma/rdma_backend.c | 50 ++++++++++++++++++++--------------------
39
hw/rdma/rdma_rm.c | 3 +--
40
hw/vfio/platform.c | 5 ++--
41
migration/migration.c | 3 +--
42
migration/multifd.c | 8 +++----
43
migration/ram.c | 3 +--
44
monitor/misc.c | 4 +---
45
tests/qtest/fuzz/fuzz.c | 19 ++++++++-------
46
ui/spice-display.c | 14 +++++------
47
util/log.c | 4 ++--
48
util/qemu-timer.c | 17 +++++++-------
49
util/rcu.c | 8 +++----
50
util/thread-pool.c | 3 +--
51
util/vfio-helpers.c | 5 ++--
52
slirp | 2 +-
53
22 files changed, 133 insertions(+), 154 deletions(-)
54
24
55
--
25
--
56
2.25.3
26
2.31.1
57
27
28
29
diff view generated by jsdifflib
New patch
1
From: Stefano Garzarella <sgarzare@redhat.com>
1
2
3
Commit 1793ad0247 ("iothread: add aio-max-batch parameter") added
4
a new parameter (aio-max-batch) to IOThread and used PollParamInfo
5
structure to handle it.
6
7
Since it is not a parameter of the polling mechanism, we rename the
8
structure to a more generic IOThreadParamInfo.
9
10
Suggested-by: Kevin Wolf <kwolf@redhat.com>
11
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
12
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
13
Message-id: 20210727145936.147032-2-sgarzare@redhat.com
14
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
15
---
16
iothread.c | 14 +++++++-------
17
1 file changed, 7 insertions(+), 7 deletions(-)
18
19
diff --git a/iothread.c b/iothread.c
20
index XXXXXXX..XXXXXXX 100644
21
--- a/iothread.c
22
+++ b/iothread.c
23
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
24
typedef struct {
25
const char *name;
26
ptrdiff_t offset; /* field's byte offset in IOThread struct */
27
-} PollParamInfo;
28
+} IOThreadParamInfo;
29
30
-static PollParamInfo poll_max_ns_info = {
31
+static IOThreadParamInfo poll_max_ns_info = {
32
"poll-max-ns", offsetof(IOThread, poll_max_ns),
33
};
34
-static PollParamInfo poll_grow_info = {
35
+static IOThreadParamInfo poll_grow_info = {
36
"poll-grow", offsetof(IOThread, poll_grow),
37
};
38
-static PollParamInfo poll_shrink_info = {
39
+static IOThreadParamInfo poll_shrink_info = {
40
"poll-shrink", offsetof(IOThread, poll_shrink),
41
};
42
-static PollParamInfo aio_max_batch_info = {
43
+static IOThreadParamInfo aio_max_batch_info = {
44
"aio-max-batch", offsetof(IOThread, aio_max_batch),
45
};
46
47
@@ -XXX,XX +XXX,XX @@ static void iothread_get_param(Object *obj, Visitor *v,
48
const char *name, void *opaque, Error **errp)
49
{
50
IOThread *iothread = IOTHREAD(obj);
51
- PollParamInfo *info = opaque;
52
+ IOThreadParamInfo *info = opaque;
53
int64_t *field = (void *)iothread + info->offset;
54
55
visit_type_int64(v, name, field, errp);
56
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
57
const char *name, void *opaque, Error **errp)
58
{
59
IOThread *iothread = IOTHREAD(obj);
60
- PollParamInfo *info = opaque;
61
+ IOThreadParamInfo *info = opaque;
62
int64_t *field = (void *)iothread + info->offset;
63
int64_t value;
64
65
--
66
2.31.1
67
68
diff view generated by jsdifflib
1
From: Alexander Bulekov <alxndr@bu.edu>
1
From: Stefano Garzarella <sgarzare@redhat.com>
2
2
3
The fuzzers are built into a binary (e.g. qemu-fuzz-i386). To select the
3
Commit 0445409d74 ("iothread: generalize
4
device to fuzz/fuzz target, we usually use the --fuzz-target= argument.
4
iothread_set_param/iothread_get_param") moved common code to set and
5
This commit allows the fuzz-target to be specified using the name of the
5
get IOThread parameters in two new functions.
6
executable. If the executable name ends with -target-FUZZ_TARGET, then
7
we select the fuzz target based on this name, rather than the
8
--fuzz-target argument. This is useful for systems such as oss-fuzz
9
where we don't have control of the arguments passed to the fuzzer.
10
6
11
[Fixed incorrect indentation.
7
These functions are called inside callbacks, so we don't need to use an
12
--Stefan]
8
opaque pointer. Let's replace `void *opaque` parameter with
9
`IOThreadParamInfo *info`.
13
10
14
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
11
Suggested-by: Kevin Wolf <kwolf@redhat.com>
15
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
12
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
16
Message-id: 20200421182230.6313-1-alxndr@bu.edu
13
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14
Message-id: 20210727145936.147032-3-sgarzare@redhat.com
17
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
15
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
18
---
16
---
19
tests/qtest/fuzz/fuzz.c | 19 +++++++++++--------
17
iothread.c | 18 ++++++++++--------
20
slirp | 2 +-
18
1 file changed, 10 insertions(+), 8 deletions(-)
21
2 files changed, 12 insertions(+), 9 deletions(-)
22
19
23
diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
20
diff --git a/iothread.c b/iothread.c
24
index XXXXXXX..XXXXXXX 100644
21
index XXXXXXX..XXXXXXX 100644
25
--- a/tests/qtest/fuzz/fuzz.c
22
--- a/iothread.c
26
+++ b/tests/qtest/fuzz/fuzz.c
23
+++ b/iothread.c
27
@@ -XXX,XX +XXX,XX @@ static void usage(char *path)
24
@@ -XXX,XX +XXX,XX @@ static IOThreadParamInfo aio_max_batch_info = {
28
printf(" * %s : %s\n", tmp->target->name,
25
};
29
tmp->target->description);
26
27
static void iothread_get_param(Object *obj, Visitor *v,
28
- const char *name, void *opaque, Error **errp)
29
+ const char *name, IOThreadParamInfo *info, Error **errp)
30
{
31
IOThread *iothread = IOTHREAD(obj);
32
- IOThreadParamInfo *info = opaque;
33
int64_t *field = (void *)iothread + info->offset;
34
35
visit_type_int64(v, name, field, errp);
36
}
37
38
static bool iothread_set_param(Object *obj, Visitor *v,
39
- const char *name, void *opaque, Error **errp)
40
+ const char *name, IOThreadParamInfo *info, Error **errp)
41
{
42
IOThread *iothread = IOTHREAD(obj);
43
- IOThreadParamInfo *info = opaque;
44
int64_t *field = (void *)iothread + info->offset;
45
int64_t value;
46
47
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
48
static void iothread_get_poll_param(Object *obj, Visitor *v,
49
const char *name, void *opaque, Error **errp)
50
{
51
+ IOThreadParamInfo *info = opaque;
52
53
- iothread_get_param(obj, v, name, opaque, errp);
54
+ iothread_get_param(obj, v, name, info, errp);
55
}
56
57
static void iothread_set_poll_param(Object *obj, Visitor *v,
58
const char *name, void *opaque, Error **errp)
59
{
60
IOThread *iothread = IOTHREAD(obj);
61
+ IOThreadParamInfo *info = opaque;
62
63
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
64
+ if (!iothread_set_param(obj, v, name, info, errp)) {
65
return;
30
}
66
}
31
+ printf("Alternatively, add -target-FUZZ_TARGET to the executable name\n");
67
32
exit(0);
68
@@ -XXX,XX +XXX,XX @@ static void iothread_set_poll_param(Object *obj, Visitor *v,
69
static void iothread_get_aio_param(Object *obj, Visitor *v,
70
const char *name, void *opaque, Error **errp)
71
{
72
+ IOThreadParamInfo *info = opaque;
73
74
- iothread_get_param(obj, v, name, opaque, errp);
75
+ iothread_get_param(obj, v, name, info, errp);
33
}
76
}
34
77
35
@@ -XXX,XX +XXX,XX @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
78
static void iothread_set_aio_param(Object *obj, Visitor *v,
36
module_call_init(MODULE_INIT_QOM);
79
const char *name, void *opaque, Error **errp)
37
module_call_init(MODULE_INIT_LIBQOS);
80
{
38
81
IOThread *iothread = IOTHREAD(obj);
39
- if (*argc <= 1) {
82
+ IOThreadParamInfo *info = opaque;
40
+ target_name = strstr(**argv, "-target-");
83
41
+ if (target_name) { /* The binary name specifies the target */
84
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
42
+ target_name += strlen("-target-");
85
+ if (!iothread_set_param(obj, v, name, info, errp)) {
43
+ } else if (*argc > 1) { /* The target is specified as an argument */
86
return;
44
+ target_name = (*argv)[1];
45
+ if (!strstr(target_name, "--fuzz-target=")) {
46
+ usage(**argv);
47
+ }
48
+ target_name += strlen("--fuzz-target=");
49
+ } else {
50
usage(**argv);
51
}
87
}
52
88
53
/* Identify the fuzz target */
54
- target_name = (*argv)[1];
55
- if (!strstr(target_name, "--fuzz-target=")) {
56
- usage(**argv);
57
- }
58
-
59
- target_name += strlen("--fuzz-target=");
60
-
61
fuzz_target = fuzz_get_target(target_name);
62
if (!fuzz_target) {
63
usage(**argv);
64
diff --git a/slirp b/slirp
65
index XXXXXXX..XXXXXXX 160000
66
--- a/slirp
67
+++ b/slirp
68
@@ -1 +1 @@
69
-Subproject commit 2faae0f778f818fadc873308f983289df697eb93
70
+Subproject commit 55ab21c9a36852915b81f1b41ebaf3b6509dd8ba
71
--
89
--
72
2.25.3
90
2.31.1
73
91
92
diff view generated by jsdifflib