[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200817114441.GK1891694@smile.fi.intel.com>
Date: Mon, 17 Aug 2020 14:44:41 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Joe Perches <joe@...ches.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [RFC PATCH] vsprintf: Add %pv extension replacement for
print_vma_addr
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) nicer.
> An example conversion is arch/x86/kernel/signal.c
>
> from:
> if (show_unhandled_signals && printk_ratelimit()) {
> printk("%s"
> "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
> task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
> me->comm, me->pid, where, frame,
> regs->ip, regs->sp, regs->orig_ax);
> print_vma_addr(KERN_CONT " in ", regs->ip);
> pr_cont("\n");
> to:
> printk("%s"
> "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx in %pv\n",
> task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
> me->comm, me->pid, where, frame,
> regs->ip, regs->sp, regs->orig_ax, (void *)regs->ip);
...
> +#else
> + buf = string_nocheck(buf, end, "CONFIG_MMU=n", default_str_spec);
> +#endif
Can we avoid this spammy message? Really it's quite long and fills valuable
space in kernel buffer. I would rather print the hashed pointer as it's done
for the rest of %pXXX.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists