All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] plugins: fix syscall filter return value type
@ 2026-06-18  8:24 Ziyang Zhang
  2026-06-18  8:24 ` [PATCH v2 1/1] plugins: use int64_t for the syscall filter return value Ziyang Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Ziyang Zhang @ 2026-06-18  8:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Riku Voipio, Laurent Vivier, Alex Bennee, Alexandre Iooss,
	Mahmoud Mandour, Pierrick Bouvier, Richard Henderson, Zhengwei Qi,
	Yun Wang, Mingyuan Xia, Kailiang Xu, Ziyang Zhang

Hi,

The sysret value of the syscall filter callback is declared as uint64_t,
but it is semantically signed: the negative range encodes errno. This
makes it int64_t, matching the ret parameter of
qemu_plugin_vcpu_syscall_ret_cb_t, which already uses int64_t for the
same syscall return value.

As discussed on v1, this is not a correctness fix (the filter only sets
sysret, so the bit pattern is the same either way); it is a consistency
and readability improvement, so that the same syscall return value is
typed the same way on the read side and the write side.

I did not bump QEMU_PLUGIN_VERSION, since this only changes the
signedness of an existing argument.

v1: https://lore.kernel.org/qemu-devel/20260612054800.587419-1-functioner@sjtu.edu.cn/

Changes since v1:
- rebased onto current master, where the syscall callbacks now take a
  userdata argument; the filter signatures were adjusted to keep that
  while changing only the sysret type. No functional change otherwise.

Thanks for your review.

Ziyang Zhang (1):
  plugins: use int64_t for the syscall filter return value

 include/plugins/qemu-plugin.h | 2 +-
 include/qemu/plugin.h         | 4 ++--
 linux-user/syscall.c          | 2 +-
 plugins/core.c                | 2 +-
 tests/tcg/plugins/setpc.c     | 2 +-
 tests/tcg/plugins/syscall.c   | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-19 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18  8:24 [PATCH v2 0/1] plugins: fix syscall filter return value type Ziyang Zhang
2026-06-18  8:24 ` [PATCH v2 1/1] plugins: use int64_t for the syscall filter return value Ziyang Zhang
2026-06-18 23:33   ` Pierrick Bouvier
2026-06-19 14:47   ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.