From patchwork Thu Feb 27 17:44:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 11409065 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1ADE14BC for ; Thu, 27 Feb 2020 17:44:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82258246B1 for ; Thu, 27 Feb 2020 17:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582825492; bh=nk6wwF8pUt1K1x95HCkgB+QHeseB0pbsdmvD8seAupQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MG7aUkqvojQcEX+abp3w3SU5Fq8wGL1xyE1aYNphZSYhDpMH115KesuQmCo5WD0eJ Gcshjuu0gbuscZeBbNiY5RoWU/Mca3r3mehK+ImoYLo5cRHw07/rLYvME+v6CmNuqc SDe9jE//d/i499Am5wQhmGvuEiQiXdDQtXdN0kaY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730774AbgB0Ros (ORCPT ); Thu, 27 Feb 2020 12:44:48 -0500 Received: from foss.arm.com ([217.140.110.172]:55724 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730705AbgB0Ros (ORCPT ); Thu, 27 Feb 2020 12:44:48 -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 D837F4B2; Thu, 27 Feb 2020 09:44:47 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2682B3F73B; Thu, 27 Feb 2020 09:44:47 -0800 (PST) From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Alexander Viro , 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?= =?utf-8?q?=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, Mark Brown Subject: [PATCH v8 11/11] arm64: mm: Display guarded pages in ptdump Date: Thu, 27 Feb 2020 17:44:17 +0000 Message-Id: <20200227174417.23722-12-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227174417.23722-1-broonie@kernel.org> References: <20200227174417.23722-1-broonie@kernel.org> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 Reviewed-by: Kees Cook --- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 860c00ec8bd3..78163b7a7dde 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -145,6 +145,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),