-
Notifications
You must be signed in to change notification settings - Fork 378
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
riscv: add riscv arch support #375
base: master
Are you sure you want to change the base?
Conversation
*add riscv arch support Signed-off-by: luojun <[email protected]>
README SummaryThis is a brief readme introduction on how to properly run and operate Bug summaryA ptrace bug in riscv linux , when tracer want to change tracee's a0 register in option PTRACE_SYSCALL to stop the tracee Bug descrption
Bug analysis
Bug Reproductioncompile code.c and test.c in riscv linuxgcc code.c -o a.out
gcc test.c -o test put a.out test in the same directoryexecute a.out./a.out what do "a.out" and "test" do ?
hot to fix bug
simple way to support ptrace and run proot
testcase for riscv prootI employed a temporary solution by recompiling the openEuler kernel locally, and this is the result of my proot test cases. Clipchamp.1.mp4Compared to running on This could be due to the use proot on openEuler riscv to chrootClipchamp.1.mp4 |
*fix bug on riscv for loader mprotect syscall Signed-off-by: luojun <[email protected]>
ahh just what I was looking for! would that fix work over for https://github.com/proot-me/proot-rs as well? |
I'm sorry that I'm not so familiar with Rust. Perhaps in the future, I will support rust proot, possibly when RISC-V mobile phones come out. |
Maybe you should trying add Ref: riscv nolibc header https://github.com/torvalds/linux/blob/master/tools/include/nolibc/arch-riscv.h |
add riscv arch support
Why does using -O0 result in fewer test case failures compared to using -O2 on openEuler RISCV? I am not certain of the reason, but it may be related to some issues with the compiler optimizations.
The porting effectiveness test can be found at the link https://github.com/Jer6y/rv_linux_bug, which also describes a bug related to ptrace on RISCV Linux that has not yet been fixed. However, it is possible to perform some rather rudimentary operations locally to temporarily correct the ptrace issue.
#368