From patchwork Mon Mar 27 13:19:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1761695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=KG4P8opf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PlYLw2k6fz1yXq for ; Tue, 28 Mar 2023 00:19:36 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgmkv-0006Tq-Az; Mon, 27 Mar 2023 09:19:25 -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 1pgmkn-0006M2-Iu for qemu-devel@nongnu.org; Mon, 27 Mar 2023 09:19:19 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgmkl-00068a-Rc for qemu-devel@nongnu.org; Mon, 27 Mar 2023 09:19:17 -0400 Received: by mail-wr1-x42a.google.com with SMTP id r11so8753404wrr.12 for ; Mon, 27 Mar 2023 06:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923153; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jckH08pqbcbbsLcUW/+VqUgPktbh3N/7nJ1YFZfolzs=; b=KG4P8opf65Nk8Oo8SUyC0S0j0IC0jBUfTHCH5hrjEfyPfH8gbTiiKCb4rMVYkQpM9e thOZASh69ckVIfCyLLPl/Pbp8qfM2oJuh42hOa+e8YhJeHeCplqpli9lcIe28QsPtLTz Lm+lxveYVXx77YXje1C8fMeDCdQ9R1SGivl8K9ffz8NGT+8G7XO3cVgmCr4AOo1oF841 qWaViPgsN8BiMgr3n0xepig7JhrspA0LFVnn08qQbzQp2Y0wwTZ8AWPq5i+B9tMgruSf +V9n1kUi4SxDRYNJKnI9CfV/LNXjCQUX0WriRsgBnkzWq7/TOp7vUXhF0SMKSFB2oQuf 5VFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923153; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jckH08pqbcbbsLcUW/+VqUgPktbh3N/7nJ1YFZfolzs=; b=gQBOyOYbnIdU1hexcv4sgRZaV8UQdiOFP27L/0zUEfY5edu0Gv8sfmn/k8Kkt+GQwF WXoJhMpiSLRaE7wrfmA9eV25M+yPvrq6isYUlJV71VbFTwmVWU5ZMc7yriBJZqCCOGbf o5dDB0Q0Je63WWGKgdgnIU++styYr3/Eik6r399+fruSnHbq0md0rAnw3wbVi7uxASLG udivBLnGr2Ezf5N2GUfmjjiCnjkp36r17ZaxsHEZ/v0Ysyq9u+RbcRwcg/TUZMmgyORW sW5GIxViHj81tkQXyX4WHy/kJKQynNw4T52GOQwRplrUfk/KKf64PrnPcI/98QTftYVb rztA== X-Gm-Message-State: AAQBX9d4gb4MH5nySvADD87R7nwoij5b/5ByXvrs1oeknf1dj9lvJqD4 XTN1SzCGcIqdePPS2cgrOhTxWMrdYW2PHQlohxk= X-Google-Smtp-Source: AKy350YZiTRuoBhacxVw788DpbyVQmpMN1fCMzmZRogCKyzBfU4ezTEbyKfpJmmGawd0fB/UMbYcTw== X-Received: by 2002:adf:f807:0:b0:2cf:efa5:5322 with SMTP id s7-20020adff807000000b002cfefa55322mr12338076wrp.14.1679923153123; Mon, 27 Mar 2023 06:19:13 -0700 (PDT) Received: from localhost.localdomain (4be54-h02-176-184-9-157.dsl.sta.abo.bbox.fr. [176.184.9.157]) by smtp.gmail.com with ESMTPSA id x8-20020a5d6508000000b002cea299a575sm25161681wru.101.2023.03.27.06.19.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Mar 2023 06:19:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Artyom Tarasenko , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gregor Riepl , John Paul Adrian Glaubitz , Zach van Rijn Subject: [PATCH-for-8.0] linux-user/sparc: Don't use 16-bit UIDs on SPARC V9 Date: Mon, 27 Mar 2023 15:19:10 +0200 Message-Id: <20230327131910.78564-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The 64-bit SPARC V9 syscall ABI uses 32-bit UIDs. Only enable the 16-bit UID wrappers for 32-bit SPARC (V7 and V8). Possibly missed in commit 992f48a036 ("Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)"). Reported-by: Gregor Riepl Tested-by: John Paul Adrian Glaubitz Tested-by: Zach van Rijn Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1394 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Laurent Vivier --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 614a1cbc8e..cc37054cb5 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -61,7 +61,7 @@ #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \ || (defined(TARGET_ARM) && defined(TARGET_ABI32)) \ - || defined(TARGET_SPARC) \ + || (defined(TARGET_SPARC) && defined(TARGET_ABI32)) \ || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS) /* 16 bit uid wrappers emulation */ #define USE_UID16