-
Notifications
You must be signed in to change notification settings - Fork 9
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
{load, store}Capability permissions not used #1
Comments
Thank you for raising this issue! Unfortunately, the person who originally implemented the capability extensions is no longer working with us, so I will have to reverse engineer some things here. It would be great if we could document this a bit better (and fix potential issues), so all comments and suggestions are very welcome! After a short discussion with @otenkosol2, he thinks you might be right about the issue and should maybe even simplify it like: } elsewhen (operation === LsuOperationType.LOAD && stage.value(Data.LOAD_CAP) && !cap.perms.loadCapability {
... About testing the implementation: there are some capability-specific tests in the make -C tests/ CUSTOM_TESTS_DIR=../src/main/scala/riscv/plugins/cheri/tests/ I suspect that before this, you need to install a CHERI-LLVM toolchain and replace the path for |
Thanks for the information! Yes, Thomas is right, the All tests pass except for I will try to make a PR in the next few days with some documentation/comments I have written while trying to understand the code. |
I think sticking to the specification might make sense for these checks if you think it helps clarity (of course, it might come with a small hardware overhead if it doesn't get optimized away). Too bad about the failing tests, but thanks for your effort! Looking forward to the PR! |
fix wrong valid of write data if no write is active
Hi,
Thanks for open-sourcing this project. While reading the files and trying to understand the project structure, I noticed that the
{load, store}Capability
permissions are not used, therefore it seems possible to load/store a capability from/to memory without having the corresponding permission.I believe a fix would be to add the following checks in the
capCheck
function.I can open a PR if that's the correct fix. I'm not sure how to test and run programs using capabilities as it's not documented, do you have any guides ?
The text was updated successfully, but these errors were encountered: