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

Fix the loongarch64 kernel ABI #3007

Merged
merged 1 commit into from Nov 27, 2022
Merged

Fix the loongarch64 kernel ABI #3007

merged 1 commit into from Nov 27, 2022

Conversation

xen0n
Copy link
Contributor

@xen0n xen0n commented Nov 20, 2022

The initial loongarch64 support code went in too early, even before the upstream kernel ABI has finalized, and was not adjusted since then. No one with enough knowledge of LoongArch was involved in the initial review, so we have been shipping broken LoongArch support, but luckily the rustc port is not merged yet so no real damage has been done.

Fix the following discrepancies:

  • There is no longer {g,s}etrlimit, only prlimit64.
  • There is no longer fstat and newfstatat, only statx.
  • MINSIGSTKSZ and SIGSTKSZ now have different values.
  • The binary sysctl syscall was removed from Linux long before the existence of upstream Linux/LoongArch port (5.5 vs 5.19) so even a wrapper does not make sense.

There might be more but these are the most obvious.

cc @xry111 @zhaixiaojuan

The initial loongarch64 support code went in too early, even before the
upstream kernel ABI has finalized, and was not adjusted since then. No
one with enough knowledge of LoongArch was involved in the initial
review, so we have been shipping broken LoongArch support, but luckily
the rustc port is not merged yet so no real damage has been done.

Fix the following discrepancies:

- There is no longer {g,s}etrlimit, only prlimit64.
- There is no longer fstat and newfstatat, only statx.
- MINSIGSTKSZ and SIGSTKSZ now have different values.
- The binary sysctl syscall was removed from Linux long before the
  existence of upstream Linux/LoongArch port (5.5 vs 5.19) so even a
  wrapper does not make sense.

There might be more but these are the most obvious.
@rust-highfive
Copy link

r? @JohnTitor

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

@xry111
Copy link

xry111 commented Nov 20, 2022

LGTM (but I'm not a reviewer of this repo).

@JohnTitor
Copy link
Member

Thank you for the detailed explanation!

but luckily the rustc port is not merged yet so no real damage has been done.

I'm going to r+ in favor of the above, @bors r+

@bors
Copy link
Contributor

bors commented Nov 27, 2022

📌 Commit 0abe537 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 27, 2022

⌛ Testing commit 0abe537 with merge 4d8960d...

@bors
Copy link
Contributor

bors commented Nov 27, 2022

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

@bors bors merged commit 4d8960d into rust-lang:master Nov 27, 2022
@xen0n xen0n deleted the fix-loong branch November 27, 2022 11:25
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.

None yet

5 participants