Repository navigation
fix: patch cptofs to reset errno before readdir - #643
Closed
07joshua03 wants to merge 1 commit into
Closed
07joshua03 wants to merge 1 commit into
07joshua03 wants to merge 1 commit into
Conversation
cptofs read_dir does not reset errno before calling readdir, so stale errno from earlier syscalls are reported as "error while reading directory ... Invalid argument" at every normal end of directory, as readdir does not change errno if eod. Signed-off-by: Joshua Gort <accounts@joshuagort.com>
ddiss
approved these changes
Sep 22, 2026
ddiss
left a comment
There was a problem hiding this comment.
Makes sense and looks good to me - thanks Joshua!
|
I just saw that |
tavip
approved these changes
Sep 22, 2026
tavip
left a comment
Member
There was a problem hiding this comment.
LGTM, just a minor issue with checkpatch.
Merged as 00ff347 , with minor whitespace cleanup and changelog reformatting applied. |
thehajime
pushed a commit
to thehajime/linux
that referenced
this pull request
Oct 5, 2026
Add a verifier test where a spilled scalar is filled once via a sign- extending load (BPF_MEMSX) and once via a zero-extending load (BPF_MEM). The two destination registers must not share a scalar id. # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_scalar_ids [...] lkl#643/1 verifier_scalar_ids/linked_regs_bpf_k:OK lkl#643/2 verifier_scalar_ids/linked_regs_bpf_x_src:OK lkl#643/3 verifier_scalar_ids/linked_regs_bpf_x_dst:OK lkl#643/4 verifier_scalar_ids/linked_regs_broken_link:OK lkl#643/5 verifier_scalar_ids/precision_many_frames:OK lkl#643/6 verifier_scalar_ids/precision_stack:OK lkl#643/7 verifier_scalar_ids/precision_two_ids:OK lkl#643/8 verifier_scalar_ids/linked_regs_too_many_regs:OK lkl#643/9 verifier_scalar_ids/linked_regs_broken_link_2:OK lkl#643/10 verifier_scalar_ids/cjmp_no_linked_regs_trigger:OK lkl#643/11 verifier_scalar_ids/check_ids_in_regsafe:OK lkl#643/12 verifier_scalar_ids/check_ids_in_regsafe_2:OK lkl#643/13 verifier_scalar_ids/no_scalar_id_for_const:OK lkl#643/14 verifier_scalar_ids/no_scalar_id_for_const32:OK lkl#643/15 verifier_scalar_ids/ignore_unique_scalar_ids_cur:OK lkl#643/16 verifier_scalar_ids/ignore_unique_scalar_ids_old:OK lkl#643/17 verifier_scalar_ids/two_nil_old_ids_one_cur_id:OK lkl#643/18 verifier_scalar_ids/two_old_ids_one_cur_id:OK lkl#643/19 verifier_scalar_ids/linked_regs_and_subreg_def:OK lkl#643/20 verifier_scalar_ids/ldsx_fill_scalar_id_not_shared:OK lkl#643 verifier_scalar_ids:OK Summary: 1/20 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
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.
cptofs read_dir does not reset errno before calling readdir, so stale errno from earlier syscalls are reported as "error while reading directory ... Invalid argument" at every normal end of directory, as readdir does not change errno if eod.