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
Open
selftests/bpf: Fix read_iter buffer termination in test_bpffs#11346kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
Conversation
Author
|
Upstream branch: bd2e02e |
026b5c1 to
b72a510
Compare
Author
|
Upstream branch: 0c55d48 |
7ed94cd to
7435712
Compare
b72a510 to
ebefa82
Compare
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>
Author
|
Upstream branch: e95e85b |
7435712 to
53e7025
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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