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

Replacing intercepts - internal compartment utilities #23

Open
0152la opened this issue Feb 23, 2024 · 0 comments
Open

Replacing intercepts - internal compartment utilities #23

0152la opened this issue Feb 23, 2024 · 0 comments

Comments

@0152la
Copy link
Contributor

0152la commented Feb 23, 2024

After mulling over the system calls examples I worked in earlier today, I had a potential idea of how to integrate this idea better with the compartment implementation, while also getting rid of intercepts completely (including malloc intercepts).

We can introduce a new indirection layer, either as a library dependency, or perhaps as a header file with #defines, with implementations of DDC-bounded-safe functions. For instance, we would redirect printf calls to an internal printf implementation which has the same observable effect, but uses a write system call. We could also then move the malloc functions inside, which could use the DDC capability to know where to allocate space for the compartment they are in.

I'm unsure if this approach would be able to handle all libc functions, but I think I prefer it to having implicit transitions via the injections, and we would also simplify a lot of the code (particularly the ugly instruction building in comp_add_intercept.

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

1 participant