All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: pavel@ucw.cz, joe@perches.com, keescook@chromium.org,
	geert@linux-m68k.org, jkosina@suse.cz, viro@zeniv.linux.org.uk,
	davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/vsprintf: add %pT format specifier
Date: Fri, 10 Jan 2014 17:57:30 -0800	[thread overview]
Message-ID: <20140110175730.102b8250.akpm@linux-foundation.org> (raw)
In-Reply-To: <201401111028.DEG34385.FVHtLOFMQJFSOO@I-love.SAKURA.ne.jp>

On Sat, 11 Jan 2014 10:28:51 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:

> Andrew Morton wrote:
> > On Thu, 9 Jan 2014 21:52:00 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > 
> > > This patch introduces %pT format specifier for printing task_struct->comm.
> > > Currently %pT does not provide consistency. I'm planning to change to use RCU
> > > in the future. By using RCU, the comm name read from task_struct->comm will be
> > > guaranteed to be consistent. But before modifying set_task_comm() to use RCU,
> > > we need to kill direct ->comm users who do not use get_task_comm().
> > 
> > On reflection...
> > 
> > It isn't obvious that this patch is sufficiently beneficial until we
> > have that RCU code in place.
> > 
> > So I could retain this patch in -mm until we have that all sorted out. 
> > And I'll have to avoid merging %pT users into mainline in the
> > meanwhile!
> > 
> > Am I wrong?  The patch seems fairly pointless as a standalone thing?
> > 
> 
>   Step 1: (targeted to 3.14-rc1)
>     Add "%pT" format specifier and commcpy() wrapper function.
> 
>   Step 2: (started after step 1 is reflected to other git trees)
>     Replace printk("%s", p->comm) with printk("%pT", p).
>     Replace strcpy(buf, p->comm) with commcpy(buf, p).
> 
>   Step 3: (started after step 2 is reflected to other git trees)
>     Add rcu_read_lock()/rcu_read_unlock() into commcpy().
>     Modify set_task_comm() etc. to replace ->comm using RCU.

In the absence of step 3, steps 1 and 2 are rather pointless churn.

So I think it would be better to merge (into mainline) steps 1 and 3
first and at the same time.  Then start thinking about step 2.


  parent reply	other threads:[~2014-01-11  1:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 12:52 [PATCH] lib/vsprintf: add %pT format specifier Tetsuo Handa
2014-01-09 18:11 ` Kees Cook
2014-01-10 23:59 ` Andrew Morton
2014-01-11  1:59   ` Tetsuo Handa
2014-01-11  2:15     ` Joe Perches
2014-01-11  2:30       ` Tetsuo Handa
2014-01-11 10:28   ` Geert Uytterhoeven
2014-01-11 12:03     ` Tetsuo Handa
2014-01-12  7:55       ` Tetsuo Handa
2014-02-19 21:55         ` Richard Guy Briggs
2014-02-21 17:56           ` Richard Guy Briggs
2014-02-22  1:40             ` Tetsuo Handa
2014-01-11  0:04 ` Andrew Morton
2014-01-11  1:28   ` Tetsuo Handa
2014-01-11  1:36     ` Joe Perches
2014-01-11  1:48       ` Tetsuo Handa
2014-01-11  1:57     ` Andrew Morton [this message]
2014-01-11  3:09       ` Tetsuo Handa
2014-01-11  9:50         ` Paul E. McKenney
2014-01-11 11:35       ` Pavel Machek

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=20140110175730.102b8250.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=jkosina@suse.cz \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.