From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbdK0JmQ (ORCPT ); Mon, 27 Nov 2017 04:42:16 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:60723 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdK0JmP (ORCPT ); Mon, 27 Nov 2017 04:42:15 -0500 Date: Mon, 27 Nov 2017 10:41:56 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , Dave Hansen , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Josh Poimboeuf , Linus Torvalds , Rik van Riel , daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, linux-mm@kvack.org, michael.schwarz@iaik.tugraz.at, moritz.lipp@iaik.tugraz.at, richard.fellner@student.tugraz.at Subject: Re: [patch V2 4/5] x86/mm/debug_pagetables: Allow dumping current pagetables Message-ID: <20171127094156.rbq7i7it7ojsblfj@hirez.programming.kicks-ass.net> References: <20171126231403.657575796@linutronix.de> <20171126232414.563046145@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171126232414.563046145@linutronix.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 9FB976B0033 for ; Mon, 27 Nov 2017 04:42:07 -0500 (EST) Received: by mail-pf0-f199.google.com with SMTP id f6so7575885pfe.16 for ; Mon, 27 Nov 2017 01:42:07 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id m17si8909700pgn.776.2017.11.27.01.42.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 01:42:06 -0800 (PST) Date: Mon, 27 Nov 2017 10:41:56 +0100 From: Peter Zijlstra Subject: Re: [patch V2 4/5] x86/mm/debug_pagetables: Allow dumping current pagetables Message-ID: <20171127094156.rbq7i7it7ojsblfj@hirez.programming.kicks-ass.net> References: <20171126231403.657575796@linutronix.de> <20171126232414.563046145@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171126232414.563046145@linutronix.de> Sender: owner-linux-mm@kvack.org List-ID: To: Thomas Gleixner Cc: LKML , Dave Hansen , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Josh Poimboeuf , Linus Torvalds , Rik van Riel , daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, linux-mm@kvack.org, michael.schwarz@iaik.tugraz.at, moritz.lipp@iaik.tugraz.at, richard.fellner@student.tugraz.at 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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org