Skip to content

readlink: move ENOENT -> EINVAL logic to syscall wrapper#393

Merged
cyphar merged 1 commit into
mainfrom
proc-readlink-einval
Jun 17, 2026
Merged

readlink: move ENOENT -> EINVAL logic to syscall wrapper#393
cyphar merged 1 commit into
mainfrom
proc-readlink-einval

Conversation

@cyphar

@cyphar cyphar commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Needs #385.


In commit 08856cc ("root: make readlink return -EINVAL for
non-symlinks"), we made Root::readlink remap -ENOENT to -EINVAL, but the
exact same issue applies to ProcfsHandle::readlink and so we really
should just do this in the syscall wrapper to be safe.

This also removes the need for errno_mut.

Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cyphar cyphar force-pushed the proc-readlink-einval branch from 53042f9 to 383ba73 Compare June 17, 2026 16:16
@cyphar cyphar marked this pull request as ready for review June 17, 2026 16:16
In commit 08856cc ("root: make readlink return -EINVAL for
non-symlinks"), we made Root::readlink remap -ENOENT to -EINVAL, but the
exact same issue applies to ProcfsHandle::readlink and so we really
should just do this in the syscall wrapper to be safe.

This also removes the need for errno_mut.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cyphar cyphar force-pushed the proc-readlink-einval branch from 383ba73 to 09e6e14 Compare June 17, 2026 16:19
@cyphar cyphar merged commit 7c8050f into main Jun 17, 2026
139 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant