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

Automated pull from rust-lang/libc #71

Merged
merged 31 commits into from Oct 31, 2023

Conversation

ecnelises and others added 30 commits August 24, 2023 17:23
In AIX, when large file API enabled, fstatat will be redirected to
stat64at function.

Also, fix clockid_t to its original definition, as time-rs builds well
with this change.
The landlock syscalls were added to the musl libc in upstream commit ee05b11b67d5[1]:
```
bits/syscall.h: add landlock syscalls from linux v5.13
see

  linux commit a49f4f81cb48925e8d7cbd9e59068f516e984144
  arch: Wire up Landlock syscalls

  linuxcommit 17ae69aba89dbfa2139b7f8024b757ab3cc42f59
  Merge tag 'landlock_v34' of ... jmorris/linux-security

Landlock provides for unprivileged application sandboxing. The goal of
Landlock is to enable to restrict ambient rights (e.g. global filesystem
access) for a set of processes. Landlock is inspired by seccomp-bpf but
instead of filtering syscalls and their raw arguments, a Landlock rule
can restrict the use of kernel objects like file hierarchies, according
to the kernel semantic.
```

Add them to our definitions accordingly

[1] https://git.musl-libc.org/cgit/musl/commit/arch/riscv64/bits?id=ee05b11b67d59a6c5bb4b9d661bcc20bbd0bbe7a
F_SETLK and F_SETLKW were not defined therefore define them
and F_GETLK value was not matching the musl port hence fixed
These defines are not architecture specific in musl [1] therefore move them
to be common

[1] https://git.musl-libc.org/cgit/musl/tree/include/fcntl.h#n48
This define is not architecture specific in musl [1]

[1] https://git.musl-libc.org/cgit/musl/tree/include/sys/socket.h#n90
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This mirrors more of the constants that, for example, are available in
linux/mod.rs.
Use new check-cfg syntax in newer nightly

[MCP636 - Simplify and improve explicitness of the check-cfg syntax](rust-lang/compiler-team#636) introduced a new syntax for check-cfg.

This PR adjust the `build.rs` code to use the new syntax on `rustc >= 75`.
The old syntax is still used on older version since on rust-lang/rust we need to be compatible with both for now.
musl fixes and musl+riscv32 fixes

https://github.com/kraj/libc/tree/kraj/musl-fixes rebased onto main with the duplicate symbols fixed up (though the logs from the previous run have expired so I might have missed something).

Closes #3191
Add various constants from OpenBSD's sys/exec_elf.h.

This mirrors more of the constants that, for example, are available in linux/mod.rs.

These values are taken from https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h, though, unsurprisingly, they match those on Linux's `elf.h` (occasionally with different formatting, which I have preserved in this PR).
…Titor

riscv64/musl: Add landlock syscalls

The landlock syscalls were added to the musl libc in upstream commit ee05b11b67d5[1]:
```
bits/syscall.h: add landlock syscalls from linux v5.13
see

  linux commit a49f4f81cb48925e8d7cbd9e59068f516e984144
  arch: Wire up Landlock syscalls

  linuxcommit 17ae69aba89dbfa2139b7f8024b757ab3cc42f59
  Merge tag 'landlock_v34' of ... jmorris/linux-security

Landlock provides for unprivileged application sandboxing. The goal of
Landlock is to enable to restrict ambient rights (e.g. global filesystem
access) for a set of processes. Landlock is inspired by seccomp-bpf but
instead of filtering syscalls and their raw arguments, a Landlock rule
can restrict the use of kernel objects like file hierarchies, according
to the kernel semantic.
```

Add them to our definitions accordingly

[1] https://git.musl-libc.org/cgit/musl/commit/arch/riscv64/bits?id=ee05b11b67d59a6c5bb4b9d661bcc20bbd0bbe7a
Add stat64at function declaration to AIX

In AIX, when large file API enabled, fstatat will be redirected to stat64at.

Also, fix clockid_t to correct definition, as time-rs builds well with this change.
adding getmntinfo/getmntvinfo for DragonFlyBSD.

close #3392
adding MOVE_MOUNT* constants for linux to use with SYS_move_mount

syscall.

close #3387
freebsd adding PROT_MAX|PROT_MAX_EXTRACT mmap flags
linux/android adding few if_alg.h constants.

close #3329
Setup Dependabot for GitHub Actions
For NetBSD: add entry for NetBSD/riscv64.
adding more recent pthread_get/setname_np calls to freebsd/dragonflybsd
@github-actions github-actions bot added automation Issue or PR created by an automation backport:never PR that should never be backported labels Oct 30, 2023
Copy link
Member

@tshepang tshepang left a comment

Choose a reason for hiding this comment

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

bors merge

@bors-ferrocene
Copy link
Contributor

Build succeeded:

  • full

@bors-ferrocene bors-ferrocene bot merged commit 5cf304d into main Oct 31, 2023
3 checks passed
@bors-ferrocene bors-ferrocene bot deleted the automation/pull-subtrees/jx0eawp3 branch October 31, 2023 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Issue or PR created by an automation backport:never PR that should never be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants