From: Laura Abbott <labbott@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
David Brown <david.brown@linaro.org>,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
"kernel-hardening@lists.openwall.com"
<kernel-hardening@lists.openwall.com>
Subject: Re: [PATCHv2 1/4] arm64: dump: Make ptdump debugfs a separate option
Date: Wed, 12 Oct 2016 15:57:46 -0700 [thread overview]
Message-ID: <3d550df8-f850-d217-aaae-d69c8ea8243b@redhat.com> (raw)
In-Reply-To: <CAGXu5jLNUrt22Qg2gFmLj9rgStOTTTsOT7QGaw5efk==WbFwRg@mail.gmail.com>
On 10/12/2016 03:45 PM, Kees Cook wrote:
> On Wed, Oct 12, 2016 at 3:31 PM, Laura Abbott <labbott@redhat.com> wrote:
>>
>> ptdump_register currently initializes a set of page table information and
>> registers debugfs. There are uses for the ptdump option without wanting the
>> debugfs options. Split this out to make it a separate option.
>>
>> Signed-off-by: Laura Abbott <labbott@redhat.com>
>> ---
>> v2: Minor style fixups per Mark Rutland, intialization is now separate from
>> register since it never needed to be combined in the first place, EFI
>> page table registration.
>> ---
>> arch/arm64/Kconfig.debug | 6 +++++-
>> arch/arm64/include/asm/ptdump.h | 13 ++++++++-----
>> arch/arm64/mm/Makefile | 3 ++-
>> arch/arm64/mm/dump.c | 26 +++++---------------------
>> arch/arm64/mm/ptdump_debugfs.c | 31 +++++++++++++++++++++++++++++++
>> drivers/firmware/efi/arm-runtime.c | 5 ++---
>> 6 files changed, 53 insertions(+), 31 deletions(-)
>> create mode 100644 arch/arm64/mm/ptdump_debugfs.c
>>
>> diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
>> index b661fe7..21a5b74 100644
>> --- a/arch/arm64/Kconfig.debug
>> +++ b/arch/arm64/Kconfig.debug
>> @@ -2,9 +2,13 @@ menu "Kernel hacking"
>>
>> source "lib/Kconfig.debug"
>>
>> -config ARM64_PTDUMP
>> +config ARM64_PTDUMP_CORE
>> + def_bool n
>> +
>> +config ARM64_PTDUMP_DEBUGFS
>> bool "Export kernel pagetable layout to userspace via debugfs"
>
> I think this can be a tristate now, yes? (I did this on x86 so I could
> load ptdump as a module for Chrome OS image testing but then leave the
> module off the read-only partition for release images...)
>
> https://git.kernel.org/linus/8609d1b5daa36350e020e737946c40887af1743a
>
> -Kees
>
I saw the module for x86. arm64 works slightly differently since there
are multiple debugfs dumping sources, the init_mm and EFI page tables.
These are built in and can call register but then have no way to
actually register the debugfs entry when the module is inserted since
the current config covers both/all of the exporters. I
decided against trying to add the infrastructure to make modularity
work because I was spending more time on that than the actual W^X checks.
Thanks,
Laura
>> depends on DEBUG_KERNEL
>> + select ARM64_PTDUMP_CORE
>> select DEBUG_FS
>> help
>> Say Y here if you want to show the kernel pagetable layout in a
>
>
>
next prev parent reply other threads:[~2016-10-12 23:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 22:31 [PATCHv2 0/4] WX checking for arm64 Laura Abbott
2016-10-12 22:31 ` [PATCHv2 1/4] arm64: dump: Make ptdump debugfs a separate option Laura Abbott
2016-10-12 22:45 ` Kees Cook
2016-10-12 22:57 ` Laura Abbott [this message]
2016-10-12 23:13 ` Kees Cook
2016-10-17 10:52 ` Mark Rutland
2016-10-17 22:16 ` Laura Abbott
2016-10-12 22:32 ` [PATCHv2 2/4] arm64: dump: Make the page table dumping seq_file optional Laura Abbott
2016-10-17 11:02 ` Mark Rutland
2016-10-12 22:32 ` [PATCHv2 3/4] arm64: dump: Remove max_addr Laura Abbott
2016-10-17 11:05 ` Mark Rutland
2016-10-12 22:32 ` [PATCHv2 4/4] arm64: dump: Add checking for writable and exectuable pages Laura Abbott
2016-10-17 12:47 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d550df8-f850-d217-aaae-d69c8ea8243b@redhat.com \
--to=labbott@redhat.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=david.brown@linaro.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=takahiro.akashi@linaro.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome