From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [RFC PATCH] vsprintf: Add %pv extension replacement for print_vma_addr
Date: Mon, 17 Aug 2020 14:44:41 +0300 [thread overview]
Message-ID: <20200817114441.GK1891694@smile.fi.intel.com> (raw)
In-Reply-To: <09f11651f0e913e159b955ac447cd8cadf36cb0d.camel@perches.com>
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
next prev parent reply other threads:[~2020-08-17 11:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 17:53 Joe Perches
2020-08-14 18:38 ` Steven Rostedt
2020-08-14 19:24 ` Joe Perches
2020-08-15 3:52 ` Sergey Senozhatsky
2020-08-15 4:18 ` Joe Perches
2020-08-17 11:44 ` Andy Shevchenko [this message]
2020-08-17 14:39 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200817114441.GK1891694@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®