Cover Letter Detail
Show a cover letter.
GET /api/covers/2218280/?format=api
{ "id": 2218280, "url": "http://patchwork.ozlabs.org/api/covers/2218280/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260331173656.35305-1-xukl2019@sjtu.edu.cn/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260331173656.35305-1-xukl2019@sjtu.edu.cn>", "list_archive_url": null, "date": "2026-03-31T17:36:23", "name": "[v1,0/3] contrib/plugins: add syscall-filter local-library demos", "submitter": { "id": 93022, "url": "http://patchwork.ozlabs.org/api/people/93022/?format=api", "name": "XU Kailiang", "email": "xukl2019@sjtu.edu.cn" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260331173656.35305-1-xukl2019@sjtu.edu.cn/mbox/", "series": [ { "id": 498254, "url": "http://patchwork.ozlabs.org/api/series/498254/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498254", "date": "2026-03-31T17:36:25", "name": "contrib/plugins: add syscall-filter local-library demos", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498254/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2218280/comments/", "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flgwL3ZQNz1yGw\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 08:18:58 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w7gTL-0008Re-DI; Tue, 31 Mar 2026 17:18:03 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <xukl2019@sjtu.edu.cn>)\n id 1w7d99-0004xD-Cw\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 13:45:00 -0400", "from smtp232.sjtu.edu.cn ([202.120.2.232])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <xukl2019@sjtu.edu.cn>)\n id 1w7d97-0008BC-2A\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 13:44:58 -0400", "from proxy188.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188])\n by smtp232.sjtu.edu.cn (Postfix) with ESMTPS id 99C911049036B;\n Wed, 1 Apr 2026 01:37:46 +0800 (CST)", "from xuklXiaoxin (unknown [202.120.32.222])\n by proxy188.sjtu.edu.cn (Postfix) with ESMTPSA id D6D8437C8CA;\n Wed, 1 Apr 2026 01:37:45 +0800 (CST)" ], "From": "XU Kailiang <xukl2019@sjtu.edu.cn>", "To": "qemu-devel <qemu-devel@nongnu.org>", "Cc": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>,\n Ziyang Zhang <functioner@sjtu.edu.cn>, Yun Wang <yunwang94@sjtu.edu.cn>,\n Mingyuan Xia <xiamy@ultrarisc.com>, Zhengwei Qi <qizhwei@sjtu.edu.cn>,\n XU Kailiang <xukl2019@sjtu.edu.cn>", "Subject": "[PATCH v1 0/3] contrib/plugins: add syscall-filter local-library\n demos", "Date": "Wed, 1 Apr 2026 01:36:23 +0800", "Message-ID": "<20260331173656.35305-1-xukl2019@sjtu.edu.cn>", "X-Mailer": "git-send-email 2.53.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=202.120.2.232;\n envelope-from=xukl2019@sjtu.edu.cn;\n helo=smtp232.sjtu.edu.cn", "X-Spam_score_int": "1", "X-Spam_score": "0.1", "X-Spam_bar": "/", "X-Spam_report": "(0.1 / 5.0 requ) BAYES_00=-1.9,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no", "X-Spam_action": "no action", "X-Mailman-Approved-At": "Tue, 31 Mar 2026 17:18:00 -0400", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Hi,\n\nThis series adds two contrib/plugins examples for the linux-user syscall\nfilter API.\n\nThe first patch adds a minimal zlib-based demo. It redirects the guest\nloader's library open to a local thunk library and handles the thunk's\nmagic syscalls by calling the host zlib implementation directly.\n\nThe second patch adds a callback-capable qsort prototype. It shows that\nthe same interface can also bridge callback-style library calls back\ninto guest translated code, using a small thunk library plus a\nucontext-based host-side bridge.\n\nThe final patch extends both demos from the openat()-based loader path\nto open() and openat2().\n\nTo keep the examples small, both demos currently target x86_64\nlinux-user and assume guest_base == 0 on a little-endian 64-bit host,\nso guest virtual addresses are directly usable as host pointers. The\nqsort prototype is built only on hosts with working ucontext support.\n\nOnce the demo library path matches, both demos intentionally assert that\nopening the thunk library succeeds. These examples are meant to show the\nlocal-library hand-off path once a known thunk library is in place, not\nfallback behavior when that local library is missing or unusable.\n\nOne limitation is worth calling out explicitly: straightforward local\nlibrary hand-off is only part of the problem. Once execution needs to\nleave the guest, run host code, and then re-enter guest translated code\nagain, for example through a host-side function pointer callback,\nadditional target- and ABI-specific handling is needed. The qsort\nprototype shows one such bridge for x86_64 guest callbacks, but this\nseries does not attempt to provide a general solution for that broader\ncase.\n\nPatch 1 adds the zlib compression demo.\nPatch 2 adds the callback-capable qsort prototype.\nPatch 3 extends both demos to open() and openat2().\n\nReproduction instructions are included in docs/about/emulation.rst and\nin each example directory.\n\nThanks,\nXU Kailiang\n\nXU Kailiang (3):\n contrib/plugins: add a zlib compression filter example\n contrib/plugins: add a callback-capable qsort prototype\n contrib/plugins: handle more loader open syscalls in the syscall\n filter demos\n\n contrib/plugins/meson.build | 16 +-\n .../Makefile | 19 +\n .../README.rst | 47 ++\n .../callback-demo.c | 75 +++\n .../callback-qsort.h | 14 +\n .../callback-thunk.S | 38 ++\n .../plugins/syscall_filter_callback_qsort.c | 484 ++++++++++++++++++\n .../syscall_filter_zlib-example/Makefile | 19 +\n .../syscall_filter_zlib-example/README.rst | 44 ++\n .../zcompress-demo.c | 94 ++++\n .../zcompress-thunk.c | 35 ++\n .../zcompress-thunk.h | 16 +\n contrib/plugins/syscall_filter_zlib.c | 319 ++++++++++++\n docs/about/emulation.rst | 41 ++\n 14 files changed, 1260 insertions(+), 1 deletion(-)\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort-example/Makefile\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort-example/README.rst\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort-example/callback-demo.c\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort-example/callback-qsort.h\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort-example/callback-thunk.S\n create mode 100644 contrib/plugins/syscall_filter_callback_qsort.c\n create mode 100644 contrib/plugins/syscall_filter_zlib-example/Makefile\n create mode 100644 contrib/plugins/syscall_filter_zlib-example/README.rst\n create mode 100644 contrib/plugins/syscall_filter_zlib-example/zcompress-demo.c\n create mode 100644 contrib/plugins/syscall_filter_zlib-example/zcompress-thunk.c\n create mode 100644 contrib/plugins/syscall_filter_zlib-example/zcompress-thunk.h\n create mode 100644 contrib/plugins/syscall_filter_zlib.c\n\n\nbase-commit: 512b794b1091bc4810d28e8ef28addf6344c3889" }