Re: [PATCH bpf-next v12 02/10] bpf: Factor out check_map_mem_read helper in verifier

[email protected]
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.bpf,org.kernel.vger.linux-kernel
Message-ID <c235a89df142e86e70f38a91acc5c3ec9e64cba2ae7539df9696150bf8ea3d66@mail.kernel.org>
> In the next commit, percpu_array map will add map_direct_value_addr
> support.
> IOW, it will add a map_type check in the iff condition of the
> bpf_map_direct_read() code block, which will reduce the code block
> readability.
> Hence, factor out check_map_mem_read helper to improve the readability,
> and the maintainability for the percpu_array map case.

This isn't a bug, but did 'the iff condition' mean 'the if condition'
guarding the bpf_map_direct_read() call? And since this looks like a pure
code motion, would it be worth adding a 'No functional change intended.'
line so reviewers know what to expect?

---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/31716447858
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.