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

c18n: Allow system calls only for code with CHERI_PERM_SYSCALL and secure mmap #2320

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

dpgao
Copy link
Contributor

@dpgao dpgao commented Feb 6, 2025

This PR removes the CHERI_PERM_SYSCALL permission from all libraries except libsys.

Previously, the kernel returns ECAPMODE for callers without CHERI_PERM_SYSCALL and optionally enters KDB when that happens. This PR removes the legacy KDB behavior and instead raises a signal (by calling nosys). This is superior to the old behavior because it makes debugging easier.

(Sadly it seems that the best place to cause nosys to be called is in MD code. I wonder if there's a better place to do it without disrupting tracing.)

This PR also interposes mmap and removes CHERI_PERM_EXECUTIVE and CHERI_PERM_SYSCALL from any value returned.

@dpgao dpgao requested a review from bsdjhb February 6, 2025 15:42
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

Successfully merging this pull request may close these issues.

1 participant