summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorZiyang Zhang <functioner@sjtu.edu.cn>2026-06-18 16:24:26 +0800
committerPierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>2026-06-18 16:47:12 -0700
commit731525c27607bbe392abe3b8be2bce3ab65ae4f5 (patch)
tree960d56f675c881b3b7cb269255c6b5c1ff89b723 /linux-user
parent3b50303f9563a42538a1fd5c0ea7f952e23016e1 (diff)
downloadqemu-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 'linux-user')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fbe357b7e0..d257fb9ca9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -14619,7 +14619,7 @@ static bool send_through_syscall_filters(CPUState *cpu, int num,
abi_long arg7, abi_long arg8,
abi_long *sysret)
{
- uint64_t sysret64 = 0;
+ int64_t sysret64 = 0;
bool filtered = qemu_plugin_vcpu_syscall_filter(cpu, num, arg1, arg2,
arg3, arg4, arg5, arg6,
arg7, arg8, &sysret64);