From patchwork Wed Dec 11 15:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 181261 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp701053ile; Wed, 11 Dec 2019 07:43:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxdRXPg0ABpnpvN8Z3drfFYT/EBcg6YaWhzgFieJaC1wthS3Bw8RfRafxmn70vkjglFIPT+ X-Received: by 2002:aca:fc02:: with SMTP id a2mr3092741oii.38.1576079008119; Wed, 11 Dec 2019 07:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079008; cv=none; d=google.com; s=arc-20160816; b=MjOqS/8pQ0MmXcGR+PKxk4siaigqdqYU3fh7fSifAZE0QjPfXPJ0KlZfAlMhdZDk1Q 1xdCmWIVxGVM9OolCJZ3YUAPpTsj6LWJ4MSouCHuZTEW0iEPryum4q/7lzArCoIHvCFQ eZOyJ2m5JtGwaSvfTxHS+KilIFjN4TxzWwNKvZy/eI5lcJs7amJA9G0zSRnqJ7g9fRfR XtZR3Qil+psl0gRPTB9fsbA4WsDYkLWtT7b8eLkwswtCAPsTEkrmNZvTxIXPdKS5XF87 BX/LJPurT4XydyEwqyrHKcvZnN9XIiM9XyGhXBseZrFhWf0ZZcxdwa63yfUk1RcVoL7P wHBA== 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; bh=8zIpPeR6Yv0wwJx2DRNtTBxCRw5Cps6ULfMNqVjDUk8=; b=hnaTjL4abDb08r8hNw6Glq2C6gCrqzM1ga+TqLyI1PLTS8z2IdMiPt/orAqFD9bt9M 1hgkEQH/sbYwqEBYlBka2SMsdLdP5PW0vTqq8riAEHn1RVE0fSgMvFXFHyqNjf0Jzw7v 2iCCtFaQvW7DgWlFx//hKNt3kuXydrolzMhC7IK11hf9WKka8TX9W5gTkD/1bvPSVQKR CehRDbBvxf1wf4SAuAIxV1mhNVVAzSvmCSxyYK8YZd6LwuYcaSm8Gy8hY0+T4UP/aPbR yXeX3KgMcVnNpk0YTnq6jUh9zd37u/tmUJ0n2Tx3ItNg9sC18Ysu1HkAVmpv3nKr60yU +Drw== 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; dmarc=fail (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 s64si1374401oig.147.2019.12.11.07.43.27; Wed, 11 Dec 2019 07:43:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388742AbfLKPn0 (ORCPT + 27 others); Wed, 11 Dec 2019 10:43:26 -0500 Received: from foss.arm.com ([217.140.110.172]:35658 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387846AbfLKPnS (ORCPT ); Wed, 11 Dec 2019 10:43:18 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4613630E; Wed, 11 Dec 2019 07:43:18 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 93B5C3F52E; Wed, 11 Dec 2019 07:43:17 -0800 (PST) From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Paul Elliott , Peter Zijlstra , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H.J. Lu" , Andrew Jones , Kees Cook , Arnd Bergmann , Jann Horn , Richard Henderson , =?utf-8?q?Kristina_Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Mark Brown Subject: [PATCH v4 12/12] arm64: mm: Display guarded pages in ptdump Date: Wed, 11 Dec 2019 15:42:06 +0000 Message-Id: <20191211154206.46260-13-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211154206.46260-1-broonie@kernel.org> References: <20191211154206.46260-1-broonie@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v8.5-BTI introduces the GP field in stage 1 translation tables which indicates that blocks and pages with it set are guarded pages for which branch target identification checks should be performed. Decode this when dumping the page tables to aid debugging. Signed-off-by: Mark Brown --- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 0a920b538a89..880bd5160dc2 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -143,6 +143,11 @@ static const struct prot_bits pte_bits[] = { .val = PTE_UXN, .set = "UXN", .clear = " ", + }, { + .mask = PTE_GP, + .val = PTE_GP, + .set = "GP", + .clear = " ", }, { .mask = PTE_ATTRINDX_MASK, .val = PTE_ATTRINDX(MT_DEVICE_nGnRnE),