Re: [PATCH bpf] bpf: Refactoring btf_name_valid_identifier() and btf_name_valid_section()

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

 



On Mon, Aug 19, 2024 at 9:08 AM Jeongjun Park <aha310510@xxxxxxxxx> wrote:
>
> Currently, btf_name_valid_identifier() and btf_name_valid_section() are
> written in a while loop and use pointer operations, so it takes a long
> time to understand the operation of the code. Therefore, I suggest
> refactoring the code to make it easier to maintain.

imo it's harder to read after refactoring. Pls avoid.

> In addition, btf_name_valid_section() does not check for the case where
> src[0] is a NULL value, resulting in an out-of-bounds vuln. Therefore, a
> check for this should be added.

Hmm. Not sure about it. Pls add a selftest that demonstrates the issue
and produce a patch to fix just that.
Do not mix it with questionable refactoring.

pw-bot: cr





[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