Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbdLET4Q (ORCPT ); Tue, 5 Dec 2017 14:56:16 -0500 Received: from mail-vk0-f68.google.com ([209.85.213.68]:36070 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbdLET4M (ORCPT ); Tue, 5 Dec 2017 14:56:12 -0500 X-Google-Smtp-Source: AGs4zMaOy5hPIO0d5AjQXX/L1/7mHd1M2twI7+4O8oosFvjAzw3Ua4y7hGFlc+tvBXczeWY4W4xSt74gt2cKHi+xBBY= MIME-Version: 1.0 In-Reply-To: <20171204142458.GA3325@pjb1027-Latitude-E5410> References: <20171204142458.GA3325@pjb1027-Latitude-E5410> From: Kees Cook Date: Tue, 5 Dec 2017 11:56:07 -0800 X-Google-Sender-Auth: PLte5BXewojRf2zyco09yRbIPBE Message-ID: Subject: Re: [kernel-hardening][PATCH v3 0/3] arm: Makes ptdump resuable and add WX page checking To: Jinbum Park Cc: linux-arm-kernel@lists.infradead.org, LKML , kernel-hardening@lists.openwall.com, Afzal Mohammed , Mark Rutland , Laura Abbott , Russell King , Greg KH , Vladimir Murzin , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1372 Lines: 49 On Mon, Dec 4, 2017 at 6:24 AM, Jinbum Park wrote: > Hi, > > Page table dumping code for arm64-x86 is reusable, > and they have function for WX page checking. > But arm doesn't have that. > > This path series are to makes ptdump reusable, > and add WX page checking for arm. > This is heavily based on arm64 version. Thanks for working on this! I sent along a few nits. -Kees > > v2 : > Fix a sender name of mail header, there was an mistake. > (from "jinb.park" to Jinbum Park) > Contents of patch-set are perfectly same. > > v3 : > Take advantage of the existing pg_level and bits arrays > to check ro, nx prot. > > jinb.park (3): > arm: mm: dump: make page table dumping reusable > arm: mm: dump: make the page table dumping seq_file optional > arm: mm: dump: add checking for writable and executable pages > > arch/arm/Kconfig.debug | 33 +++++++++- > arch/arm/include/asm/ptdump.h | 56 ++++++++++++++++ > arch/arm/mm/Makefile | 3 +- > arch/arm/mm/dump.c | 144 +++++++++++++++++++++++++++++------------- > arch/arm/mm/init.c | 2 + > arch/arm/mm/ptdump_debugfs.c | 34 ++++++++++ > 6 files changed, 226 insertions(+), 46 deletions(-) > create mode 100644 arch/arm/include/asm/ptdump.h > create mode 100644 arch/arm/mm/ptdump_debugfs.c > > -- > 1.9.1 > -- Kees Cook Pixel Security