]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Clarify return value of probe str helpers
authorBrendan Jackman <jackmanb@google.com>
Tue, 12 Jan 2021 12:34:22 +0000 (12:34 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 12 Jan 2021 20:38:34 +0000 (21:38 +0100)
commitbe86cf4d5da6d4c610568f4520002a7c51c80bd3
treed198c92978844d3e4050b5accd2c9647f44cc00e
parentf73c144dffd01dec30054af6b70fa113264a4fef
bpf: Clarify return value of probe str helpers

When the buffer is too small to contain the input string, these helpers
return the length of the buffer, not the length of the original string.
This tries to make the docs totally clear about that, since "the length
of the [copied ]string" could also refer to the length of the input.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: KP Singh <kpsingh@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210112123422.2011234-1-jackmanb@google.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h