Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 12:20), Helge Deller wrote: [..] > > I've not looked at the specifics case... > > > > Another option is using a struct with a single member and > > passing it by value. > > Actually, we do already have correct structs which could be referenced: > parisc: struct Elf64_Fdesc > ia64:

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 12:20), Helge Deller wrote: [..] > > I've not looked at the specifics case... > > > > Another option is using a struct with a single member and > > passing it by value. > > Actually, we do already have correct structs which could be referenced: > parisc: struct Elf64_Fdesc > ia64:

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Helge Deller
On 20.09.2017 10:41, David Laight wrote: From: Helge Deller Sent: 19 September 2017 21:08 ... Using 'unsigned long' for any kind of pointer is an accident waiting do happen. It also makes it difficult to typecheck the function calls. Using 'void *' isn't any better. Either a pointer to an

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Helge Deller
On 20.09.2017 10:41, David Laight wrote: From: Helge Deller Sent: 19 September 2017 21:08 ... Using 'unsigned long' for any kind of pointer is an accident waiting do happen. It also makes it difficult to typecheck the function calls. Using 'void *' isn't any better. Either a pointer to an

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread David Laight
From: Helge Deller > Sent: 19 September 2017 21:08 ... > > Using 'unsigned long' for any kind of pointer is an accident > > waiting do happen. > > It also makes it difficult to typecheck the function calls. > > Using 'void *' isn't any better. > > Either a pointer to an undefined struct, or a

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread David Laight
From: Helge Deller > Sent: 19 September 2017 21:08 ... > > Using 'unsigned long' for any kind of pointer is an accident > > waiting do happen. > > It also makes it difficult to typecheck the function calls. > > Using 'void *' isn't any better. > > Either a pointer to an undefined struct, or a

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Sergey Senozhatsky
On (09/19/17 22:03), Helge Deller wrote: [..] > Your implementation of dereference_module_function_descriptor() in > arch/parisc/kernel/module.c is faulty. > mod->arch.fdesc_offset is relative to the base address of the module, > so you need to add to mod->core_layout.base. aha, got it. I should

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Sergey Senozhatsky
On (09/19/17 22:03), Helge Deller wrote: [..] > Your implementation of dereference_module_function_descriptor() in > arch/parisc/kernel/module.c is faulty. > mod->arch.fdesc_offset is relative to the base address of the module, > so you need to add to mod->core_layout.base. aha, got it. I should

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
On 19.09.2017 15:38, David Laight wrote: From: Sergey Senozhatsky Sent: 19 September 2017 03:06 ... I'll simply convert everything to `unsigned long'. including the dereference_function_descriptor() function [I believe there are still some casts happening when we pass addr from kernel/module

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
On 19.09.2017 15:38, David Laight wrote: From: Sergey Senozhatsky Sent: 19 September 2017 03:06 ... I'll simply convert everything to `unsigned long'. including the dereference_function_descriptor() function [I believe there are still some casts happening when we pass addr from kernel/module

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
* Helge Deller : > On 19.09.2017 04:05, Sergey Senozhatsky wrote: > >On (09/18/17 20:39), Helge Deller wrote: > >>I did tried your testcases [on parisc] too. > ... > >>and here is "modprobe zram": > >> printk#7 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] > >> printk#8

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
* Helge Deller : > On 19.09.2017 04:05, Sergey Senozhatsky wrote: > >On (09/18/17 20:39), Helge Deller wrote: > >>I did tried your testcases [on parisc] too. > ... > >>and here is "modprobe zram": > >> printk#7 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] > >> printk#8

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
On 19.09.2017 04:05, Sergey Senozhatsky wrote: On (09/18/17 20:39), Helge Deller wrote: I did tried your testcases [on parisc] too. ... and here is "modprobe zram": printk#7 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] printk#8 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] printk#9

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread Helge Deller
On 19.09.2017 04:05, Sergey Senozhatsky wrote: On (09/18/17 20:39), Helge Deller wrote: I did tried your testcases [on parisc] too. ... and here is "modprobe zram": printk#7 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] printk#8 __UNIQUE_ID_vermagic8+0xb9a4/0xbd04 [zram] printk#9

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread David Laight
From: Sergey Senozhatsky > Sent: 19 September 2017 03:06 ... > I'll simply convert everything to `unsigned long'. including the > dereference_function_descriptor() function [I believe there are > still some casts happening when we pass addr from kernel/module > dereference functions to

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-19 Thread David Laight
From: Sergey Senozhatsky > Sent: 19 September 2017 03:06 ... > I'll simply convert everything to `unsigned long'. including the > dereference_function_descriptor() function [I believe there are > still some casts happening when we pass addr from kernel/module > dereference functions to

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Sergey Senozhatsky
On (09/18/17 10:44), Luck, Tony wrote: [..] > > A few new warnings when building on ia64: > > arch/ia64/kernel/module.c:931: warning: passing argument 1 of > 'dereference_function_descriptor' makes pointer from integer without a cast > arch/ia64/kernel/module.c:931: warning: return makes

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Sergey Senozhatsky
On (09/18/17 10:44), Luck, Tony wrote: [..] > > A few new warnings when building on ia64: > > arch/ia64/kernel/module.c:931: warning: passing argument 1 of > 'dereference_function_descriptor' makes pointer from integer without a cast > arch/ia64/kernel/module.c:931: warning: return makes

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Sergey Senozhatsky
On (09/18/17 20:39), Helge Deller wrote: [..] > > A few new warnings when building on ia64: > > > > arch/ia64/kernel/module.c:931: warning: passing argument 1 of > > 'dereference_function_descriptor' makes pointer from integer without a cast > > arch/ia64/kernel/module.c:931: warning: return

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Sergey Senozhatsky
On (09/18/17 20:39), Helge Deller wrote: [..] > > A few new warnings when building on ia64: > > > > arch/ia64/kernel/module.c:931: warning: passing argument 1 of > > 'dereference_function_descriptor' makes pointer from integer without a cast > > arch/ia64/kernel/module.c:931: warning: return

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Helge Deller
* Luck, Tony : > On Sat, Sep 16, 2017 at 12:53:42PM +0900, Sergey Senozhatsky wrote: > > Hello > > > > RFC > > > > On some arches C function pointers are indirect and point to > > a function descriptor, which contains the actual pointer to the code. > > This

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Helge Deller
* Luck, Tony : > On Sat, Sep 16, 2017 at 12:53:42PM +0900, Sergey Senozhatsky wrote: > > Hello > > > > RFC > > > > On some arches C function pointers are indirect and point to > > a function descriptor, which contains the actual pointer to the code. > > This mostly doesn't matter,

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Luck, Tony
On Sat, Sep 16, 2017 at 12:53:42PM +0900, Sergey Senozhatsky wrote: > Hello > > RFC > > On some arches C function pointers are indirect and point to > a function descriptor, which contains the actual pointer to the code. > This mostly doesn't matter, except for cases when

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-18 Thread Luck, Tony
On Sat, Sep 16, 2017 at 12:53:42PM +0900, Sergey Senozhatsky wrote: > Hello > > RFC > > On some arches C function pointers are indirect and point to > a function descriptor, which contains the actual pointer to the code. > This mostly doesn't matter, except for cases when

[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-15 Thread Sergey Senozhatsky
Hello RFC On some arches C function pointers are indirect and point to a function descriptor, which contains the actual pointer to the code. This mostly doesn't matter, except for cases when people want to print out function pointers in symbolic format, because the usual

[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-15 Thread Sergey Senozhatsky
Hello RFC On some arches C function pointers are indirect and point to a function descriptor, which contains the actual pointer to the code. This mostly doesn't matter, except for cases when people want to print out function pointers in symbolic format, because the usual