Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1283832
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only |
| Date | 2015-12-04 15:00 +0100 |
| Message-ID | <qBZ3Z-3lZ-25@gated-at.bofh.it> (permalink) |
| References | <qAvB1-3vl-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 30, 2015 at 4:12 AM, Borislav Petkov <bp@alien8.de> wrote:
> From: Borislav Petkov <bp@suse.de>
>
> File should be created with S_IRUSR and not with S_IWUSR too because
> writing to it doesn't make any sense. I mean, we don't have a ->write
> method anyway but let's have the permissions correct too.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Arjan van de Ven <arjan@linux.intel.com>
We need a EHAHANOPE errno and have write return that. ;)
Acked-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> arch/x86/mm/debug_pagetables.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/mm/debug_pagetables.c b/arch/x86/mm/debug_pagetables.c
> index b35ee86a9316..bfcffdf6c577 100644
> --- a/arch/x86/mm/debug_pagetables.c
> +++ b/arch/x86/mm/debug_pagetables.c
> @@ -26,7 +26,7 @@ static struct dentry *pe;
>
> static int __init pt_dump_debug_init(void)
> {
> - pe = debugfs_create_file("kernel_page_tables", 0600, NULL, NULL,
> + pe = debugfs_create_file("kernel_page_tables", S_IRUSR, NULL, NULL,
> &ptdump_fops);
> if (!pe)
> return -ENOMEM;
> --
> 2.3.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Kees Cook
Chrome OS & Brillo Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only Kees Cook <keescook@chromium.org> - 2015-12-04 15:00 +0100 Re: [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only Borislav Petkov <bp@alien8.de> - 2015-12-04 15:20 +0100
csiph-web