Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2749869imj; Mon, 11 Feb 2019 07:56:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IbCqq56F3ohmbuPmDpo1bswqObCamu/2m8Ugq+rF9rktDMCKLsW5m3os++3mcAqKhcHR7P/ X-Received: by 2002:a65:43c5:: with SMTP id n5mr18675708pgp.250.1549900606693; Mon, 11 Feb 2019 07:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900606; cv=none; d=google.com; s=arc-20160816; b=I0nKTargAFLjySGJ2gXitAUDOtapsqw2sApgpciX+2X1IWOEB1W05W44sWNOjIc/0c cgE5zcGkYv3siApstcvhsMFiLFcJDzpj1nZZagAz4RlBsoWtbj4I7CI6FaNWtDMVyJIn GJLVajz2b5tRfJDNdNTa7DDQFrgm+XrJi5jaUN5BfyGKyP7Abz2VBoBTvxcED/Kq5puK SQpGE54ViCTJEMkNG6pjyD5n2rpL+qADCSceE+qMu3l2GMsmzFrovM1qEOYoXkNmHiit dINN9wAs7eKlSltBOfyap25EAwZ97NkTtIP2upB8H6ScQU36mp28E0tmqi7Y3kZAXl0i AxOg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j1FiQ2pTsGrSp0l+Om9SHKk4jxAIGxEOcTb0X1xnGwg=; b=Rw1WP4k57AfcPFPwpOuZYpb4s0dsap3tlUmrGK730JubyDaZL87WshQwa0TVETgFp2 HdpVs5isZRQ5iD8GPg0chXmczD63suuLZ5fyxpW2+F/FH6cl1Ky1mEeH4QpIvRaCxjeF FEU4MpPsIez16K4cNaesh3uodyXxE5lZtdIsdzoWWMqX30RSybWfsjV1KZAWxCvkGOBd LNSLooQkWSNKr+xdyNxpD/fq9lfoRNJrSM9mAQGt+vFld0BAV8Q/POJ/NimkH38Dgehn CYwg73r1HbIAgtfxnmQnmTF3cEB1Tw3MyleK1uIDFDfkblTLuTHuLrL7qyxOlfx6Z1xg C/XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ot6wNnzC; 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 x32si9610747pgk.309.2019.02.11.07.56.30; Mon, 11 Feb 2019 07:56:46 -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=ot6wNnzC; 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 S1731567AbfBKPy1 (ORCPT + 99 others); Mon, 11 Feb 2019 10:54:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:44494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731097AbfBKOfo (ORCPT ); Mon, 11 Feb 2019 09:35:44 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE36E2080F; Mon, 11 Feb 2019 14:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895744; bh=/1AKaazZBrp7vCjUjcn1mZqGMVItqWxAcv/D3igiKkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ot6wNnzC1A+QRe7JUVwmWlUlLXCmBGSNJgktSHzV2OGRnnSEehBQ62c8VDvUAEMno xBei/R5Anpae9VGDpLpQR2rLuba52BzWL26tNqKgCqiLjJWCndmME+acMUjOeR1V9k EEf9msnk3CQx2mVa7Ix6BxBYNF8gAHSCLh1XPZ5w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Martin , Will Deacon , Sasha Levin Subject: [PATCH 4.20 281/352] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition Date: Mon, 11 Feb 2019 15:18:28 +0100 Message-Id: <20190211141904.817811652@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 a36227fdb084..65ef8b0fdb0e 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) /* -- 2.19.1