From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 734C1CCF9E3 for ; Mon, 10 Nov 2025 13:49:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vISG5-0001gf-J0; Mon, 10 Nov 2025 08:48:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIS4D-0008NT-Kb for qemu-devel@nongnu.org; Mon, 10 Nov 2025 08:36:21 -0500 Received: from smtp232.sjtu.edu.cn ([202.120.2.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIS4B-0003t3-4W for qemu-devel@nongnu.org; Mon, 10 Nov 2025 08:36:21 -0500 Received: from proxy188.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp232.sjtu.edu.cn (Postfix) with ESMTPS id 3088A1283F14E; Mon, 10 Nov 2025 21:35:52 +0800 (CST) Received: from localhost.localdomain (unknown [202.120.40.100]) by proxy188.sjtu.edu.cn (Postfix) with ESMTPSA id 5BF2E37C8EE; Mon, 10 Nov 2025 21:35:51 +0800 (CST) From: Ziyang Zhang 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 Subject: [PATCH 0/2] linux-user: add a syscall-filter plugin API Date: Mon, 10 Nov 2025 21:34:41 +0800 Message-Id: <20251110133442.579086-1-functioner@sjtu.edu.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=202.120.2.232; envelope-from=functioner@sjtu.edu.cn; helo=smtp232.sjtu.edu.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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/1341969682.5812455.1761115945695.JavaMail.zimbra@sjtu.edu.cn/ 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 -- 2.34.1