public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Andrew Morton <akpm@linux-foundation.org>, Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] vsprintf: Add support for userspace strings
Date: Tue, 12 May 2015 09:31:09 +0200	[thread overview]
Message-ID: <5551AC3D.3070100@nod.at> (raw)
In-Reply-To: <20150511162316.10df1028c6afae6f4a37747f@linux-foundation.org>

Am 12.05.2015 um 01:23 schrieb Andrew Morton:
> On Sun, 10 May 2015 13:16:22 -0700 Joe Perches <joe@perches.com> wrote:
> 
>> On Sun, 2015-05-10 at 22:11 +0200, Richard Weinberger wrote:
>>> Am 10.05.2015 um 22:09 schrieb Joe Perches:
>>>> On Sun, 2015-05-10 at 21:42 +0200, Richard Weinberger wrote:
>>>>> Add %pL format string to print userspace strings.
>>>>> It works like %s but does copy_from_user() instead
>>>>> of a memcpy().
>>>>
>>>> I think this would be much simpler in a new
>>>> function rather than complicating string()
>>>
>>> -ENOPATCH.
>>
>> It's your patch, I'm just commenting on it.
>>
>> I'm not sure there's much value in it.
> 
> I can't say I'm terribly excited either.  Are there any existing
> callsites which might use this?  The %p namespace is already pretty
> crowded and if %pL is just for non-production developer debug use then
> it can reasonably live outside the main kernel tree...

My indention was to use it for two things:
a) Debugging (at least I use such code from time to time when debugging strange stuff)
b) Using this new format string in ftrace to print strings provided to syscalls instead of raw addresses.

Masami showed me that I can use "perf probe" for for both a) and b).
So let'S drop this patch.

Thanks,
//richard

  reply	other threads:[~2015-05-12  7:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 19:42 vsprintf: Add support for userspace strings Richard Weinberger
2015-05-10 19:42 ` [PATCH 1/2] Fix printk() on ERR_PTR() Richard Weinberger
2015-05-11 23:20   ` Andrew Morton
2015-05-12  7:23     ` Richard Weinberger
2015-05-10 19:42 ` [PATCH 2/2] vsprintf: Add support for userspace strings Richard Weinberger
2015-05-10 20:09   ` Joe Perches
2015-05-10 20:11     ` Richard Weinberger
2015-05-10 20:16       ` Joe Perches
2015-05-10 20:22         ` Richard Weinberger
2015-05-11 23:23         ` Andrew Morton
2015-05-12  7:31           ` Richard Weinberger [this message]
2015-05-11  0:24 ` Masami Hiramatsu
2015-05-11  8:59   ` Richard Weinberger
2015-05-11 10:57     ` Richard Weinberger
2015-05-11 20:42       ` Masami Hiramatsu

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=5551AC3D.3070100@nod.at \
    --to=richard@nod.at \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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