Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-17 Thread Joe Perches
On Mon, 2020-08-17 at 14:44 +0300, Andy Shevchenko wrote: > On Fri, Aug 14, 2020 at 10:53:03AM -0700, Joe Perches wrote: > > There is a print_vma_addr function used several places > > that requires KERN_CONT use. > > > > Add a %pv mechanism to avoid the need for KERN_CONT. > > I like the idea, bu

Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-17 Thread Andy Shevchenko
On Fri, Aug 14, 2020 at 10:53:03AM -0700, Joe Perches wrote: > There is a print_vma_addr function used several places > that requires KERN_CONT use. > > Add a %pv mechanism to avoid the need for KERN_CONT. I like the idea, but I would accent the selling point to make code (in the user call sites)

Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-15 Thread Joe Perches
On Sat, 2020-08-15 at 12:52 +0900, Sergey Senozhatsky wrote: > Cc-ing John > > On (20/08/14 10:53), Joe Perches wrote: > [..] > > In general, the idea looks nice. > > > +static noinline_for_stack > > +char *vma_addr(char *buf, char *end, void *ip, > > + struct printf_spec spec, const ch

Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-15 Thread Sergey Senozhatsky
Cc-ing John On (20/08/14 10:53), Joe Perches wrote: [..] In general, the idea looks nice. > +static noinline_for_stack > +char *vma_addr(char *buf, char *end, void *ip, > +struct printf_spec spec, const char *fmt) > +{ > +#ifdef CONFIG_MMU > + struct mm_struct *mm = current->mm;

Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-14 Thread Joe Perches
On Fri, 2020-08-14 at 14:38 -0400, Steven Rostedt wrote: > On Fri, 14 Aug 2020 10:53:03 -0700 > Joe Perches wrote: > I'm fine with all his, but I feel more comfortable if this patch > created a single copy of the code. Perhaps add: [] > diff --git a/mm/memory.c b/mm/memory.c [] > @@ -4771,32 +4771

Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-14 Thread Steven Rostedt
On Fri, 14 Aug 2020 10:53:03 -0700 Joe Perches wrote: > There is a print_vma_addr function used several places > that requires KERN_CONT use. > > Add a %pv mechanism to avoid the need for KERN_CONT. > > An example conversion is arch/x86/kernel/signal.c > > from: > if (show_unhandled_sign

[RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr

2020-08-14 Thread Joe Perches
There is a print_vma_addr function used several places that requires KERN_CONT use. Add a %pv mechanism to avoid the need for KERN_CONT. An example conversion is arch/x86/kernel/signal.c from: if (show_unhandled_signals && printk_ratelimit()) { printk("%s"