Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3636584imu; Mon, 28 Jan 2019 08:12:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7HWFlzLy43RoTGOxUW0Zz2e0B+h8CvVmzmVrqDbFVWE8+iRAd1uxw4t7vIMRFGe24ISwQ8 X-Received: by 2002:a17:902:d90d:: with SMTP id c13mr16815441plz.31.1548691967791; Mon, 28 Jan 2019 08:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691967; cv=none; d=google.com; s=arc-20160816; b=yX1H4n4IKwvAY14k8WJLo8eoVUleKAJTHV9afyQxnje2NJS1CvvZlMTETfNGwJdJ98 01tVeElEpAwKKLbHLVLF0YIHysfN2pte1gaAzeEIgBuBdNJ4mQDshQHe4w5aW5fyBjEt 263DDgNPB7AFdIClz4z6/9T8dkMPbKAdZIecQJoD0yrEDvaPrP21KZFk8SWBLVcmfS2F rxxoquw5Jocmhtu+ZO/1kqsP7XbbmJSaAjYlXCHRy5ZK2SYKIEzCtuyk90yEwPhfgMDg J1NIqgsKtl0v24M1hF/navLQRzTo3t7+GBts3NxrSDPTEJGsieEP63qfQt/0vP48NZ4T MKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6xty2YdvoKuteIpAaK5flDhvU7KIbh4/LJcQfrCQuGg=; b=IH0M34D5G6hrEpO5wKdF/23/jfO1meHCxolftmFXe00l1AZZXSJQnDCN4pGhU/viS1 g8MsXLzfRDyl6VJncVNcyatPGos4GEstftZASmaR1FUuS2bqad2Ny9cUrZDqBgcDrFyo xdhBG1gWErgvIPrIiVKcmnDPcAC2vcdU7Jmv9ios2+gIDGbrMaENj4X3+n7XY99RV+OO PbvxIk9t1BPpkMWEz3Covsfn6NOEKJpjbM7EqfyDc+YufIOnXC0FPiWxmoZKHly1Cd52 LYaCbv2pEEt3BbZCgu9xLk+quTCSWVtIgNdRDF91tEmdlcdaUHhz0F1yGd8BNbc6cEMC 8M+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TePvf149; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd16si34474779plb.47.2019.01.28.08.12.32; Mon, 28 Jan 2019 08:12:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TePvf149; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731715AbfA1QLe (ORCPT + 99 others); Mon, 28 Jan 2019 11:11:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:38544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732971AbfA1QL3 (ORCPT ); Mon, 28 Jan 2019 11:11:29 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66F8C2147A; Mon, 28 Jan 2019 16:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691888; bh=oXvu1Y3xSPb1qaS7ygk3qh2N0TdlzvTvNxK+3Zqpbp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TePvf149GHoi2mOnBCCEEA7jkGLKhI2m0wzfDpw1LRxZncnSXtUKOTloKCNqsIXfB 1EfegB96jjQZrgzrBlHCwoeTal/BJRtMTm52sWRLj3yxH3N3uO/t0HGdYoXaZCmPoO nky3iHST1vP5gjNcOjlk7pGNBX/gCB/mQGeMvsO8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dave Martin , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL 4.19 250/258] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition Date: Mon, 28 Jan 2019 10:59:16 -0500 Message-Id: <20190128155924.51521-250-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Martin [ Upstream commit ee1b465b303591d3a04d403122bbc0d7026520fb ] SVE_PT_REGS_OFFSET is supposed to indicate the offset for skipping over the ptrace NT_ARM_SVE header (struct user_sve_header) to the start of the SVE register data proper. However, currently SVE_PT_REGS_OFFSET is defined in terms of struct sve_context, which is wrong: that structure describes the SVE header in the signal frame, not in the ptrace regset. This patch fixes the definition to use the ptrace header structure struct user_sve_header instead. By good fortune, the two structures are the same size anyway, so there is no functional or ABI change. Signed-off-by: Dave Martin Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/uapi/asm/ptrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 98c4ce55d9c3..ad64d2c92ef5 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -130,7 +130,7 @@ struct user_sve_header { /* Offset from the start of struct user_sve_header to the register data */ #define SVE_PT_REGS_OFFSET \ - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ + ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ / SVE_VQ_BYTES * SVE_VQ_BYTES) /* -- 2.19.1