lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Mar 2019 18:45:30 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc:     Tom Zanussi <zanussi@...nel.org>, linux-kernel@...r.kernel.org,
        linux-rt-users@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 2/2] tracing: Use strncpy instead of memcpy for string
 keys in hist triggers

On Mon, 04 Mar 2019 16:31:40 -0600
Tom Zanussi <tom.zanussi@...ux.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.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ