Skip to content

selftests/bpf: Fix read_iter buffer termination in test_bpffs#11346

Open
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
series/1064242=>bpf-next
Open

selftests/bpf: Fix read_iter buffer termination in test_bpffs#11346
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
series/1064242=>bpf-next

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: selftests/bpf: Fix read_iter buffer termination in test_bpffs
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1064242

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bd2e02e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1064242
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0c55d48
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1064242
version: 1

ahjf-07 added 2 commits March 10, 2026 18:11
read_iter() always NUL-terminated at the end of the buffer, so strstr()
could scan uninitialized stack bytes on short reads. Terminate at len and
use O_RDONLY.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
…bpffs

maps.debug/progs.debug may be inaccessible or absent (EPERM/EACCES/ENOENT)
in some environments, which used to abort test_bpffs before it exercised
the pin and rename checks. Treat these errors as "iter unavailable", log
an INFO message, and continue with the core bpffs tests.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e95e85b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1064242
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant