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

Add more syscall constansts for Linux #2114

Merged
merged 3 commits into from
Mar 16, 2021
Merged

Add more syscall constansts for Linux #2114

merged 3 commits into from
Mar 16, 2021

Conversation

voidc
Copy link
Contributor

@voidc voidc commented Mar 15, 2021

In #1897 (comment), there was interest in adding constants for recently added Linux syscalls. I went ahead and added consts for syscalls up until (the currently unreleased) Linux 5.12. Here is an overview:

Syscall NR since
pidfd_send_signal 424 5.1
io_uring_setup 425 5.1
io_uring_enter 426 5.1
io_uring_register 427 5.1
open_tree 428 5.2
move_mount 429 5.2
fsopen 430 5.2
fsconfig 431 5.2
fsmount 432 5.2
fspick 433 5.2
pidfd_open 434 5.3
clone3 435 5.3
close_range 436 5.9
openat2 437 5.9
pidfd_getfd 438 5.9
faccessat2 439 5.9
process_madvise 440 5.10
epoll_pwait2 441 5.11
mount_setattr 442 5.12

(source)

The constants are added for -gnu and -musl targets.
I'm unsure to what extend they are actually present in the headers of these libraries.

Support is added for all architectures except hexagon.

@rust-highfive
Copy link

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

@JohnTitor
Copy link
Member

Thanks! I'd like to wait until #2113 gets merged.

@voidc
Copy link
Contributor Author

voidc commented Mar 15, 2021

Sure! It seems like the glibc version used by CI doesn't contain SYS_* constants for syscalls which were added in 5.9 or later. Should I add exceptions for those to the build script?

@JohnTitor
Copy link
Member

It seems like glibc version used by CI doesn't contain SYS_* constants for syscalls which were added in 5.9 or later. Should I add exceptions for those to the build script?

Yeah, let's do so with a comment. But the above PR may cause a merge conflict so I'd wait anyway.

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2021

📌 Commit 204fe25 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Testing commit 204fe25 with merge 459c60b...

bors added a commit that referenced this pull request Mar 16, 2021
Add more syscall constansts for Linux

In #1897 (comment), there was interest in adding constants for recently added Linux syscalls. I went ahead and added consts for syscalls up until (the currently unreleased) Linux 5.12. Here is an overview:

| Syscall           | NR  | since |
| ----------------- | --- | ----- |
| pidfd_send_signal | 424 | 5.1   |
| io_uring_setup    | 425 | 5.1   |
| io_uring_enter    | 426 | 5.1   |
| io_uring_register | 427 | 5.1   |
| open_tree         | 428 | 5.2   |
| move_mount        | 429 | 5.2   |
| fsopen            | 430 | 5.2   |
| fsconfig          | 431 | 5.2   |
| fsmount           | 432 | 5.2   |
| fspick            | 433 | 5.2   |
| pidfd_open        | 434 | 5.3   |
| clone3            | 435 | 5.3   |
| close_range       | 436 | 5.9   |
| openat2           | 437 | 5.9   |
| pidfd_getfd       | 438 | 5.9   |
| faccessat2        | 439 | 5.9   |
| process_madvise   | 440 | 5.10  |
| epoll_pwait2      | 441 | 5.11  |
| mount_setattr     | 442 | 5.12  |

([source](https://github.com/torvalds/linux/blob/1e28eed17697bcf343c6743f0028cc3b5dd88bf0/include/uapi/asm-generic/unistd.h#L825-L865))

The constants are added for `-gnu` and `-musl` targets.
I'm unsure to what extend they are actually present in the headers of these libraries.

Support is added for all architectures except hexagon.
@bors
Copy link
Contributor

bors commented Mar 16, 2021

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2021

📌 Commit 1698c37 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Testing commit 1698c37 with merge ecbb073...

@bors
Copy link
Contributor

bors commented Mar 16, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing ecbb073 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants