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

How to communicate between rings? #1390

Open
bingmatv opened this issue Feb 7, 2025 · 4 comments
Open

How to communicate between rings? #1390

bingmatv opened this issue Feb 7, 2025 · 4 comments

Comments

@bingmatv
Copy link

bingmatv commented Feb 7, 2025

User-space programs should run in CPU ring3, but kernel runs in ring0, how to communicate between rings?

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 7, 2025

The kernel can go to userspace using iret/sysret and userspace can call into the kernel using the syscall instruction or by causing an exception.

@ViktorPopp
Copy link

The kernel can go to userspace using iret/sysret and userspace can call into the kernel using the syscall instruction or by causing an exception.

What is needed to do before userspace and what are the best resources @bjorn3 ?

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 7, 2025

Maybe https://wiki.osdev.org/Getting_to_Ring_3 would help you?

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

4 participants