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

Pledge(2) like utility for odb #6290

Open
QuantamHD opened this issue Dec 3, 2024 · 3 comments
Open

Pledge(2) like utility for odb #6290

QuantamHD opened this issue Dec 3, 2024 · 3 comments

Comments

@QuantamHD
Copy link
Collaborator

QuantamHD commented Dec 3, 2024

Description

Add a utility to OpenROAD that lets pass authors pledge away certain operations during their code execution. If a pass performs an operation that it pledged not to odb would throw an error. Which would help prevent bugs like #6289

Suggested Solution

These pledges are similar in nature to the FreeBSD pledge(2) syscall that lets process restrict the syscalls they can make as a security feature.

Ideally we would have some built-in mechanism to odb to pledge away write/delete operations on certain objects. Potentially, using RAII to undo them automatically.

Additional Context

https://man.openbsd.org/pledge.2

@maliberty
Copy link
Member

Wouldn't a temporary dont-touch be equivalent? With only the one example I'm not sure what operations/semantics need pledging.

@QuantamHD
Copy link
Collaborator Author

But you would have to set that on each net of those types. This would essentially be a global precheck.

@maliberty
Copy link
Member

Would you illustrate with some examples where this works be helpful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants