lkml.org 
[lkml]   [2016]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm()
From
Date
On 3/11/16 10:02 AM, Daniel Borkmann wrote:
> Would strscpy() help in this case (see 30035e45753b ("string: provide
> strscpy()"))?

I've looked at it too, but 990486c8af04 scared me a little,
it's not easily backport-able and mainly I don't think
it's faster than strlcpy for small strings like comm.
memcpy going to be faster for sure.

\
 
 \ /
  Last update: 2016-03-11 20:01    [W:0.050 / U:3.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site