diff options
| author | Ziyang Zhang <functioner@sjtu.edu.cn> | 2026-06-18 16:24:26 +0800 |
|---|---|---|
| committer | Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> | 2026-06-18 16:47:12 -0700 |
| commit | 731525c27607bbe392abe3b8be2bce3ab65ae4f5 (patch) | |
| tree | 960d56f675c881b3b7cb269255c6b5c1ff89b723 /plugins | |
| parent | 3b50303f9563a42538a1fd5c0ea7f952e23016e1 (diff) | |
| download | qemu-731525c27607bbe392abe3b8be2bce3ab65ae4f5.tar.gz qemu-731525c27607bbe392abe3b8be2bce3ab65ae4f5.zip | |
plugins: use int64_t for the syscall filter return value
The syscall return value passed back through the syscall filter
callback is semantically signed: negative values encode errno codes.
Declaring the sysret pointer as uint64_t * is therefore misleading and
forces callers to launder the value through an unsigned temporary.
Change the sysret pointer to int64_t * across the public plugin API
typedef (qemu_plugin_vcpu_syscall_filter_cb_t), the internal
qemu_plugin_vcpu_syscall_filter() prototypes and stub, its
implementation in plugins/core.c, the linux-user caller, and the
in-tree example plugins.
Signed-off-by: Ziyang Zhang <functioner@sjtu.edu.cn>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260618082426.790315-2-functioner@sjtu.edu.cn
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/core.c b/plugins/core.c index 4b55aacd2d..1113bfe567 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -573,7 +573,7 @@ bool qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a5, uint64_t a6, uint64_t a7, - uint64_t a8, uint64_t *sysret) + uint64_t a8, int64_t *sysret) { struct qemu_plugin_cb *cb, *next; enum qemu_plugin_event ev = QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER; |
