Re: [patch V2 4/5] x86/mm/debug_pagetables: Allow dumping current pagetables
From: Peter Zijlstra
Date: Mon Nov 27 2017 - 04:42:20 EST
On Mon, Nov 27, 2017 at 12:14:07AM +0100, Thomas Gleixner wrote:
> static int __init pt_dump_debug_init(void)
> {
> + pe_knl = debugfs_create_file("kernel_page_tables", S_IRUSR, NULL, NULL,
> + &ptdump_fops);
> + if (!pe_knl)
> return -ENOMEM;
>
> + pe_curknl = debugfs_create_file("current_page_tables_knl", S_IRUSR,
> + NULL, NULL, &ptdump_curknl_fops);
> + if (!pe_curknl)
> + goto err;
> +
> +#ifdef CONFIG_KAISER
> + pe_curusr = debugfs_create_file("current_page_tables_usr", S_IRUSR,
> + NULL, NULL, &ptdump_curusr_fops);
> + if (!pe_curusr)
> + goto err;
> +#endif
> return 0;
> +err:
> + pt_dump_debug_remove_files();
> + return -ENOMEM;
> }
Could we pretty please use the octal permission thing? I can't read
thise S_crap nonsense.