From nobody Sun Feb 8 19:38:04 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 ARC-Seal: i=1; a=rsa-sha256; t=1676590496; cv=none; d=zohomail.com; s=zohoarc; b=WsPLibuu6KpfexAu2015Ucd2kcJD1SGB1K2EDh/VDBWLoy+BhWpUU9INH0koETappfRAASavYOAVPg3qFYkGrBRNCaDDgzKbGIa/HZQjC//Plz9StQjF+hlW7DyMqzrJsKR79KqDEWR8pG7i4hxpjFtgSZM1nRGRTzDtv5KlQfs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676590496; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=v82U4AeojucC3DQqhT5F05E7FmGdLYXG/H9YwykhwGc=; b=lRQxybWj0DwjGdZ75aXrzyTs6IAZwskJ+WrJ3KIs1N9nytHBSFokgB5E500Itx+1JhI73D0CvKbzIXQHqiiRfRODUmKBSAw1kE9zoUIAFzWCF6ENaaDhZP+klV3PcIgdoyWVpSRMDSShMhQwIC0SDuhCbX4cbuv5Iw2L349f69k= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676590496779457.18412931462274; Thu, 16 Feb 2023 15:34:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSnlL-0008Ub-HB; Thu, 16 Feb 2023 18:34:03 -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 1pSnlG-0008SQ-Ip for qemu-devel@nongnu.org; Thu, 16 Feb 2023 18:33:58 -0500 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSnlE-0008Ph-Pp for qemu-devel@nongnu.org; Thu, 16 Feb 2023 18:33:58 -0500 Received: by mail-il1-x130.google.com with SMTP id v13so1422503iln.4 for ; Thu, 16 Feb 2023 15:33:56 -0800 (PST) Received: from dune.bsdimp.com (c-71-237-47-177.hsd1.co.comcast.net. [71.237.47.177]) by smtp.gmail.com with ESMTPSA id y7-20020a02a387000000b00346a98b0a76sm934816jak.77.2023.02.16.15.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 15:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v82U4AeojucC3DQqhT5F05E7FmGdLYXG/H9YwykhwGc=; b=zKdv/Pn8yayE8JFx3+Wz7/lkpVBdRFXuRrc2u5CAet2xgnWEts63iGIpzT7hvaB0zG 9LxgJdiTZ9KJi35LvBYycgPZEu/04i6oG1V0WGX+6vciOjd4mcTylqeMLrdupvKtJfqm mCdWC/b9bjuNeMwgThAJoRcSOo+QH0oO11z1R/1TSu/BrXjTAdU741Wcg5+OPiD3qoPz 0qfYvoZGzzzdmHLNd/PsojF2OQv+y3A23WtiCzvr+t+2d4ZfJMGRvoXHQQbkYUde9ebZ h25j5qt+ST33wbNyj1MMCAGLfcIzR3DCNq8G6ln35tRLDuskosTCrW2lcoM+ennr6jeR bzdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v82U4AeojucC3DQqhT5F05E7FmGdLYXG/H9YwykhwGc=; b=DYWvauv29U3b3lb6GCX5o7TOuVjfAegTub30KFNWY8vXr+K06rC9RsjzPoA6aBiyul keHeWvDspjIL2KTLNq7VL+JrCUjsSy6YQy+1tSbSXN6ZDTtnM3Awn0BCGQr8plRObFHB gggjhsKs11qjX2h9x9086Wi5svlywyV0k/IAjhnmscg8+PU3VvsliTHhOKlHbKsCTLdk OBAy0KHDpcjbA0jfmVIiuNZMNjUTkBaWmnO/tvxCx2EA571Xfdpnnz5KQftiXV5ZZemZ Skvjz1mtOXui2apvexpRJdhlNFR+n9D1beC9OsYUsla1bpVFlXBcNkx+eqxsilCO0Pjn 9lAw== X-Gm-Message-State: AO0yUKVkN/Fx1PGWnPk4Bj9I4leGmLpweqe7ZvxScZTeD9+tbeGeXTJb dhojAuaokDr4Nq16nwAOqnPYpYVRnp14bRBm X-Google-Smtp-Source: AK7set8h90//KLnQjJX+jwtTUl+OZnEIQFk2uPuD3qwqWYnMWtfDVujWRUTVZLZVIni6D94H7QtbeQ== X-Received: by 2002:a05:6e02:1e02:b0:315:29ff:da7f with SMTP id g2-20020a056e021e0200b0031529ffda7fmr7591716ila.11.1676590434945; Thu, 16 Feb 2023 15:33:54 -0800 (PST) From: Warner Losh To: qemu-devel@nongnu.org Cc: Kyle Evans , richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , f4bug@amsat.org, Warner Losh , Paolo Bonzini , Thomas Huth , Doug Rabson Subject: [PATCH v3 01/11] bsd-user: Don't truncate the return value from freebsd_syscall Date: Thu, 16 Feb 2023 16:33:43 -0700 Message-Id: <20230216233353.13944-2-imp@bsdimp.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230216233353.13944-1-imp@bsdimp.com> References: <20230216233353.13944-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::130; envelope-from=imp@bsdimp.com; helo=mail-il1-x130.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @bsdimp-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1676590497547100005 Content-Type: text/plain; charset="utf-8" From: Doug Rabson System call return values on FreeBSD are in a register (which is spelled abi_long in qemu). This was being assigned into an int variable which causes problems for 64bit targets. Resolves: https://github.com/qemu-bsd-user/qemu-bsd-user/issues/40 Signed-off-by: Doug Rabson Reviewed-by: Warner Losh [ Edited commit message for upstreaming into qemu-project ] Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index 57996cad8ae..b4a663fc021 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -512,7 +512,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi= _long arg1, abi_long arg8) { CPUState *cpu =3D env_cpu(cpu_env); - int ret; + abi_long ret; =20 trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6,= arg7, arg8); if (do_strace) { --=20 2.39.1