From nobody Sat Apr 11 23:02:25 2026 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=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1772991065; cv=none; d=zohomail.com; s=zohoarc; b=P/6Lgb0lqXO3c41u92myNNDiJCzRECOahyyuPzZCL+CWVq3ejMsOPYegUVr6MfSoJXR5N2m3zpJJ6h3a1LVvnuoCqD2wmKZzN4ZQiTim9zfGkTpmunVoCJTk4yyi8e0GM/ueGp6YAJFW7QsI6d/n02sBH9+NjIh7wE60SqI3UgI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772991065; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C60/E/IVj9dnvYUqWaAM/Zqf1/21G4/fN1AXYPsrhnI=; b=DGMUfRzIEUhTGN1Sa32wSz0INxyWt5VZXl9uxlppG1i/Hh/F1TuWky8rmnRDfbVD7eMK6v/DNvTHD2GML7WQrViVOz6tjNjruNc0FKedpM1ILadglgdmekTlkjiHzYzEz1Nc7yHRTT9sIV0QOAY2N75orw7PCtBWFkqR49dqqRs= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772991065584671.2788823635159; Sun, 8 Mar 2026 10:31:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzHxK-0003my-8i; Sun, 08 Mar 2026 13:30:26 -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 1vzHx4-0003gs-05 for qemu-devel@nongnu.org; Sun, 08 Mar 2026 13:30:04 -0400 Received: from tor.source.kernel.org ([172.105.4.254]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzHwz-0003oP-SF for qemu-devel@nongnu.org; Sun, 08 Mar 2026 13:30:00 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id E2AE9600AE; Sun, 8 Mar 2026 17:29:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83375C116C6; Sun, 8 Mar 2026 17:29:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772990995; bh=yQjfyq4uMUjaesM0EhyZ3X0IrXyyB6Sp6uAxR9zq4is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MaltPUDf96x5QiTRn/Wxfn67H+Upu2aP92/UMbCDS0WPZGHQ94822XKRqATgkASCh PT9n3Qy/pDirYQHMobHz/uYdkdOEUMF1JRUkCR9LvPeGP87NN5UEyaif8dvIGEIV5J 7cHOg6gOZ3En/2As3hgT9558yGj9+WKLsK5O8KdnDhuNzeV2ySSV+PUSK2oUH5B8Re lBsAJu0dOCXYxEbCB9lyZ15SRXDHPt0mGNb+1Iew8DKZrDIkeVv5RoTv3qNl1kj/5r zwzZloeZ/zEKt7R19lKs2vr9rhrBAfpimBx452O+d1Ow99Zr/yGJViilGYNODV2moj 938t8ofvemzPQ== From: deller@kernel.org To: qemu-devel@nongnu.org Cc: Kyle Evans , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier , Warner Losh , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , deller@gmx.de, Richard Henderson , Pierrick Bouvier Subject: [PULL 06/12] linux-user: fix matching ioctl numbers in print_ioctl Date: Sun, 8 Mar 2026 18:29:30 +0100 Message-ID: <20260308172936.2835-7-deller@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260308172936.2835-1-deller@kernel.org> References: <20260308172936.2835-1-deller@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=172.105.4.254; envelope-from=deller@kernel.org; helo=tor.source.kernel.org X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 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 @kernel.org) X-ZM-MESSAGEID: 1772991065888158500 Content-Type: text/plain; charset="utf-8" From: Andreas Schwab target_cmd in struct IOCTLEntry is a signed int. Make sure the ioctl cmd argument in the syscall is converted to int when matching, so that it works correctly with an ioctl cmd that has bit 31 set. Signed-off-by: Andreas Schwab Reviewed-by: Helge Deller Signed-off-by: Helge Deller --- linux-user/strace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 02d610a7f8..2cbaf94c89 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1021,12 +1021,12 @@ print_syscall_ret_ioctl(CPUArchState *cpu_env, cons= t struct syscallname *name, int target_size; =20 for (ie =3D ioctl_entries; ie->target_cmd !=3D 0; ie++) { - if (ie->target_cmd =3D=3D arg1) { + if (ie->target_cmd =3D=3D (int)arg1) { break; } } =20 - if (ie->target_cmd =3D=3D arg1 && + if (ie->target_cmd =3D=3D (int)arg1 && (ie->access =3D=3D IOC_R || ie->access =3D=3D IOC_RW)) { arg_type =3D ie->arg_type; qemu_log(" ("); @@ -4359,7 +4359,7 @@ print_ioctl(CPUArchState *cpu_env, const struct sysca= llname *name, int target_size; =20 for (ie =3D ioctl_entries; ie->target_cmd !=3D 0; ie++) { - if (ie->target_cmd =3D=3D arg1) { + if (ie->target_cmd =3D=3D (int)arg1) { break; } } --=20 2.53.0