Skip to content
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

Implement various syscalls on Linux for systemd #1217

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Dennisbonke
Copy link
Member

No description provided.

@avdgrinten
Copy link
Member

As mentioned on Discord, the clone patch is not ready for inclusion -- clone() needs to integrate with the pthreads code, otherwise things will break horribly with CLONE_VM is not passed.

Copy link
Member

@avdgrinten avdgrinten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the clone() patch.

Comment on lines +239 to +240
[[gnu::weak]] int sys_name_to_handle_at(int dirfd, const char *pathname, struct file_handle *handle, int *mount_id, int flags);
[[gnu::weak]] int sys_splice(int in_fd, off_t *in_off, int out_fd, off_t *out_off, size_t size, unsigned int flags, size_t *out);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are Linux extensions, not POSIX. Do we still keep them in this header?

@@ -83,6 +84,12 @@ int sys_ioctl(int fd, unsigned long request, void *arg, int *result);

[[gnu::weak]] int sys_getifaddrs(struct ifaddrs **);

[[gnu::weak]] int sys_sendfile(int outfd, int infd, off_t *offset, size_t count, size_t *out);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendfile() returns ssize_t, not size_t. However, the value is always positive, so passing size_t * is probably okay. I'm not sure how we handle this for other syscalls, but if it's consistent with other calls, it can stay like this.

The same applies to sys_splice().

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.

2 participants