Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbdFEUYn (ORCPT ); Mon, 5 Jun 2017 16:24:43 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:36766 "EHLO mail-it0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbdFEUYl (ORCPT ); Mon, 5 Jun 2017 16:24:41 -0400 MIME-Version: 1.0 In-Reply-To: <20170605192216.21596-4-igor.stoppa@huawei.com> References: <20170605192216.21596-1-igor.stoppa@huawei.com> <20170605192216.21596-4-igor.stoppa@huawei.com> From: Jann Horn Date: Mon, 5 Jun 2017 22:24:20 +0200 Message-ID: Subject: Re: [kernel-hardening] [PATCH 3/5] Protectable Memory Allocator - Debug interface To: Igor Stoppa Cc: Kees Cook , mhocko@kernel.org, jmorris@namei.org, penguin-kernel@i-love.sakura.ne.jp, Paul Moore , Stephen Smalley , casey@schaufler-ca.com, Christoph Hellwig , labbott@redhat.com, linux-mm@kvack.org, kernel list , Kernel Hardening 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: 725 Lines: 19 On Mon, Jun 5, 2017 at 9:22 PM, Igor Stoppa wrote: > Debugfs interface: it creates a file > > /sys/kernel/debug/pmalloc/pools > > which exposes statistics about all the pools and memory nodes in use. > > Signed-off-by: Igor Stoppa [...] > + seq_printf(s, " - node:\t\t%p\n", node); > + seq_printf(s, " - start of data ptr:\t%p\n", node->data); > + seq_printf(s, " - end of node ptr:\t%p\n", (void *)end_of_node); [...] > + seq_printf(s, "pool:\t\t\t%p\n", pool); [...] > + debugfs_create_file("pools", 0644, pmalloc_root, NULL, > + &pmalloc_file_ops); You should probably be using %pK to hide the kernel pointers.