From patchwork Tue Dec 11 19:26:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 153508 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp998368ljp; Tue, 11 Dec 2018 11:27:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/XdqDsYnHJqWKQKJw5HLN42CffGcNRxwCpwNDzUxrCcIW1ecXFpkVSKiwMqO0DsECzw1DYf X-Received: by 2002:a17:902:34a:: with SMTP id 68mr17586138pld.268.1544556424281; Tue, 11 Dec 2018 11:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544556424; cv=none; d=google.com; s=arc-20160816; b=Ix0RhsGIin5y2v+B8o3YdWn3PjY/YjbdZIDPSEWDXps5QIwzSCtwarBm7uc7jnrwLh LHfnwNDYwcadMT9sjWCZahjdroxPVU3X13R/9S+PhWM6RFXauNNJMRuKvsovs2Ap8NLF 1R2lZG1+3LlO88rJZDVPxyBawYtxYMHdzoElSb9mYu1FdaJ8me3bq7ZmE7m6+w0KqsTd GbavojwvAy+AhV50cg0NIxKzIrncnw8aGUIR3I7d+72E+HVRtAQHC7NSxWxRWsOUBQPU zxb0UnX3nlgKA7jSezg2J+cnSoymjsXfq3G8Fk9jgrLgNKkyaP19m34SuGgimsNmCrDa qw2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=USY00Zoff84R4oROdMtCjD5bc226BXRRUKr7atOf/vU=; b=RF+UyrUwQITkjqhXtLtO1k/Zo1XbQ5cM4ux9NJLInmHY8PLsTDqJLFH1MOT3kX1AKZ JbkU6ijR2aRP8suODk/n0eeT127QY69QKYO8qZ1sYSJVuHS5NhxlGchNZ5SWiTM/Fo4D JbqgbSDBHEid4LgKHuT7IQ1rr61as5tTHErMjIopQSVdPubmc8kk2h7Dbh50SCQiEZQO DWnNJclUiHAk6L1+DAFmtjvyk+kJjMoAxHlZA5Mc8cLk/KX8gjOU1GFwIWHPUHdmxCez JBdbYCbN9ZIKxkxLn/nvmydcSJEFNgkeUTHWtvsZY5dNkSLjPzhKDAdHRAlzEh0V6AVR 53FA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si14166136pfw.200.2018.12.11.11.27.03; Tue, 11 Dec 2018 11:27:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbeLKT05 (ORCPT + 31 others); Tue, 11 Dec 2018 14:26:57 -0500 Received: from foss.arm.com ([217.140.101.70]:55984 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbeLKT0z (ORCPT ); Tue, 11 Dec 2018 14:26:55 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85758165C; Tue, 11 Dec 2018 11:26:55 -0800 (PST) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 760563F6A8; Tue, 11 Dec 2018 11:26:54 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Alan Hayward , Szabolcs Nagy Subject: [PATCH 2/3] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition Date: Tue, 11 Dec 2018 19:26:46 +0000 Message-Id: <1544556407-19897-3-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> References: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 to structures are the same size anyway, so there is no functional or ABI change. Signed-off-by: Dave Martin --- arch/arm64/include/uapi/asm/ptrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index a36227f..65ef8b0 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -131,7 +131,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) /*