From nobody Fri Nov 14 22:21:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1760014704; cv=none; d=zohomail.com; s=zohoarc; b=eznSnE9MgsoPui9Wm6lcOKL7XVycvH6ewXT6OibpwFbv+RkCeyFBZEcucsPmtnoXw0vK+FRScGkIGqI1XqT+NRGKCuXxNZ7AYHmT3OKP0L640c+AvDKD61f4jTbGTsEZt0wa4YtI0sAg7cvL0AV8hGidodcZhmmCRYPTbcwEKrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760014704; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qYkInKhhPBx5SouEm5tn+SG3ejCC9ViTxz2g3amQtFk=; b=ns+6F55PFqHMgrol5Rvvk1qOZAGtvXDDQYCUtwJePODPdmhYRmz2BZz0iayPEuwmnin7bBBlASmQCWOG69rKRKKoXAcnvSmjViK9HJyjroJe9GY5+0ewN0+1S95P8tlHox3lMPmWwziXDpv2SWrAk30xu8kh5OHt2rsxRKYEuEo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760014704028191.08501049322365; Thu, 9 Oct 2025 05:58:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v6qCK-0005E0-5h; Thu, 09 Oct 2025 08:56:44 -0400 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 1v6qCH-0005Dr-Ov for qemu-devel@nongnu.org; Thu, 09 Oct 2025 08:56:41 -0400 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v6qC2-0006CT-4e for qemu-devel@nongnu.org; Thu, 09 Oct 2025 08:56:40 -0400 Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by smtp-out2.suse.de (Postfix) with ESMTP id C8CAF1F78B; Thu, 9 Oct 2025 12:56:17 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 64E8D4A0784; Thu, 9 Oct 2025 14:56:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1760014577; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=qYkInKhhPBx5SouEm5tn+SG3ejCC9ViTxz2g3amQtFk=; b=GzHR4ODlwRIRbXioHfjChKpYm9CDd+/h/2HWM8RgnhQLHFeVowV106sFL1r6usD8iUM48z r8I51o+8a54tE5quzPB7RdIPT2Co++kd12LyPKy6cdghvSNTp3zLLDcPUCIo/z08W9jUDG vTc6ZEBnzhv/NJkb0k2u/u6P5nYLzfE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1760014577; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=qYkInKhhPBx5SouEm5tn+SG3ejCC9ViTxz2g3amQtFk=; b=lgwmATSE0bC7yd8YyCnWSPDMcdzeDUFR+NguTnSIXNrrcCTU3uX6rkgZWOXXsBmHfQXXth Br/ff7y+WzecXNDw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1760014577; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=qYkInKhhPBx5SouEm5tn+SG3ejCC9ViTxz2g3amQtFk=; b=GzHR4ODlwRIRbXioHfjChKpYm9CDd+/h/2HWM8RgnhQLHFeVowV106sFL1r6usD8iUM48z r8I51o+8a54tE5quzPB7RdIPT2Co++kd12LyPKy6cdghvSNTp3zLLDcPUCIo/z08W9jUDG vTc6ZEBnzhv/NJkb0k2u/u6P5nYLzfE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1760014577; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=qYkInKhhPBx5SouEm5tn+SG3ejCC9ViTxz2g3amQtFk=; b=lgwmATSE0bC7yd8YyCnWSPDMcdzeDUFR+NguTnSIXNrrcCTU3uX6rkgZWOXXsBmHfQXXth Br/ff7y+WzecXNDw== From: Andreas Schwab To: Laurent Vivier Subject: [PATCH] linux-user: fix layout of struct target_msq_id_ds CC: qemu-devel@nongnu.org Date: Thu, 09 Oct 2025 14:56:17 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Spamd-Result: default: False [-4.20 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.983]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid] X-Spam-Score: -4.20 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=schwab@suse.de; helo=smtp-out2.suse.de 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1760014715274116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The msg_lspid and msg_lrpid members are of type pid_t, which is a 32-bit integer. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0956a7b310..3dcdb3ef42 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4185,8 +4185,8 @@ struct target_msqid_ds abi_ulong __msg_cbytes; abi_ulong msg_qnum; abi_ulong msg_qbytes; - abi_ulong msg_lspid; - abi_ulong msg_lrpid; + unsigned int msg_lspid; + unsigned int msg_lrpid; abi_ulong __unused4; abi_ulong __unused5; }; @@ -4206,8 +4206,8 @@ static inline abi_long target_to_host_msqid_ds(struct= msqid_ds *host_md, host_md->__msg_cbytes =3D tswapal(target_md->__msg_cbytes); host_md->msg_qnum =3D tswapal(target_md->msg_qnum); host_md->msg_qbytes =3D tswapal(target_md->msg_qbytes); - host_md->msg_lspid =3D tswapal(target_md->msg_lspid); - host_md->msg_lrpid =3D tswapal(target_md->msg_lrpid); + host_md->msg_lspid =3D tswap32(target_md->msg_lspid); + host_md->msg_lrpid =3D tswap32(target_md->msg_lrpid); unlock_user_struct(target_md, target_addr, 0); return 0; } @@ -4227,8 +4227,8 @@ static inline abi_long host_to_target_msqid_ds(abi_ul= ong target_addr, target_md->__msg_cbytes =3D tswapal(host_md->__msg_cbytes); target_md->msg_qnum =3D tswapal(host_md->msg_qnum); target_md->msg_qbytes =3D tswapal(host_md->msg_qbytes); - target_md->msg_lspid =3D tswapal(host_md->msg_lspid); - target_md->msg_lrpid =3D tswapal(host_md->msg_lrpid); + target_md->msg_lspid =3D tswap32(host_md->msg_lspid); + target_md->msg_lrpid =3D tswap32(host_md->msg_lrpid); unlock_user_struct(target_md, target_addr, 1); return 0; } --=20 2.51.0 --=20 Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."