Re: [PATCH bpf-next] bpf: fix oob in btf_name_valid_section

From: Eduard Zingerman
Date: Mon Mar 11 2024 - 14:29:10 EST


On Mon, 2024-03-11 at 11:01 -0700, Andrii Nakryiko wrote:
[...]

> Eduard, I'd also say we should make __btf_name_valid() a bit more
> uniform by dropping that first if and then doing
>
> if (!__btf_name_char_ok(*src, src == src_orig))
> return false;
>
> where we just remember original string pointer in src_orig.
>
> WDYT?

Agree, this looks simpler.