Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-16 Thread Arjan van de Ven
If the *module* is really a nonmodule, IMHO it should add the information to or add other macros macros instead of reuse the MODULE_*. BTW, for macros in this file, for a nonmodule "license GPL" is unnecessary at all. I really fail to see what you have against machine-and-human readable data

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-16 Thread Arjan van de Ven
If the *module* is really a nonmodule, IMHO it should add the information to or add other macros macros instead of reuse the MODULE_*. BTW, for macros in this file, for a nonmodule license GPL is unnecessary at all. I really fail to see what you have against machine-and-human readable data

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/16/14 at 02:46pm, Dave Young wrote: > On 01/15/14 at 08:04pm, H. Peter Anvin wrote: > > On 01/15/2014 07:03 PM, Dave Young wrote: > > >> > > >> making something harder to grep and less standardized is hardly cleaner > > >> and these things compile to nothing for non-modules. > > > > > >

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 08:04pm, H. Peter Anvin wrote: > On 01/15/2014 07:03 PM, Dave Young wrote: > >> > >> making something harder to grep and less standardized is hardly cleaner > >> and these things compile to nothing for non-modules. > > > > It's not nothing, just very small increasement: > >text

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread H. Peter Anvin
On 01/15/2014 07:03 PM, Dave Young wrote: >> >> making something harder to grep and less standardized is hardly cleaner >> and these things compile to nothing for non-modules. > > It's not nothing, just very small increasement: >text data bss dec hex filename > 7636121

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 06:41pm, Arjan van de Ven wrote: > On 1/15/2014 5:44 PM, Dave Young wrote: > >On 01/15/14 at 06:11am, H. Peter Anvin wrote: > >>On 01/14/2014 05:16 PM, Dave Young wrote: > > Why the [Finnish] do you feel that information needs to be in a > different form because it is

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Arjan van de Ven
On 1/15/2014 5:44 PM, Dave Young wrote: On 01/15/14 at 06:11am, H. Peter Anvin wrote: On 01/14/2014 05:16 PM, Dave Young wrote: Why the [Finnish] do you feel that information needs to be in a different form because it is (currently!) not available as a module? I think moving them to comment

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 06:11am, H. Peter Anvin wrote: > On 01/14/2014 05:16 PM, Dave Young wrote: > >> > >> Why the [Finnish] do you feel that information needs to be in a > >> different form because it is (currently!) not available as a module? > > > > I think moving them to comment can avoid including

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread H. Peter Anvin
On 01/14/2014 05:16 PM, Dave Young wrote: >> >> Why the [Finnish] do you feel that information needs to be in a >> different form because it is (currently!) not available as a module? > > I think moving them to comment can avoid including extra linux/module.h > And that matters, why?

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread H. Peter Anvin
On 01/14/2014 05:16 PM, Dave Young wrote: Why the [Finnish] do you feel that information needs to be in a different form because it is (currently!) not available as a module? I think moving them to comment can avoid including extra linux/module.h And that matters, why? -hpa --

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 06:11am, H. Peter Anvin wrote: On 01/14/2014 05:16 PM, Dave Young wrote: Why the [Finnish] do you feel that information needs to be in a different form because it is (currently!) not available as a module? I think moving them to comment can avoid including extra

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Arjan van de Ven
On 1/15/2014 5:44 PM, Dave Young wrote: On 01/15/14 at 06:11am, H. Peter Anvin wrote: On 01/14/2014 05:16 PM, Dave Young wrote: Why the [Finnish] do you feel that information needs to be in a different form because it is (currently!) not available as a module? I think moving them to comment

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 06:41pm, Arjan van de Ven wrote: On 1/15/2014 5:44 PM, Dave Young wrote: On 01/15/14 at 06:11am, H. Peter Anvin wrote: On 01/14/2014 05:16 PM, Dave Young wrote: Why the [Finnish] do you feel that information needs to be in a different form because it is (currently!) not

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread H. Peter Anvin
On 01/15/2014 07:03 PM, Dave Young wrote: making something harder to grep and less standardized is hardly cleaner and these things compile to nothing for non-modules. It's not nothing, just very small increasement: text data bss dec hex filename 7636121

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/15/14 at 08:04pm, H. Peter Anvin wrote: On 01/15/2014 07:03 PM, Dave Young wrote: making something harder to grep and less standardized is hardly cleaner and these things compile to nothing for non-modules. It's not nothing, just very small increasement: textdata

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-15 Thread Dave Young
On 01/16/14 at 02:46pm, Dave Young wrote: On 01/15/14 at 08:04pm, H. Peter Anvin wrote: On 01/15/2014 07:03 PM, Dave Young wrote: making something harder to grep and less standardized is hardly cleaner and these things compile to nothing for non-modules. It's not nothing, just

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-14 Thread Dave Young
On 01/14/14 at 10:18am, H. Peter Anvin wrote: > On 01/13/2014 05:40 PM, Dave Young wrote: > > On 01/13/14 at 06:48am, Arjan van de Ven wrote: > >> On 1/13/2014 4:23 AM, Dave Young wrote: > > > How about do not limit to only if (pgd) case, instead do something > > like below: set

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-14 Thread H. Peter Anvin
On 01/13/2014 05:40 PM, Dave Young wrote: > On 01/13/14 at 06:48am, Arjan van de Ven wrote: >> On 1/13/2014 4:23 AM, Dave Young wrote: > How about do not limit to only if (pgd) case, instead do something > like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-14 Thread H. Peter Anvin
On 01/13/2014 05:40 PM, Dave Young wrote: On 01/13/14 at 06:48am, Arjan van de Ven wrote: On 1/13/2014 4:23 AM, Dave Young wrote: How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not a module. Hmm, I just

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-14 Thread Dave Young
On 01/14/14 at 10:18am, H. Peter Anvin wrote: On 01/13/2014 05:40 PM, Dave Young wrote: On 01/13/14 at 06:48am, Arjan van de Ven wrote: On 1/13/2014 4:23 AM, Dave Young wrote: How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Dave Young
On 01/13/14 at 06:48am, Arjan van de Ven wrote: > On 1/13/2014 4:23 AM, Dave Young wrote: > >> > >>>How about do not limit to only if (pgd) case, instead do something > >>>like below: set dump_to_dmesg as a module parameter > >> > >>X86_PTDUMP is not a module. > > > >Hmm, I just see the module

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Matt Fleming
On Sat, 11 Jan, at 09:49:27PM, Borislav Petkov wrote: > From: Borislav Petkov > > With reusing the ->trampoline_pgd page table for mapping EFI regions in > order to use them after having switched to EFI virtual mode, it is very > useful to be able to dump aforementioned page table in dmesg. This

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Borislav Petkov
On Mon, Jan 13, 2014 at 06:48:10AM -0800, Arjan van de Ven wrote: > >MODULE_LICENSE("GPL"); > >MODULE_AUTHOR("Arjan van de Ven "); > >MODULE_DESCRIPTION("Kernel debugging helper that dumps pagetables"); > > personally I consider it good form to always have this kind of > information in .c files,

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Arjan van de Ven
On 1/13/2014 4:23 AM, Dave Young wrote: How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not a module. Hmm, I just see the module macros in the code, since it's a bool Kconfig I think the dump_pagetables.c

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Dave Young
> > > How about do not limit to only if (pgd) case, instead do something > > like below: set dump_to_dmesg as a module parameter > > X86_PTDUMP is not a module. Hmm, I just see the module macros in the code, since it's a bool Kconfig I think the dump_pagetables.c need a cleanup, remove the

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Borislav Petkov
On Mon, Jan 13, 2014 at 01:32:40PM +0800, Dave Young wrote: > pr_info? This is for debug purpose, maybe pr_debug is better? I hate pr_debug as it depends on other defines I have to have defined properly in order just so I get output. > How about do not limit to only if (pgd) case, instead do

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Borislav Petkov
On Mon, Jan 13, 2014 at 01:32:40PM +0800, Dave Young wrote: pr_info? This is for debug purpose, maybe pr_debug is better? I hate pr_debug as it depends on other defines I have to have defined properly in order just so I get output. How about do not limit to only if (pgd) case, instead do

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Dave Young
How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not a module. Hmm, I just see the module macros in the code, since it's a bool Kconfig I think the dump_pagetables.c need a cleanup, remove the #include

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Arjan van de Ven
On 1/13/2014 4:23 AM, Dave Young wrote: How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not a module. Hmm, I just see the module macros in the code, since it's a bool Kconfig I think the dump_pagetables.c

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Borislav Petkov
On Mon, Jan 13, 2014 at 06:48:10AM -0800, Arjan van de Ven wrote: MODULE_LICENSE(GPL); MODULE_AUTHOR(Arjan van de Ven ar...@linux.intel.com); MODULE_DESCRIPTION(Kernel debugging helper that dumps pagetables); personally I consider it good form to always have this kind of information in .c

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Matt Fleming
On Sat, 11 Jan, at 09:49:27PM, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de With reusing the -trampoline_pgd page table for mapping EFI regions in order to use them after having switched to EFI virtual mode, it is very useful to be able to dump aforementioned page table in

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-13 Thread Dave Young
On 01/13/14 at 06:48am, Arjan van de Ven wrote: On 1/13/2014 4:23 AM, Dave Young wrote: How about do not limit to only if (pgd) case, instead do something like below: set dump_to_dmesg as a module parameter X86_PTDUMP is not a module. Hmm, I just see the module macros in the code, since

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-12 Thread Dave Young
On 01/11/14 at 09:49pm, Borislav Petkov wrote: > From: Borislav Petkov > > With reusing the ->trampoline_pgd page table for mapping EFI regions in > order to use them after having switched to EFI virtual mode, it is very > useful to be able to dump aforementioned page table in dmesg. This adds >

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-12 Thread Dave Young
On 01/11/14 at 09:49pm, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de With reusing the -trampoline_pgd page table for mapping EFI regions in order to use them after having switched to EFI virtual mode, it is very useful to be able to dump aforementioned page table in dmesg. This

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-11 Thread Joe Perches
On Sat, 2014-01-11 at 21:49 +0100, Borislav Petkov wrote: > From: Borislav Petkov > > With reusing the ->trampoline_pgd page table for mapping EFI regions in > order to use them after having switched to EFI virtual mode, it is very > useful to be able to dump aforementioned page table in dmesg.

Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable

2014-01-11 Thread Joe Perches
On Sat, 2014-01-11 at 21:49 +0100, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de With reusing the -trampoline_pgd page table for mapping EFI regions in order to use them after having switched to EFI virtual mode, it is very useful to be able to dump aforementioned page table in