Re: [kernel-hardening] [PATCH 3/5] Protectable Memory Allocator - Debug interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux