bpf: ensure all memory is initialized in bpf_get_current_comm
authorBarret Rhoden <brho@google.com>
Fri, 7 Apr 2023 00:18:08 +0000 (20:18 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 7 Apr 2023 01:48:24 +0000 (18:48 -0700)
commitf3f21349779776135349a8e6f114a1485b2476b7
treed5c5e8919f89d2d28eb993df05d35cda7abda779
parent4daf0b327f2032ecacd2fb00c46999619f530972
bpf: ensure all memory is initialized in bpf_get_current_comm

BPF helpers that take an ARG_PTR_TO_UNINIT_MEM must ensure that all of
the memory is set, including beyond the end of the string.

Signed-off-by: Barret Rhoden <brho@google.com>
Link: https://lore.kernel.org/r/20230407001808.1622968-1-brho@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/helpers.c