All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>,
	Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH 2/2] tracing: Use strncpy instead of memcpy for string keys in hist triggers
Date: Mon, 04 Mar 2019 18:02:27 -0600	[thread overview]
Message-ID: <1551744147.3771.0.camel@kernel.org> (raw)
In-Reply-To: <20190304184530.7e819698@gandalf.local.home>

On Mon, 2019-03-04 at 18:45 -0500, Steven Rostedt wrote:
> On Mon, 04 Mar 2019 16:31:40 -0600
> Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
> 
> > > Hmm, I don't think it's really necessary - it's not used in a key
> > > so
> > > don't care about anything after the null, and TASK_COMM_LEN is
> > > used
> > > in
> > > the memcpy.  
> > 
> > Never mind, yeah, it would make sense to do this, will create
> > another
> > patch...
> 
> And probably should change the memcpy() of comm in
> kernel/trace/trace.c
> too. It could be that memcpy() is a little bit faster than strncpy(),
> and this is done on scheduling switches when tracing is active, but
> still, I'm starting to think that isn't a good choice.
> 

OK, will add that too.

Tom


> -- Steve

  reply	other threads:[~2019-03-05  0:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 21:07 [PATCH 0/2] A couple hist trigger patches Tom Zanussi
2019-02-04 21:07 ` [PATCH 1/2] tracing: Use str_has_prefix() in synth_event_create() Tom Zanussi
2019-02-04 21:07 ` [PATCH 2/2] tracing: Use strncpy instead of memcpy for string keys in hist triggers Tom Zanussi
2019-03-04 21:50   ` Steven Rostedt
2019-03-04 21:56     ` Steven Rostedt
2019-03-04 22:22       ` Tom Zanussi
2019-03-04 22:31         ` Tom Zanussi
2019-03-04 23:45           ` Steven Rostedt
2019-03-05  0:02             ` Tom Zanussi [this message]
2019-03-04 20:11 ` [PATCH 0/2] A couple hist trigger patches Tom Zanussi
2019-03-04 21:26   ` Steven Rostedt

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=1551744147.3771.0.camel@kernel.org \
    --to=zanussi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tom.zanussi@linux.intel.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 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.