Skip to content

linux-user: add a syscall-filter plugin API

Ziyang Zhang qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Changes in v1 from the cover letter

1. Add syscall filter registry
2. Add fork-cpu interface to re-enter cpu_loop when handling syscalls

[1] https://lore.kernel.org/qemu-devel/[email protected]/

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2linux-user: add a plugin API to filter syscallsinclude/qemu/plugin-event.h include/qemu/plugin.h include/qemu/qemu-plugin.h +4 more+111 -102 replies
2/2tcg tests: add a test to verify the syscall filter plugin APItests/tcg/multiarch/Makefile.target tests/tcg/multiarch/test-plugin-syscall-filter.c tests/tcg/plugins/syscall.c+38 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMingyuan XiaPierrick Bouvier
1/2Co-authored-by R-b
2/2Co-authored-by R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] linux-user: add a syscall-filter plugin API

We have improved the code format of RFC V2 [1] as suggested.

This patch modifies the indentation only.

RFC v2:
1. Simplify the syscall filter mechanism and remove fork-cpu
2. Add QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER enum

RFC v1:
1. Add syscall filter registry
2. Add fork-cpu interface to re-enter cpu_loop when handling syscalls

[1] https://lore.kernel.org/qemu-devel/[email protected]/

Ziyang Zhang, Mingyuan Xia (2):
linux-user: add a plugin API to filter syscalls
tcg tests: add a test to verify the syscall filter plugin API

 include/qemu/plugin-event.h                   |  1 +
 include/qemu/plugin.h                         | 29 ++++++++++-----
 include/qemu/qemu-plugin.h                    | 24 +++++++++++++
 include/user/syscall-trace.h                  | 17 +++++++++
 linux-user/syscall.c                          |  7 ++--
 plugins/api.c                                 |  7 ++++
 plugins/core.c                                | 36 +++++++++++++++++++
 tests/tcg/multiarch/Makefile.target           |  4 ++-
 .../multiarch/test-plugin-syscall-filter.c    | 20 +++++++++++
 tests/tcg/plugins/syscall.c                   | 15 ++++++++
 10 files changed, 149 insertions(+), 11 deletions(-)
 create mode 100644 tests/tcg/multiarch/test-plugin-syscall-filter.c
Signature · 1 line
2.34.1