New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib/posix-fdio: Move non-trivial libc syscall wrappers over from vfscore #1392
Conversation
This change moves the implementations of non-trivial libc wrapper functions for file-related syscalls from vfscore into posix-fdio, where these syscalls are actually implemented. This was an oversight of the original posix-fdio work. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This change reworks the libc function aliasing for pread(64) and pwrite(64), simplifying it. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This change adds support to the `fcntl` libc wrapper for fetching the optional argument for all known fcntl cmd values. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Reviewed-by: Robert Zamfir georobi.016@gmail.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason open
and openat
were not moved to posix-fdio
?
All looks good besides that.
Both of these syscalls are centered on paths rather than open files. Paths are inherently linked to the concept of a "filesystem" and do not make sense without it, e.g., in an environment where all your files are pseudo-files (ttys, sockets, pipes, etc.). This will change soon though, when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense, thanks.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Approved-by: Simon Kuenzer simon@unikraft.io
This change moves the implementations of non-trivial libc wrapper functions for file-related syscalls from vfscore into posix-fdio, where these syscalls are actually implemented. This was an oversight of the original posix-fdio work. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Robert Zamfir <georobi.016@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Simon Kuenzer <simon@unikraft.io> GitHub-Closes: #1392
This change reworks the libc function aliasing for pread(64) and pwrite(64), simplifying it. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Robert Zamfir <georobi.016@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Simon Kuenzer <simon@unikraft.io> GitHub-Closes: #1392
This change adds support to the `fcntl` libc wrapper for fetching the optional argument for all known fcntl cmd values. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Robert Zamfir <georobi.016@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Simon Kuenzer <simon@unikraft.io> GitHub-Closes: #1392
Description of changes
This changeset moves the implementations of non-trivial libc wrapper functions for file-related syscalls from vfscore into posix-fdio, where these syscalls are actually implemented, fixing an oversight of the original posix-fdio work.
In addition, two improvements are made to the handling of these functions:
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
x86_64
or N/A]kvm
,xen
or N/A]app-python3
or N/A]Additional configuration
N/A; this change should be transparent to user code