Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356122
| From | Alexei Starovoitov <ast@fb.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() |
| Date | 2016-03-11 19:40 +0100 |
| Message-ID | <rbA8F-1R9-3@gated-at.bofh.it> (permalink) |
| References | <rb05c-1w0-17@gated-at.bofh.it> <rbsuv-4D2-41@gated-at.bofh.it> <rbz2X-1a0-41@gated-at.bofh.it> <rbzFD-1Ep-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Alexei Starovoitov <ast@fb.com> - 2016-03-10 05:10 +0100
Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() David Miller <davem@davemloft.net> - 2016-03-10 05:30 +0100
Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Daniel Borkmann <daniel@iogearbox.net> - 2016-03-11 11:30 +0100
Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Alexei Starovoitov <ast@fb.com> - 2016-03-11 18:30 +0100
Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Daniel Borkmann <daniel@iogearbox.net> - 2016-03-11 19:10 +0100
Re: [PATCH net-next] bpf: avoid copying junk bytes in bpf_get_current_comm() Alexei Starovoitov <ast@fb.com> - 2016-03-11 19:40 +0100
csiph-web