Re: [PATCH bpf] bpf: add check for invalid name in btf_name_valid_section()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2024-08-30 at 20:41 +0900, Jeongjun Park wrote:

[...]

> So does that mean it's appropriate to add if(!isprint(*src)) instead
> of if(!*src)?

I'd prefer to add "if (!*src) return false" and remove "src++" in
order to not repeat isprint().

> As far as I know, the first character of name doesn't need isprint() check,
> so if that's true, it would be appropriate to use isprint. Once this
> is confirmed,

The intent of the buggy commit [1] was to check that all characters in
a section name are printable. But I can't even check name for
printable characters these days :(

[1] bd70a8fb7ca4 ("bpf: Allow all printable characters in BTF DATASEC names")

[...]






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux