DEV Community

Van a performance artist
Van a performance artist

Posted on

how to pass pointer from user to kernel in xv6

the addr in usermode and kernel mode it different. so while passing pointer to kernel mode, we should just pass a uint64 var to it.
then we can get it through function as a var.
Image description
it is more like a offset, later we can locate it.

Image description
argaddr works same like argint, it capture the arg of syscall from proc sturcture

Image description
then we can get the real address of the virtual address by its pagetable and offset easily

Image description

Image description
memmove part is pretty simple, kernel mode has the right to access all address
Image description

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more