Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228175/?format=api
{ "id": 2228175, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228175/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260425155140.50186-13-deller@kernel.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260425155140.50186-13-deller@kernel.org>", "date": "2026-04-25T15:51:38", "name": "[PULL,12/14] linux-user: Fix CLONE_PARENT_SETTID when using fork-like clone", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "58cd30823e6f57b9288039023c9c5c915adfe93b", "submitter": { "id": 87076, "url": "http://patchwork.ozlabs.org/api/1.1/people/87076/?format=api", "name": "Helge Deller", "email": "deller@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260425155140.50186-13-deller@kernel.org/mbox/", "series": [ { "id": 501448, "url": "http://patchwork.ozlabs.org/api/1.1/series/501448/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501448", "date": "2026-04-25T15:51:29", "name": "[PULL,01/14] MAINTAINERS: Add myself as maintainer for linux-user", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501448/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228175/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228175/checks/", "tags": {}, "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\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=KqWvbJHl;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.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 4g2vVz2mGPz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 01:53:15 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wGfIo-00087F-Gq; Sat, 25 Apr 2026 11:52:18 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wGfIf-00083q-8B\n for qemu-devel@nongnu.org; Sat, 25 Apr 2026 11:52:12 -0400", "from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wGfId-00017Q-P7\n for qemu-devel@nongnu.org; Sat, 25 Apr 2026 11:52:09 -0400", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id C861B600AE;\n Sat, 25 Apr 2026 15:52:06 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 1B8C1C2BCB0;\n Sat, 25 Apr 2026 15:52:04 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1777132326;\n bh=z9prjR+BocYciwsUKoSOvL3HoAICSfSydNGV4GRnsv0=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=KqWvbJHl80trkUc/MsAqtszv5fo7gAGlaSVduhY/iPvFSfQ8nJo5UOYCdE0mYdh7H\n eZEQ6mJ+jVUFsw+TskVH6Id+g+Edz2mmqv/K8cEHe6OBJvOZX+c1a/MjT87pAZnx8e\n JuDzsiliLJnS7nsfv58tNJXGB1ejf1ij001nwqnZUM7D9/MKAs8Sc0oE6aMyWPHogN\n nxRPnh8SFpqf7afqQHeHLAz4Sh+8ecRCrIUGJi4pCnm8+01CaNiZmGN9BOrK5e5b6u\n 28Ybpvi1D4YkotnvNfRRviGtR29tsDHzt96mLG9zae3xXjHiu0nO3cUFVDWC2hp1OB\n SrqP+Cs/vtP+g==", "From": "Helge Deller <deller@kernel.org>", "To": "qemu-devel@nongnu.org", "Cc": "Helge Deller <deller@gmx.de>, Jiaxun Yang <jiaxun.yang@flygoat.com>,\n Laurent Vivier <laurent@vivier.eu>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, =?utf-8?q?Philippe_Mathieu-?=\n\t=?utf-8?q?Daud=C3=A9?= <philmd@linaro.org>", "Subject": "[PULL 12/14] linux-user: Fix CLONE_PARENT_SETTID when using fork-like\n clone", "Date": "Sat, 25 Apr 2026 17:51:38 +0200", "Message-ID": "<20260425155140.50186-13-deller@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260425155140.50186-1-deller@kernel.org>", "References": "<20260425155140.50186-1-deller@kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2600:3c04:e001:324:0:1991:8:25;\n envelope-from=deller@kernel.org; helo=tor.source.kernel.org", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n 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": "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": "From: Helge Deller <deller@gmx.de>\n\nThe CLONE_PARENT_SETTID option requires the implementation to store the\nchild thread ID at the location pointed to by parent_tid in the parent's\nmemory.\n\nFix our implementation and move the code from the client side (where\nfork returned 0), to the parent side and store the return value from the\nfork call (which is the client TID) in the parent_tid pointer.\n\nResolves: https://gitlab.com/qemu-project/qemu/-/work_items/3340\nSigned-off-by: Helge Deller <deller@gmx.de>\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\n---\n linux-user/syscall.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/linux-user/syscall.c b/linux-user/syscall.c\nindex d0390e04b4..910a4da0a6 100644\n--- a/linux-user/syscall.c\n+++ b/linux-user/syscall.c\n@@ -7050,8 +7050,6 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,\n the child process gets its own copy of the lock. */\n if (flags & CLONE_CHILD_SETTID)\n put_user_u32(sys_gettid(), child_tidptr);\n- if (flags & CLONE_PARENT_SETTID)\n- put_user_u32(sys_gettid(), parent_tidptr);\n ts = get_task_state(cpu);\n if (flags & CLONE_SETTLS)\n cpu_set_tls (env, newtls);\n@@ -7059,6 +7057,8 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,\n ts->child_tidptr = child_tidptr;\n } else {\n cpu_clone_regs_parent(env, flags);\n+ if (flags & CLONE_PARENT_SETTID)\n+ put_user_u32(ret, parent_tidptr);\n if (flags & CLONE_PIDFD) {\n int pid_fd = 0;\n #if defined(__NR_pidfd_open) && defined(TARGET_NR_pidfd_open)\n", "prefixes": [ "PULL", "12/14" ] }