Re: [kernel-hardening] [PATCH 3/5] Protectable Memory Allocator - Debug interface
From: Jann Horn
Date: Mon Jun 05 2017 - 16:24:46 EST
On Mon, Jun 5, 2017 at 9:22 PM, Igor Stoppa <igor.stoppa@xxxxxxxxxx> 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 <igor.stoppa@xxxxxxxxxx>
[...]
> + 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.