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

[Feature request] Open device read-only #206

Open
anon00000000 opened this issue Apr 20, 2022 · 5 comments
Open

[Feature request] Open device read-only #206

anon00000000 opened this issue Apr 20, 2022 · 5 comments
Labels

Comments

@anon00000000
Copy link

Would be nice to have that option. Something using mprotect for SHM devices, for example.

@arnopo
Copy link
Contributor

arnopo commented May 6, 2022

Are you talking about metal_device_open?
Could you please explain your use case so that we understand the need?

@anon00000000
Copy link
Author

Hello and yes. Use case is just making sure it is never written to even in case of program malfunction; a bit like using the correct mode in open(3) even when RDWR would work for every case.
We already cast all of our metal_io_virt pointers to const pointers, but that's tacit security, OS enforced protection like mprotect is a bit stronger.

@arnopo
Copy link
Contributor

arnopo commented May 6, 2022

I suppose that your need is for Linux user space, right?
I think that the best solution to move forward is that you send a PR (even if it is an RFC), that implements what you would expect.
This would be a better base for discussions.

@anon00000000
Copy link
Author

I guess so

@github-actions
Copy link

This issue has been marked as a stale issue because it has been open (more than) 45 days with no activity.

@github-actions github-actions bot added the Stale label Oct 14, 2023
@arnopo arnopo reopened this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants