-
Notifications
You must be signed in to change notification settings - Fork 209
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 support for RISC-V 32-bit & 64-bit (riscv32, riscv64) #73
base: master
Are you sure you want to change the base?
Conversation
lib/riscv32_table.h
Outdated
_S(241, "perf_event_open") | ||
_S(242, "accept4") | ||
_S(243, "recvmmsg") | ||
_S(259, "sys_riscv_flush_icache") |
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.
That's a bug, need to remove sys_
prefix.
lib/riscv32_table.h
Outdated
_S(291, "statx") | ||
_S(292, "io_pgetevents") | ||
_S(293, "rseq") | ||
_S(294, "syscalls") |
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.
This also shouldn't be here.
Hello, I just wanted to leave a note and not leave this hanging. I have not pulled this in because I am not sure about maintaining another table. I pulled in alpha a long time ago and they disappeared never to be seen again. I think I am going to deprecate that table as well as IA64 to reduce the maintenance burden. Aside from that, I don't think there is anything technically wrong with the patch. |
This has been included in Fedora/RISCV for some months now and it works without a flaw (as far as I used it). So far everything worked as expected. There is one thing I would remove -- riscv32 support. So RISC-V 32-bit support is being dragged a bit in glibc and thus syscall table is changing compared to riscv64. There are a few changes already and more coming (related to year 2038 problem). The plan was/is to get RISC-V 32-bit ABI finalized in the next glibc release, but I am not sure if that will happen. |
Is there a way we could move forward and add RISC-V support? I would love to have RISC-V support in a release sooner than later as that's easier to distributions to pick up. There are a number of Linux distributions already supporting riscv64 (Fedora, Debian, OpenSUSE, OpenEmbedded, Gentoo, etc). |
Ping. I would like to know how to move forward here. |
Signed-off-by: Thomas Petazzoni <[email protected]> [strip library after adding it to openwrt repository] Signed-off-by: W. Michael Petullo <[email protected]>
I am reluctant to add more architectures to audit user space. The main reason is it takes a lot of time updating the syscall tables and no one really helps. I got stuck taking care of the Alpha processor and IA64 after a promise of help and then they disappeared. If there were more contributors to the audit subsystem, it might be another story. |
Might be worth borrowing some of the infrastructure from systemd which has some scripts to do this. |
Hi, @stevegrubb. This is 2024! Thanks for your work. We have a couple people working on RISCV stuff, like building the RISCV ecosystem. I'm curious why this PR hasn't been merged. Do we need to move this work forward? |
I plan to update the patch based on v6.8 or/and v6.9 in near time. I have not been pushing newer versions of this PR. This is probably the largest non-upstream patch we have in Fedora/RISCV for longest now. |
I checked the historical PRs and ultimately understood why new architectures were not introduced in this repo. I think we should move the arch support patches to the places needed. Thanks again for @stevegrubb and @davidlt . |
See more information on the previous attempt to upstream: linux-audit@549b0fd The major difference is updated syscalls headers for riscv32 and riscv64 using system-syscalls Python package. The kernel version used was 6.10.0-rc6. Signed-off-by: David Abdurachmanov <[email protected]>
@davidlt now that we have GA 6.11 in Fedora, would it make sense to rebase and pick up the changes? I also wonder if dropping riscv32 and limiting support to riscv64, the only architecture which distros shipping audit will realistically ever target, might make the changeset slightly more palatable to the maintainers. |
The testing was done only on riscv64 using Fedora 29 w/ kernel 4.19.0-rc8.
To my knowledge there are no Linux distributions planning to support riscv32.
Note, there is no COMPAT support, i.e., riscv32 applications cannot run
on riscv64 host.
The following was checked:
arguments seem to be correct)
I looked at audit-testsuite and modified it for riscv64.
See: https://github.com/davidlt/audit-testsuite/tree/riscv64
The current results would be:
Failed 4/14 test programs. 19/88 subtests failed.
Failures:
support;
but 'semanage login -l' output is identical between x86_64 and riscv64;
Fedora kernel currently has minimal CONFIG_* options enabled and is built
without loadable module support.
I hope to send the kernel patches later today.
Signed-off-by: David Abdurachmanov [email protected]