From patchwork Tue Mar 12 18:41:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779775 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2168903wrt; Tue, 12 Mar 2024 11:41:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXIckZQJ5nkl9N3FvkgqvlNdSc6XoC+o3R+R7moRMkv88V8eHHEkaOz4LN0UqaUpU0aWZd2FxD7YTLUCN95vAUq X-Google-Smtp-Source: AGHT+IHoaaa+XG4RG09CQ1KwwPDRO54F6i5SMtNu/vOR/kuwl98A9sRJJPvEJFCmFqPXTQcyXtha X-Received: by 2002:a81:7303:0:b0:60a:5372:acf4 with SMTP id o3-20020a817303000000b0060a5372acf4mr349144ywc.11.1710268897755; Tue, 12 Mar 2024 11:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268897; cv=none; d=google.com; s=arc-20160816; b=oWysRfjoI8k4NS/6gp5nkryIUKnqvY8zyYBVlU0KeDuG+GPuTP7qmet88IxQUIp0uq jSyIocZVLlCo7/8Z+JTidrzM0xjeHzXZS9R7ZMV66W9V9JDPhrwxOFPbR1hw6aRvO82d u+3dtlMfm+jMwvdNqGXi64T0XSmj+M3gis4k3zd5GpJlnDkPN7x4A10VUIPtzzv+2C1B gXZ74Q44fdUGxUM8xfFJ4cnLxJYCqVnl8Y89m2WCIjbBOZgQetxZoHGNWRlgSUx2K2wk ByIRAlQayXc6qkIvkxlH5qP54E2wO/SqpfkQcfY0uPiWrpuRm3yCYOXqZjZ0V2pgOMj5 maWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rjlfxfhEdFjoQzS7fGHXrM249N7fWoW3k9qQmZDIWL4=; fh=/pm+qdc9lcpQnJItYieP7NHZkZJ/dfDi9Bv5SK0fi7k=; b=PjGBCuH8OMgqE/JtzYZOaklT9RIJZfIBUeiVmf2ifkZJWvc/KXq/H/aL4yHXlSoIGt +GyyPULzmIWurkbmynxhblnQrlKZZSX1foHKdziVs7NGgmH36CDdrmINaTavQD0Dkld1 tRUjjrSXsXGnlTxvHQ0jVqrkQjlwsiHbjg3FatRD00nJOhBBLSIYh1ZaKtZn6gEGskGb yvz2MzfDcFdIJ2k353nJqOu4HJfOblV8NOsyVn+v23bRsr167IK1Wka6hLuWXMbbmS7a ggb7gdXB6LovzvBvSDnrPNxV3sxFzhGpPxQKNv1WlKG8j4bbzHh8nSoGZJwr9IpCJjKF McLg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pD/qDVa1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f12-20020a05622a1a0c00b0042ef88c5c5dsi8186893qtb.52.2024.03.12.11.41.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pD/qDVa1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk743-0000LW-LZ; Tue, 12 Mar 2024 14:41:29 -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 1rk73z-0000L2-Tr for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:23 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk73x-0001Ka-H7 for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:23 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1dd9066b7c3so1897745ad.2 for ; Tue, 12 Mar 2024 11:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268880; x=1710873680; darn=nongnu.org; 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=rjlfxfhEdFjoQzS7fGHXrM249N7fWoW3k9qQmZDIWL4=; b=pD/qDVa17Alu/sMrs1Q8Km0Yb3UN28a8OoQxBHq1AhqzFeFHEoZ8NwEVDoiIuCsdXB 2Bjg8KjYXzZ4omt1vxMw/LoVD0Ln4IjSWs9G3k27ar7O+EKXuqNiUZyloh/TOQeh74Ss dQpEaXWEFmNWCl/zg3WvzNCMO8X9sYSImS9NHrHdrpLyX0c9qIzlsbYNFNOFPKF7uk8r xXMISd7GY2XiM16YpYVFNPIHwH+trhm1bX4keKJoxx0QzmIhhB8tqHrJNqwMUC2h7+iF qF7KXc3IWuEY1115zUaMTBKnZHAxLUQve5/XZRcTy7OmlyJL3O/BsnsPUvWLj1TL09hf jHKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268880; x=1710873680; 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=rjlfxfhEdFjoQzS7fGHXrM249N7fWoW3k9qQmZDIWL4=; b=Py9rDk0HwiQ4nBjkcfCqWp5HaUPz/JZ28o512WP+OG5qKv14uy4Bur3uMR9F3KkZs0 0gxbdP3SVzToHcpa6uXseAShBcy+1QgMRdReNT6+fq1hCog8WcPw+Bx9NYybFQMH331T u2A/EyZJJF6C4kdlHBB2vTVvtjrX8js0NxMBCrnZ//Vk1+3Bsw7jnFuUpJFve5vKrDbS epQJdEplSkr3WUE3iOIesDHXWn+EMRwHA6GQ1I6XnUfk+fblxT7OMmScGF7R+UtEjUP8 3EDNXOsmeswXqLS1bLj+F0R04gVJL+uH+L+gDKFLfRmtLpx+Cxc5e4mvRhlVJdbzvuvF kOsg== X-Gm-Message-State: AOJu0YxjQ8eeAcTv9IZoTaUxP6GnQDDPihgqjOhxBdiAtCkAKL5rbn4L TjpIn3IZovnVLjOhloUXwn44IqeM7M9Qyz/8rML4XeiXVWuUjJuru5gPordkG+S4zOOs+3PC5cE w X-Received: by 2002:a17:902:d2d0:b0:1dd:9957:2989 with SMTP id n16-20020a170902d2d000b001dd99572989mr5537134plc.19.1710268879683; Tue, 12 Mar 2024 11:41:19 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Michael Vogt , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= Subject: [PULL 1/8] linux-user: Add FIFREEZE and FITHAW ioctls Date: Tue, 12 Mar 2024 08:41:08 -1000 Message-Id: <20240312184115.365415-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Michael Vogt Add missing FIFREEZE and FITHAW ioctls. Signed-off-by: Michael Vogt Reviewed-by: Daniel P. Berrangé Message-Id: <20240220105726.8852-1-michael.vogt@gmail.com> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- linux-user/ioctls.h | 6 ++++++ linux-user/syscall_defs.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 071f7ca253..1aec9d5836 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -134,6 +134,12 @@ IOCTL(FICLONE, IOC_W, TYPE_INT) IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range))) #endif +#ifdef FIFREEZE + IOCTL(FIFREEZE, IOC_W | IOC_R, TYPE_INT) +#endif +#ifdef FITHAW + IOCTL(FITHAW, IOC_W | IOC_R, TYPE_INT) +#endif IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG)) #ifdef CONFIG_FIEMAP diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 77ba343c85..744fda599e 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -943,6 +943,9 @@ struct target_rtc_pll_info { #define TARGET_FICLONE TARGET_IOW(0x94, 9, abi_int) #define TARGET_FICLONERANGE TARGET_IOW(0x94, 13, struct file_clone_range) +#define TARGET_FIFREEZE TARGET_IOWR('X', 119, abi_int) +#define TARGET_FITHAW TARGET_IOWR('X', 120, abi_int) + /* * Note that the ioctl numbers for FS_IOC_ * claim type "long" but the actual type used by the kernel is "int". From patchwork Tue Mar 12 18:41:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779778 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169052wrt; Tue, 12 Mar 2024 11:42:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVVd0lrinWTheuq6k6tO1HynBDkV94V3iO8Q7wTbpbiMk+DqFsbTAgjRc+9tJEhQDwIokJyGbnjh4ClOtYI47v3 X-Google-Smtp-Source: AGHT+IGuDP0AeUiVu8G+G9lFNANqT37gUK9Mro7L21L4OCFRMU+4oJsI0fYUAoYMs9eSyznnFp/i X-Received: by 2002:a05:6214:914:b0:690:abc3:4d9a with SMTP id dj20-20020a056214091400b00690abc34d9amr10520461qvb.22.1710268925476; Tue, 12 Mar 2024 11:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268925; cv=none; d=google.com; s=arc-20160816; b=fJ8UgYYKad8ALqrLEoV7YobwJVIsmW69jfYuKg5J11kUAO1EKlrvYOtI4B94tC6Bas zWHsJdKlNyX1qtEcUy/L6tJZwb20Qln80AlZWINz5VtFk9qF12Y9HpXawmjiFzIPqP25 zELzn2cAYUsaxkT1P7jjnOUmFDSC7s03ZOShedpTHtu5Oyd75Bgouj85cCOx1U5M3Mpg cCrkE2VtfYqNeu1bss7DjlsfPklazncQFDXIPB4MhFRbV+ukNgtv3KCsMUEqy5paLlFN VfcTMLUrwYAkd6YwZXQUc/jTmSax4vcuAnpHwnSEVNVij3y0cLqGew04xuRClkuzA3iD ajKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QKNDOo6U9WbWCegGn24r6lvAvz+nsA+Lj9vHcmb0thA=; fh=tOREyZHlK9Diwyw/7bj5IUyLT4I5EVkj5DE8XDtMiTs=; b=hAqjzfche/S36peLTh2OZCdQyvUfmrFVPvvvRNocCHrxlJJSi3Uog30k5kYJqHnUWk +rJLcgJ/I2vgegRVx0b/6C1u8zOyLMQxdwp+Dg2UIIiz25+NsVirJc2yDH8GZZ66MG0D W+PzW4rQUMm75fsufJrbfZuJUeb9+O5OnaIOlB3onRyhWmK3lJc8BHwwz5iSd0WBO2L0 ZX/ic+ONKBWoGF0KK5al4G0F4FMxYTLjGScBhakPGswwzK5xDvRgI5u0fIK5g7+H/pbv kP/DwYjO6sCLB9icfEE4xLUkJ7omPhVWyAaG6CWasClgXGHvlAndBWdwVmmWaF6aQ9pf pGSA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O1UfUzrq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if7-20020a0562141c4700b0068fb26a9f72si8256678qvb.447.2024.03.12.11.42.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O1UfUzrq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74J-0000Uo-M8; Tue, 12 Mar 2024 14:41:43 -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 1rk743-0000LP-6P for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:27 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk73y-0001Kf-CU for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:26 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1dd97fd66cdso20860705ad.1 for ; Tue, 12 Mar 2024 11:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268881; x=1710873681; darn=nongnu.org; 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=QKNDOo6U9WbWCegGn24r6lvAvz+nsA+Lj9vHcmb0thA=; b=O1UfUzrq119Jigr/rpTlHEGtLihd5bXCPpx7mEYtyjypD1LGsH8jBUVwe2coK2dSi7 ndK1Q4QeokUew+YHnZ0nmw3UVLsZug7WjzMqzOQgMY4XHZSQ70ZPGcfC5Di9dPk+ssJJ 5qfxFLiidSTwkmokALZz+D1/gP7e7O3QIGzxfojyCM3L8dyBcGIJ1JAP6x0kIVd52jWk oBQoWnWC1iAugGYYX6FVDM2Go+gJ+Xvufbd4FUa07nDYou6uNkDXhczbb1NAH9teZz6i FlVHElV94NTe4R8NUXDNk1CDM6icpCF6ZyjfkBZMT/oBY4nXGqI6scH1rCgshM1j3o7P YsnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268881; x=1710873681; 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=QKNDOo6U9WbWCegGn24r6lvAvz+nsA+Lj9vHcmb0thA=; b=qDcyLWOFs802Em+tSJDi/Bb9tbY6ISfNp9f1eqvpTp5zq3nLtWTdigG5i/2Zzz6U3L Qv9P46xrvdKsbpEk6H8VCbDPpRAoCF3YUl+FfX5cvxC1JpXNS9RO7YrNoXQJS24hlvLy +DVpwzw2fQfG+CxxNmOrO+sd7rkU3/nIv89G7Am5B+3A5gLbNpiLLYpTVF+11Q8JSFzt Cmu5xow33dlpZYRcXtDkX/PToZKgqM1+lelTVAm94NWKVfRwwpsKN+iJ8u5k726CoVRu 0hOsarE6j/ThP0L3SoX2doM08gFTxtk/8V+FWCJhRXbaVFnHFGua3Gs1LOJ/p7I/8Jyu XoRg== X-Gm-Message-State: AOJu0YzHgc+3fX/lM/Dw6cAL98NdfeWL+XyN/ToBSOoG5uQyHb8s+qdi MoHr1vHeGTYCa8P87KTlW+O5x2/RdnbRSvNZIuCW9XwUhhlIWSCocgsnSzy7UzINXXlwSrzRssH 8 X-Received: by 2002:a17:902:7b95:b0:1db:35b5:7e37 with SMTP id w21-20020a1709027b9500b001db35b57e37mr10238450pll.50.1710268880865; Tue, 12 Mar 2024 11:41:20 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 2/8] linux-user: Implement PR_{GET,SET}_CHILD_SUBREAPER Date: Tue, 12 Mar 2024 08:41:09 -1000 Message-Id: <20240312184115.365415-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The "set" prctl passes through integral values. The "get" prctl returns the value into a pointer. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1929 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/syscall.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 597bdf0c2d..0801ae124d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6450,11 +6450,21 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, case PR_SET_NO_NEW_PRIVS: case PR_GET_IO_FLUSHER: case PR_SET_IO_FLUSHER: + case PR_SET_CHILD_SUBREAPER: /* Some prctl options have no pointer arguments and we can pass on. */ return get_errno(prctl(option, arg2, arg3, arg4, arg5)); case PR_GET_CHILD_SUBREAPER: - case PR_SET_CHILD_SUBREAPER: + { + int val; + ret = get_errno(prctl(PR_GET_CHILD_SUBREAPER, &val, + arg3, arg4, arg5)); + if (!is_error(ret) && put_user_s32(val, arg2)) { + return -TARGET_EFAULT; + } + return ret; + } + case PR_GET_SPECULATION_CTRL: case PR_SET_SPECULATION_CTRL: case PR_GET_TID_ADDRESS: From patchwork Tue Mar 12 18:41:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779776 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2168986wrt; Tue, 12 Mar 2024 11:41:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpQ9vcq9F6C4snVVAMomkATMwDPifNbS/8L9kemaroDDPExM9YOaBXoCNve/0sFdBrs19h3qQ7RZrnvL8r26eq X-Google-Smtp-Source: AGHT+IHMFsLLpZ2KKj+yDmvjOD/yykpgI01CIC0bZd+hWg2Og2O3g+zsFZPb4K+Xs/5wn5tQwNak X-Received: by 2002:a05:6102:e0a:b0:473:4941:6db4 with SMTP id o10-20020a0561020e0a00b0047349416db4mr4339835vst.32.1710268911959; Tue, 12 Mar 2024 11:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268911; cv=none; d=google.com; s=arc-20160816; b=K146roLSpIrk6qLf/2kEuCjPk5Mf377cemsaeiDSkkoNrEVrcbmgeB7KCWFuCnSg3O 2XgzQmvQ0W+NHqZKyJ9oaceHFVQcXeF6auj82W3b3sEyDb/01Oq3PUZvDUdNtS3pKzDO QaDR9WCvq8u7GkcLvYxTBXho2spxOqNYQurysFQK6HQTN1HRRuA839mMhaZxosQLf38w Hf8wu8eQzD+FlFMirdhRXX4zzQXtoQ0OXpfqnxf5zAs2cCoq6aReQm69QRr8nvPYwtaG oiUVd2OGU0TZRju8xMNYTYigs6lv7fGgYvvq42yedJlNMHKvXEvreY54sNiEyLYRWxow 0ImA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X+qvEdc3P8IChx8s2V+ShSCYxYz1aPKBexowlIxfWPc=; fh=tOREyZHlK9Diwyw/7bj5IUyLT4I5EVkj5DE8XDtMiTs=; b=eiKpKdTdSVAh04vB/EvRNteYijBSdZNrb0oo1PCxKHjsNWEbLIkysHpmWvMga9yvQb XxkkvyId7XzSGwVBbblYejdX26H9P+IjY5sotJTC0wo6jEse9L9tltxpxn4qR3gTp2Eg OyuGste33oe8nyIAben9/ki/D9HF6Acxm8e0JyQ91zt5mKMaTGGRwyktT06wyeNVW+/G YylUO63POkAV34qlRiKMXWL3sG+yjihkm7tedyDWoA5WoxOtuJUZy5K42qxxWbOjytGa JTr5AAFhOLzlVLB+7vVY2Do8TL7U6CO25uSs/FTzA1Dv0b/OMA+AZRDikGylybmUybkw nZ4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eA/OMNgX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id eq7-20020ad45967000000b0068f5bff0abesi7855501qvb.442.2024.03.12.11.41.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eA/OMNgX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74B-0000Op-MJ; Tue, 12 Mar 2024 14:41:36 -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 1rk740-0000LC-TL for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:24 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk73z-0001Kq-8n for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:24 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1dd97fd66cdso20860865ad.1 for ; Tue, 12 Mar 2024 11:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268882; x=1710873682; darn=nongnu.org; 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=X+qvEdc3P8IChx8s2V+ShSCYxYz1aPKBexowlIxfWPc=; b=eA/OMNgXMZX2zZbNjbRx7ZUI3vhGpFSDlYJIbKoW8jrBjJxPUXk736w7UyEgZqqEdM XPx8h317IvCl6y0InwHI+6FDLUoAda9yjNJUayQ0jMb6OwAqIfxFLM4OMe+gU+ZBMTqO sdFiet1v1DCQQbF/B/OFHo30R4DyWlmHmCKdD4MF0h9gSWOIKT1OQCjv9rriKt3Bz/jz 6PsTJp0LOh0PFco0C+FYgJFrmjYlV2clrFmQyqbqielchQq6I/M64GRbSwAw6JcVGvHR JS8QtzXP5ollxBCw5ksbAeB87vSG1J1sJpTEYI4HV8tZOurs5TFSKDMqBIfHhJLciimP G1dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268882; x=1710873682; 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=X+qvEdc3P8IChx8s2V+ShSCYxYz1aPKBexowlIxfWPc=; b=QJiOW0Odghi+5V2rvGDZHl5wlDX26ZTsvdDoKruVUy/H7uwO7VFg0Ol/QBUGiH0qKe UHeSU174STjyO1JD+LRuXQ2zRjHgldAjfdvI0lqJ/XhdLkPObuWYF3ZeWiq0Qvc+d+tZ zgxVLG7ueRXZmNN5omAiBX/rGW1ZK7P3LC33FijRJOEEmcINziFucDr6oPGWUIYaTDz2 w/lm/QI/4lYc0Ugrg5u42oM9e6cC6WVhd2t1dlaespPS7hzsE90fYnBWFYYUSxx/tzVV OOgVTWwwlJvOp/m7VyhzNCkPqwJBnbU4ZrCu2ijI4WJRk5oKpIIjdJ3e/iO1NNA3geL2 qtow== X-Gm-Message-State: AOJu0Yx3dgfDYgsj8EdOEIGkCt0/wybHFC+531SgJsca5+RVYAWLpNUS 2n7M1DsWeIOWh2ovpwKZUo0oE3oFAwLsOS0Q2dDOoPPADxA/Jq+7b6noD7ua/+VVMbLappHPwG1 7 X-Received: by 2002:a17:902:ea01:b0:1dc:b531:839 with SMTP id s1-20020a170902ea0100b001dcb5310839mr15427797plg.25.1710268882003; Tue, 12 Mar 2024 11:41:22 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 3/8] linux-user: Implement PR_{GET,SET}_SPECULATION_CTRL Date: Tue, 12 Mar 2024 08:41:10 -1000 Message-Id: <20240312184115.365415-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Both of these only pass and return integral values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0801ae124d..4871c4b648 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6451,6 +6451,8 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, case PR_GET_IO_FLUSHER: case PR_SET_IO_FLUSHER: case PR_SET_CHILD_SUBREAPER: + case PR_GET_SPECULATION_CTRL: + case PR_SET_SPECULATION_CTRL: /* Some prctl options have no pointer arguments and we can pass on. */ return get_errno(prctl(option, arg2, arg3, arg4, arg5)); @@ -6465,8 +6467,6 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, return ret; } - case PR_GET_SPECULATION_CTRL: - case PR_SET_SPECULATION_CTRL: case PR_GET_TID_ADDRESS: /* TODO */ return -TARGET_EINVAL; From patchwork Tue Mar 12 18:41:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779777 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169040wrt; Tue, 12 Mar 2024 11:42:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHK3XJQcr/lX9jGX1SMVf3svX0ICp6IkMe3KhyI8SNuooKoJigZrYfso4qqCkrMWoTVaKOIPNQh4r8WD0kJHOu X-Google-Smtp-Source: AGHT+IFwvaU6h+M+EVW6F/mU4O9Y+Dq3kOKQy7KnEXbDh94HrEzStJum69GzS4xORjpEXM/sqgqT X-Received: by 2002:ac8:5941:0:b0:42e:f912:8c97 with SMTP id 1-20020ac85941000000b0042ef9128c97mr5170771qtz.20.1710268924441; Tue, 12 Mar 2024 11:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268924; cv=none; d=google.com; s=arc-20160816; b=bfv+Tro11nMsJlxujUOLHot/CDSoH2o9TNN7yVqlCdP4VfxNKqhjsZTDUBE14PjcHI FAsbfxaOe0690Qc4eC/bY2MnTlZOnVVVYKzEMDqVLKMMC0L3vqimvmUAhOEBPaotdlYt rJzL+D9wFoBFo4a7rYs+joKSxuwVv2zNYv2muGMdVTSF8wks0ZT3dPoYl8xazofqjB5X xCDkyquIDVK7SglAMgdEnuphR+OyBLUxL7E3oTzdV86rRYOHojXTzkXDIDpFRB+0TItX D8NnnAKyT6vf8o8JDglQZcu6rzIN0VjDQfnoAGqr6yZ5QvOUNdNmAtizc5EbAoUB3Kg5 4tig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W8vhO1WDf0+YkBR/iCx/R6UcOGD7cvxq9c3tWVgAEV4=; fh=tOREyZHlK9Diwyw/7bj5IUyLT4I5EVkj5DE8XDtMiTs=; b=lJN2GX+xloB6rZEZWVaxs8bbfLk8g8Vj88g7b2uI3w28RJpRhdIpivzArEJtzsg0QE MKmRvoh0cdIyorth2NVhJRTpphf254WuFF03JL7iUyg8NPXWnx48WcZWTNz/bgyDFOqS KJ4gJ77gAbt53hJdeYV55ZILmDCGi692c+6TS0BwaLHLSnaXg439iIxKaEQEya6//sZP I28t6cmrga3awmOYfYLtkO/lHwyiKRgpWDftbUyml5if0NTePo492K5thGDqITkG5MDQ HWaMEfEs6f7qYU+Hr8Q/LHy71TdpXmFpSHYh5Rea6D6OIvnyMYMV2EKXHhaGtd7Zpkp2 QL1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UWk8Uy+z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b19-20020ac87fd3000000b0042ef542225esi8418841qtk.504.2024.03.12.11.42.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UWk8Uy+z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74F-0000S0-KY; Tue, 12 Mar 2024 14:41:39 -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 1rk741-0000LI-Sx for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:27 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk740-0001MJ-FC for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:25 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1dd8d586126so2017965ad.0 for ; Tue, 12 Mar 2024 11:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268883; x=1710873683; darn=nongnu.org; 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=W8vhO1WDf0+YkBR/iCx/R6UcOGD7cvxq9c3tWVgAEV4=; b=UWk8Uy+zxiKaFc+TDbuBEkUT++UwrcCRM5ziy18KT2qAMFFbc52Hnlw63xXMx7PRIC XaFU4614XtGP5X88xk9gtnR09LI+vwfdiV1cWOkYZWYRduTyZq1T9ss+CxNaCdZz/8Nl G0PidEi6FR1f9GC2YFT8G+rbFiA8MhxOGoeMUxzONrEwOgutL2XOgi8JIz/AFA1+VNvI CYv+6qoEGifwqf0mK0CM4IiNjLblnvdtc3cHXlRRyXS2PjwLgRAfkzluhgJXepfmIEWi ImiCkm8a7unWgu0JW4rgyLNHzE14mNif2wmPRnitXF6lL3r2anrs9v+vnPtUT6UOaQBu 4CAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268883; x=1710873683; 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=W8vhO1WDf0+YkBR/iCx/R6UcOGD7cvxq9c3tWVgAEV4=; b=A5MVmtYjdJoPLNerMokLPupaKBZpC2DUeou/V7i2cCgpWRJ02VVGGuDF7xoUG7Z3up igBluuzRwFt018WjsZ38Pxpz2bVWS7tWw7DHNa/r3g9+75ceGoe4kLpFFdEZxl5fbkqW poOHZkgKZeK6SXKDrWrg+dwJnOqKFFsFIPHfCG1BRYtZdVMzx4giwfwXlCe5G+DmzEQh JV83dXAscAPDKbdI0/irNuAWvgHjiH4mHjUV5UISKtLJfQgRzZe5/Ja3yDk7hOi6CCAe 4Qtle1w5vCrDYdF5pFFaUgPa7IDpoMCB6p3LGAM6kBSh7LThzAM8R7UFwqGoYbqXEyD7 kSrA== X-Gm-Message-State: AOJu0Yxr1MKLFg/HclyS5KsGlJVyVvvVlmzl71CFg+kTJjRywsUxj08A pVPDt/43BERVCcOilziAQV6iMQr6ZjJl6cDV1ykP8e9XWvcKQN9EDSfBy84JHH8W4OP+tRpwR2p o X-Received: by 2002:a17:903:2441:b0:1dd:63e2:2478 with SMTP id l1-20020a170903244100b001dd63e22478mr5745106pls.57.1710268883176; Tue, 12 Mar 2024 11:41:23 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 4/8] linux-user: Implement PR_GET_TID_ADDRESS Date: Tue, 12 Mar 2024 08:41:11 -1000 Message-Id: <20240312184115.365415-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/syscall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4871c4b648..e12d969c2e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6468,8 +6468,10 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, } case PR_GET_TID_ADDRESS: - /* TODO */ - return -TARGET_EINVAL; + { + TaskState *ts = env_cpu(env)->opaque; + return put_user_ual(ts->child_tidptr, arg2); + } case PR_GET_FPEXC: case PR_SET_FPEXC: From patchwork Tue Mar 12 18:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779779 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169107wrt; Tue, 12 Mar 2024 11:42:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFvRT5Vtjg0iNJ3Z8ma8KsLyoiHn2ip4YnVcksD7nkL3cVOcQpQ3KuTNOEt0MpyTiN0I/kkpAENbAi/h3JKmJZ X-Google-Smtp-Source: AGHT+IHk+YGIdhTIaecfJRCLn/mUxEsjJFp1eHeAo1oN7VpZiQeDR5drLdtX8jQZ6deNeyD3DaM2 X-Received: by 2002:ac8:5fcf:0:b0:42e:fd4d:8245 with SMTP id k15-20020ac85fcf000000b0042efd4d8245mr12224097qta.27.1710268936779; Tue, 12 Mar 2024 11:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268936; cv=none; d=google.com; s=arc-20160816; b=i7XjYE8/m6TPlgni7TZPOeOtNQPoEcQlfglYIyF5aSetbs9BHBkHRaKyJhAVbBKtWK v23E5L5l7nvO8T9TSyRoGe0efhF7V0g8CS8OQbhFk/Gtixcg3NOXKVUfbaRV3LklcKmw cEG1Ocqb6Ebv1HVX2Ossumu+Evt1ryPXuw2pyzrS+jjHMmHfaP/nvUXHeqlO13xlk0hl OtRy/5z9CzfNUWjEHSrAZTKfVokOqXrfCpCI/TwkgyPiKJGZ0Vb0BduE+PLIHrhChuZl 4OkLQZYdcjw+EOnaoaqsF3YAtVvISN2PJVseCUSXaNeKZDbItek6LxyUuFhfk9eU0gos ICKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=RYrHTB7owHCtmuB9r/XN8m2L2KMD2GNG1Jkbb5GzGXql/K4sI9a57cfF7TWZg9t3dP bRmWIQNtyAHkmHonLGlLTGvwiObChoJuddoNXmdME5BLNHyjrV381mD/wuLy0vQT9Yr4 SUIW9lVdd2+GtKKcZFgJbWVIhNRVqnagQZw8zho8GOleDnhk8GUlNNtB9g11sMAUpyG2 pDio2aQVT5jeu5ko/dkJO+0isnqdj/MuP5eOfxLU2JiuaJCd/NRWEnQ8r9zvl7FkmrjE cZ0CGwukv7Uzx3ALam9pw7N7LvILypd2KQsIOKp0Fm1lYsVhkQ+vx+1zC3RiIfIH4eE5 uHLw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KZNt0slG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w4-20020a05622a190400b0042f30d1fef3si8094428qtc.760.2024.03.12.11.42.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KZNt0slG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74E-0000R7-5H; Tue, 12 Mar 2024 14:41:38 -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 1rk743-0000M3-PY for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:29 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk741-0001Mg-Vg for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:27 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1dd6198c4e2so42112265ad.2 for ; Tue, 12 Mar 2024 11:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268885; x=1710873685; darn=nongnu.org; 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=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; b=KZNt0slGng7poeIOdYs+yobdIjOy+smH+WzuHHgnax6BF9psn6o5rTjpZk+IoHRlsf ggMpWQlm2+x3PgwgN8Y6Y3jlukd4fFATURSPR91iPiP8ERxmYudOwiQKqapCmtgv9veC M8Wj37THjKcVQGRlqtz8o7JF1aq6tNa7dG8bm9fpmkH/tC9miLHW4cQR6UcHC0pTBtLy kMCe94t2b/YSLdKPbIXvw8sLWQy57OGVvrA/fCrI5ndzxDABOZ+mprP3Htsy+epxyA1I MSCG0kyFQgV0GoStIKSSP0fAwqVuJZDLSQKC6zc3lA6hCeXYAH/aMZGEgblZdPR+kK/G 6Uow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268885; x=1710873685; 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=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; b=S7AgAvxgukahheNrdbB15KkGXkbE1/F9HVMiOfPF2kj4OpGbpOHDlmlDFZ8LfJC8Rt n+vwWCyalOj+V25Y977QMbfonwugJ/QhnD+c7kU3ZhiRyVRWKlMpL3pI6gV+pf9QeaHX WmWBX3jLW4d+21vC4Fqm7iatwLQ7qPnyQNBQEG9vOxQqSl/Tg/4PlNjPeD8M93g/y9Zr dOp1LZhVAwVFfZV8mtZgv8fxKAUAncPVER1rWuWLyh1i3s6zOGDK1+cffjN8CDFZLGDX OOy955jasrnpMGT+xHy94wLUGrf3Arl7qQs1Q1HVEZuMumBVhrhWhgFmk74AqROB98JU yXBQ== X-Gm-Message-State: AOJu0Yxq+53mh4hh/XjgbMTM46gaWQw/FxOdlDDdrVlWv56Yk4oUJ+Lh r+613E13v4NKT2VfI4y55q46gFVjD8AOz80BpHlyZTAfHyECcbsbntR9rSY5QX3Is2RCVrMRNXz e X-Received: by 2002:a17:902:d583:b0:1dd:72ea:58cd with SMTP id k3-20020a170902d58300b001dd72ea58cdmr16199160plh.3.1710268884703; Tue, 12 Mar 2024 11:41:24 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 5/8] linux-user/elfload: Don't close an unopened file descriptor Date: Tue, 12 Mar 2024 08:41:12 -1000 Message-Id: <20240312184115.365415-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fixes Coverity CID: 1534964 Fixes: 106f8da664 ("linux-user/elfload: Open core file after vma_init") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 4dbca05646..26d4c1d6b3 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -4522,7 +4522,9 @@ static int elf_core_dump(int signr, const CPUArchState *env) ret = -errno; mmap_unlock(); cpu_list_unlock(); - close(fd); + if (fd >= 0) { + close(fd); + } return ret; } #endif /* USE_ELF_CORE_DUMP */ From patchwork Tue Mar 12 18:41:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779781 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169253wrt; Tue, 12 Mar 2024 11:42:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWKw77ux6e1V7S7pZSkk1zpEO19JnVksU7YfX/87sXQKq/GgENWcFtLKcbzwW9e1fktTcU3Z/IOxwyDjjIGtQ2H X-Google-Smtp-Source: AGHT+IFbEYYe2WRTlZnJuhITYOP3en351LBpUKrvIFbc8ow4as4I6hZHKJ2PvIkVHW5kWP/80oqM X-Received: by 2002:a05:6808:bc9:b0:3c2:5d76:cdad with SMTP id o9-20020a0568080bc900b003c25d76cdadmr357764oik.12.1710268963381; Tue, 12 Mar 2024 11:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268963; cv=none; d=google.com; s=arc-20160816; b=AqV4XoDTzcGkHkvJDjDP2moipDrUnqSxmhKHhfmmdJ/J3xH9FbmvKwNzrOGjSg6PKn 7YnxXbifmlrTEdK1+cUQBY43Yb954xGM8B7cWGhTCAhh1kTdFiynvKRxV0bH90TCV95g Z5FvljQK//B7waxBM3vE/g0Rd7TNTYmgGaCZmOeX6WzyWUcUF6nL2FrdDLt9uwD0wTZ3 IOBIt0goIHG0l90i6TB4ZY6y06OzLClNqJvFE4veoQ/O2tvHqlsNLfkEIiEELWjJJ6v0 ROb0132vyuyueP2FaCXQQvdT85aTd8tuu6a90tdufUwBMPHF/caFj7vf5vq/Z2LJWTis 7PEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pSI45wyG1DbBDtEQROhzFaiavHjfnzmEgOAjYFnm1qw=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=SnIl2whry5oAGPL9dxPsLm1OSlHPPlwRBvKfg6NvVNWsC45Ua1jn15OASoZtvPM9We gpbEn8StYcoNEsVJonGBevEn1M4YjLja0SBYx+UchaMBbhWqnh/BRe546Hqi6+yqXG/+ KuJKg8kgEAX2CMwpD0HjU3ZRNJdwXOUwOT1rDJJO1+O12f62oEZ/Wv4x5SdKYJa34k5x eDqWaBl9ABFIcmsBZ9e07WwD9hVoNoChfDFpk2i36jK1ywnwuHIKd6VxOjpKlWr6jaR7 C2vA+KF3stL4xvr9CDQwntb0v6hkrcxvYtW6iDzq82e9OegRTtNJvO8TSJTBk5/X0lcE c3qw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uv8pXXY5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if12-20020a0562141c4c00b0068cbab014absi8192133qvb.595.2024.03.12.11.42.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uv8pXXY5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74L-0000Ve-NY; Tue, 12 Mar 2024 14:41:45 -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 1rk747-0000OI-HP for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:32 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk743-0001Mt-IX for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:29 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1dd68d4cff1so32852915ad.2 for ; Tue, 12 Mar 2024 11:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268886; x=1710873686; darn=nongnu.org; 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=pSI45wyG1DbBDtEQROhzFaiavHjfnzmEgOAjYFnm1qw=; b=uv8pXXY5LZmJeZ10/oX9Qu4atJaJCx4cIIYqBtPlBF+zck7nvBavXNa8xvBrm6YpbY R/0x1atZPyw6hQ+BVbotcLL8kqpApHg4IneenuOeW8Ug6bDPx60wMy581GEV8qWRGeGr 9TeezimiltM8qDxSfhTM2Q+aybE6IxXFrAHQRQAhE5keLX5CLCw8rU8XmAkFUWVVZ+EE Lbe52Jm+amxwm/aWT/lvmMBQm7ye8mr8Y+c5gLBbjvDpb+zRSMOsXiyDmnWdBSNYJ7ac FYvVkzslCWohVxGeH0YsmpChZxm/PAOCrz0qmYJJQBqdO1q0golF6NFKOrRedBQYHVqE hYVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268886; x=1710873686; 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=pSI45wyG1DbBDtEQROhzFaiavHjfnzmEgOAjYFnm1qw=; b=VM9jNHakqkyI81ieq+draToHPSOORga0nEJ80jFuDxNOKc7Ur0T6w4UMLFJKZetwcm 5UpgxTP0eEhU8MhqpFUvzPIBFzQEk6QpeQIJDe0iPEmbLN+/gA1vNKtHHQ7D5DPGy6r9 uiAQqstzZq2TQdZnG1M2wPLSLsoacQZBxsZn2nxEnAih++XuialKEG6e20l2zQalRTId PhSky2qLAXnj1OP7azCz8Qiw8PGnFjjBquSIIDIV1kwTMxqlXRgqj+WiJ8aAMGe79Mc5 9vtewalcG67ZOVp5PeSPQG9vM1Rg3bjYz07zcD/Cm/uaNGfVaJGOKoAQNV4sZvtrymoM Ejww== X-Gm-Message-State: AOJu0YzlMAkWWwXg8h6E732ULWTpaKn9qKTFfyOo4wwEVnrP8ZUm3gEA ZeaupGmo/5tNAbqpO3P5nmRxZdul1DMnYOOjzY+EuVEXjRjUN6EYeuMOW98foHH0HVzWThC1WhP G X-Received: by 2002:a17:903:2292:b0:1dd:96dc:dbad with SMTP id b18-20020a170903229200b001dd96dcdbadmr7967522plh.22.1710268885916; Tue, 12 Mar 2024 11:41:25 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 6/8] linux-user/elfload: Fully initialize struct target_elf_prpsinfo Date: Tue, 12 Mar 2024 08:41:13 -1000 Message-Id: <20240312184115.365415-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fixes Coverity CID: 1534962 Fixes: 243c4706625 ("linux-user/elfload: Write corefile elf header in one block") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 26d4c1d6b3..60cf55b36c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -4204,7 +4204,14 @@ static void fill_prpsinfo_note(void *data, const TaskState *ts) * may well have higher alignment requirements, fill locally and * memcpy to the destination afterward. */ - struct target_elf_prpsinfo psinfo; + struct target_elf_prpsinfo psinfo = { + .pr_pid = getpid(), + .pr_ppid = getppid(), + .pr_pgrp = getpgrp(), + .pr_sid = getsid(0), + .pr_uid = getuid(), + .pr_gid = getgid(), + }; char *base_filename; size_t len; @@ -4217,13 +4224,6 @@ static void fill_prpsinfo_note(void *data, const TaskState *ts) } } - psinfo.pr_pid = getpid(); - psinfo.pr_ppid = getppid(); - psinfo.pr_pgrp = getpgrp(); - psinfo.pr_sid = getsid(0); - psinfo.pr_uid = getuid(); - psinfo.pr_gid = getgid(); - base_filename = g_path_get_basename(ts->bprm->filename); /* * Using strncpy here is fine: at max-length, From patchwork Tue Mar 12 18:41:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779782 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169374wrt; Tue, 12 Mar 2024 11:43:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoTJAz38gGGSeUYafIZwHb4QSezr/3/L6KHRlB6RaBUU9RfrjONy/SwZtP+KCTcGJNYfs3YEPgoYEI9A4iQuu9 X-Google-Smtp-Source: AGHT+IFG05q0NwB1ckt7O0oE2zgDoKfHNxHSlpga1HI59TFHPo1neEU4kH1xDPwHL0zRRL7XWaie X-Received: by 2002:ac8:7d04:0:b0:42e:cba4:f9fe with SMTP id g4-20020ac87d04000000b0042ecba4f9femr14207501qtb.2.1710268986626; Tue, 12 Mar 2024 11:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268986; cv=none; d=google.com; s=arc-20160816; b=Xn9BIPu5IPAQVX5uC5FoTAbijzn14XPP1q4RFQF1XQXnH2SlyZw9PnVmByeN5n9420 +SajTbGFfJIkHM1eGAVlhzlSpqoGR4cv2xPb3/Vd9ZiKrcaW9hxsxNeEM63fb4DncMnN U5cSKAJnWZXzxLeFoNJ/5DbkrO6rIx/8d7qHV4eITHqrti5DPpBgiTXq8XCGL3EoYDUA ZZiX5JwAekq2I0gwPGX1Q+TpQBYgpdiP9QTjMgy3dMQ4Gvtns2btHZrDGoHdmZHP0BSC co9DJNyDRVVd9TObuMVEohgPqiA9S2O4XAhB2DEWsaALQz25xaHEIS6d1sl5b7lVje/N f0KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=x3znfmNL10eLlxG5NYqWnRcVawBnQ4i751296Itk41Q=; fh=G4eF9GtkP2UMeW1yAo6Yg+WDlYpqokuFRklCXUMdnHU=; b=dcomnWYyBQcnIF3RmzsOUWWsbAAm9k6Mnrz9hwr+nUf842JoVbXvy+1MlcwcPzuo3D VM0/14dAPZeK7we6NWsu/UvqgR1gyD7BoIpxVP7EeJakm/m5Krt3bsNCqwraG99x5sBG cJH4vlHxQ0Is7sgEUJP2y9in9WBNzc0AVn1rNcx4bWugCYL6xlwPEG9SBFfv4IVQxgAT 55ymWzMkVYsDoY4LoS2PjmERe+K2F6cB8IXjDSTrA7K6w3sv4ck5Q5Ayf6GOMYIFGzwB j7i/fOrSvJEH77rXsZ+zdcYbbFsuXBFXOHZlE/hGBe5WTDPNKTH7CwMiWWm6RvzyhlEh Ujjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z8OJwFWs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bp40-20020a05622a1ba800b0042ed89af418si7999655qtb.112.2024.03.12.11.43.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:43:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z8OJwFWs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74K-0000Vb-Gi; Tue, 12 Mar 2024 14:41: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 1rk749-0000Oj-E7 for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:34 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk747-0001NK-9z for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:32 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1dc09556599so48619115ad.1 for ; Tue, 12 Mar 2024 11:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268887; x=1710873687; darn=nongnu.org; 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=x3znfmNL10eLlxG5NYqWnRcVawBnQ4i751296Itk41Q=; b=Z8OJwFWsDF/tj9sOZgxNZ9rh6WJMum95sYh9c/i7bxmptTDfemZXA1oBvlyTzEHbIi RALrOCi1LlO3K7Zotpwl0Pvd1eHeTXg3tiJTe7rEItKkGrG0Ooh3Cyi7eiOhJOHA0sSx KMR7voa4SeymqrodYUH1dDisfTpT/up0ET67yNki1CrTxwT6sSEROzjU9oW2CTyP8Bvq 09BvLjZvdpE56iZKNd26NcSB2t2mNkL19ZLtGmm6AO6lgYQdMERkoa4VCJIRmgvqWpwJ PotsB5sCO74a+SKhQ656xFO9VkGSqU+jfR6w8RrEokk5o7sce2xE4v46OieDf70pbPWO URlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268887; x=1710873687; 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=x3znfmNL10eLlxG5NYqWnRcVawBnQ4i751296Itk41Q=; b=FcmAJrXpL6IxdTe0X7L/EtNGUdJdX4a4Q9Qgb0+4h7Ak9fXT3CwLn1vdTIw7SJFMBa sgyvwiZ3vdX3JDRLYogXJFnqL1RH+hXnNB6XfqCC/f51ww6omnROkBmeHU2uQiWVOCPx szuqt0x9jgFdRM5Y696Sdcb48JJ18m8RQMbqlDrfZUqaqBTI7CD9XXw88yPADIqkf9LP DF25+0Q42rhuk3u8DLjh/3EOrCqX2psJvF2/bFPPmHZ3gcG1FVVDq/frXCxsZBZzN3U9 9Dfx5pBpdTlZGA87BMc7d2727C1kzqkaGYqJYmC7f0ti8tp7TBpjPVR0U+aua+d3+3dy jIFQ== X-Gm-Message-State: AOJu0YwN139S0+PbYH0k8jbv1Rxjleq/3bhxSMlbfYedI3IHS8t0V1Mb zJtiVXcHHGV5MaUv3DrpfBuv9VjM+HLCreoDCC2a/FLy7YnQ1fEImVZy3D2xsosr1UPrv6IBHnu 8 X-Received: by 2002:a17:902:cf02:b0:1dd:a529:f355 with SMTP id i2-20020a170902cf0200b001dda529f355mr4948777plg.10.1710268887303; Tue, 12 Mar 2024 11:41:27 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [PULL 7/8] tcg/aarch64: Fix tcg_out_cmp for test comparisons Date: Tue, 12 Mar 2024 08:41:14 -1000 Message-Id: <20240312184115.365415-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index dec8ecc1b6..38446c167e 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1388,8 +1388,7 @@ static void tcg_out_cmp(TCGContext *s, TCGType ext, TCGCond cond, TCGReg a, if (!const_b) { tcg_out_insn(s, 3510, ANDS, ext, TCG_REG_XZR, a, b); } else { - tcg_debug_assert(is_limm(b)); - tcg_out_logicali(s, I3404_ANDSI, 0, TCG_REG_XZR, a, b); + tcg_out_logicali(s, I3404_ANDSI, ext, TCG_REG_XZR, a, b); } } else { if (!const_b) { From patchwork Tue Mar 12 18:41:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 779780 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169119wrt; Tue, 12 Mar 2024 11:42:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDyP1WNjqd8Hh/EvPAGGLBX+RrD60tiLRshF96pB9I8WOe4mAnWYdXrrovyLmJGYd7Jmb+Fz9wPs/tnowFEIkE X-Google-Smtp-Source: AGHT+IHeyeuFSvJ8chG0BYm+b39tZoQFLMIDSLBZ1MCvpMVeZzDk1KATuaCsFfg/j4d0tvQguRgz X-Received: by 2002:a05:6830:1690:b0:6e4:f51d:c487 with SMTP id k16-20020a056830169000b006e4f51dc487mr11699808otr.32.1710268938891; Tue, 12 Mar 2024 11:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268938; cv=none; d=google.com; s=arc-20160816; b=m0uSJpXB22EogrCsNcMGr6i7GeZ9cTZmCW3oTcufJPz0oPgqrQU1s27kN6CKe2gxZ4 9BRRv+7phJKgYiFUDuAwM/407CkQFSKtalOBDOz+n8P3o7lIgjGyeTRJm4rzfAnJtg3/ uamGG/HKy7ow0/qRPNXkL5KT0aoQwtR7ndIO5VyWvvhzII8OgAKGqErLnEEnph+bsXIo 8VPZ4j7CQBiqKwDuUz6+o16LNsi4uxBLp4v4pKN07osmf6bAIO3B/9Q7CCd5Zm0rN1d/ CMtqrrT6QghjP11i1MilDWjQqqq6gTHs7+482mHbeYxaYPwnY1VS97H9rOJkbQBbMuV8 uLiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=owm/IAg32HMjFxsQJhlmbOKm3Qbhqz7rn/KBgK1esIo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=OnYtPRUjGg12spKrMDrGEl1TtBFnoYJYBY+P7+7Q1dtl8PEFV0AbPWSEEOuVsyph4S aKnPswA0Fu2v+viYadTdXJJ9NDqcz7rJ/HbMS3w8bIogDf2nY22nM7GgXSpu1Drh0gCJ ADsC4yq3z+pLmFiqVbuWnXgDnGH4JQEUE0zPZv9eZEoFEFsTR/Fsqr37o7gmsc85mOwl HK5dqNfT10BzuMXWxwrgHu/4EJA0YRk8oFS7ummJ81HPyEQwJXIVBZEmEZJb9R8Zo1o1 ZoW6bs6JXYuE6RjTRQHQcZQkGX4IpWgGVvBdnndgi2RfHtB3FHX5K+oFkGMzSv1sd/ov 0LvQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/1qTk7c"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x20-20020a05620a449400b0078843462214si8825559qkp.623.2024.03.12.11.42.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/1qTk7c"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk74G-0000SC-Rw; Tue, 12 Mar 2024 14:41:41 -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 1rk74C-0000PH-Et for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:37 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rk747-0001NV-A8 for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:35 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6e6b54a28d0so116368b3a.2 for ; Tue, 12 Mar 2024 11:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268888; x=1710873688; darn=nongnu.org; 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=owm/IAg32HMjFxsQJhlmbOKm3Qbhqz7rn/KBgK1esIo=; b=u/1qTk7cT2fZF1eZy4QnoayvVMZm92JJpojggpmRr0A0Tqyh2k5OH+LoZ4W/xKagc8 /UTBztR6iVcJgWLa5cSAHiP65L489/qqx/f0IdkhSt2yjZf8iWqJ+Gl8iTf031GjBKZd 2MWfQ6q96z/pb6s7r09yBdjbgUQgN/JCsDk7JMNXte9MGvWW15ySmxy6EcitPf6vFKGT szNajtR7ix5uejkO7T8NPnbyhKxoqiLL57Ns33znOYrBJjAj+9IMgUaaOHT9aCY4i2Hy tcb0bTJ8fTbc/ARPI4DL3RlKzxMR+4hP1c2ZeiFxURYguLTjfIayeml71elMOgE0MGIc L4OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268888; x=1710873688; 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=owm/IAg32HMjFxsQJhlmbOKm3Qbhqz7rn/KBgK1esIo=; b=M3AKTwSZpHqgKu377cp9ziimqvDRhtzCFlFRHR00rZOueuczK/tuv0T96QKXPG/ZCq f2qcGcYX3ln8hcVXoW4Y0K4xIut2jVNKABCqIlcZm20j9msMWOmYZ3sFM13qbvpyY2IB rVhl4QltTOzBxulvQnjYKh7sXOJp0nNahdgRXHokIMLZ6//fpH92FvQLQXacnLViYNkG UlTF6Im6M9gF4kxGfOVDaB+gc9tGL6AAfsTmttgMHWVC/IHFEV7FA/6Re9ZEX0xkWMoS p+Uh6u1f6o54+XTGE1+22Q5Ftq+S9PZajzO0+WK5mjvzE+G1hQxQFmtaoB2+ZBbEakki DN9A== X-Gm-Message-State: AOJu0YxF0vuTCDf940fyf1vSi/+/l5sA1qoZB/vQq8vs3TixxbnU56uW BRs7WxaVXZ8pUKg1bUC7IH1EEmXyI+qcmw1Ic5w6QBCDzJLJELlGDQ+s7VXSa0ScZ3yLT3kMDej p X-Received: by 2002:a17:902:f7c7:b0:1dd:61a6:ecd1 with SMTP id h7-20020a170902f7c700b001dd61a6ecd1mr9066513plw.32.1710268888728; Tue, 12 Mar 2024 11:41:28 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 8/8] tcg/aarch64: Fix tcg_out_brcond for test comparisons Date: Tue, 12 Mar 2024 08:41:15 -1000 Message-Id: <20240312184115.365415-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 38446c167e..56fc9cb9e0 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1464,6 +1464,7 @@ static void tcg_out_brcond(TCGContext *s, TCGType ext, TCGCond c, TCGArg a, case TCG_COND_TSTNE: /* tst xN,0xffffffff; b.ne L -> cbnz wN,L */ if (b_const && b == UINT32_MAX) { + c = tcg_tst_eqne_cond(c); ext = TCG_TYPE_I32; need_cmp = false; break;