Re: [PATCH 2/2] tracing: Use strncpy instead of memcpy for string keys in hist triggers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> 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



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux