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: