From patchwork Fri Jan 4 13:09:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 154772 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp605357ljp; Fri, 4 Jan 2019 05:10:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN5MUq85x78S7x+DsjwWLTKNunggn+fRj63trCTaMtINiLeVHi4K5jBfo1JmmqjlpUtS8G8b X-Received: by 2002:a63:7e1a:: with SMTP id z26mr36725871pgc.216.1546607441572; Fri, 04 Jan 2019 05:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546607441; cv=none; d=google.com; s=arc-20160816; b=scfEUljsZ8FltMfFZjcsUOTFJrIUW2Rk0n4Meqm4y2vZ71OX1ESCKnd7nxv3DtqugV ZskgKQAcfWD0XzhC/SmandYxY84XEtUWIqGaj1DjzRZ6o0guq03PvRu7Au+D0SQOy3Me /4YZK/GhEfRyIAfyfsU4ueGY5W4y3opboee918SUUvoi+skvCFkraRMQ3VHP/6AFz7gb A9PYBVdMrq7w630EfjTg4OnjI15+gsmujl2UkJcS4Dv6titqsMojoyq8Pnxg73BJEic6 9mmVdf18J94/cuaXde+82oVFIRgDpENhRCKO4c9mM8QlLdhHskbXSqVEoehV3mSE3hFW fZZA== 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=kuJAmUZAatJhhh7GWseYCiSy7O7/BqJPwLQ6dQ1r+y4=; b=yapM9ce8KIrkawgIqN1DK6UkQQWsYoywp2uxz2C+tH4UAWL/OMF/FixSHlCWBx+RK3 I7uQ4sdgHFmNCJBJIWrbZ+t9C3jM0gMpLIvQSVgZQnZtZ4kWtvClDOah65si32TmZEtx xdid1WFT28IZ7jFUO6M9Hg6c8c/R7xTvPWHaVJz0OQ+qIo556pY+jCrlKTY5aKVbxmsu JQfoQAes4pdm+UlbXzb4og1Rf73sLKKHOzywiLtKvuk5VUy1F99ysDbIZlY7zqpZzfXY wh87klr1ab6z09f9ZEjIH+knMCkmtvdEMir7c5lerI6Ivj32HComnIGFWxbmYfrqw72D zVLg== 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 j1si54449072pff.42.2019.01.04.05.10.41; Fri, 04 Jan 2019 05:10:41 -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 S1727663AbfADNKj (ORCPT + 31 others); Fri, 4 Jan 2019 08:10:39 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfADNKi (ORCPT ); Fri, 4 Jan 2019 08:10:38 -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 76562EBD; Fri, 4 Jan 2019 05:10:38 -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 6439F3F575; Fri, 4 Jan 2019 05:10:37 -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 v2 1/2] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition Date: Fri, 4 Jan 2019 13:09:50 +0000 Message-Id: <1546607391-3850-2-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1546607391-3850-1-git-send-email-Dave.Martin@arm.com> References: <1546607391-3850-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 two 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) /*