title: How to access(if possible) kernel space from user space?
body: <p><strong>How exactly is user memory and kernels memory differentiated inside the Linux kernel</strong>(in terms of giving security to kernel space)? </p>
  
  <p><strong>What are the different ways I can write in kernel address space from user space?</strong></p>
  
  <p><strong>One way I know is through a system call</strong>. There are multiple system calls we can use, but at the end they are all system calls. Even in system calls, we send a data to kernel space, where it(driver or respective module) calls functions like copy_from_user() to copy data from user space to kernel space. Here we exactly are not writing into address space. we are just passing a user pointer which contains the data that needs to be copied into the kernel buffers.</p>
  
  <p>My question is there any way we can access a physical address that is present in the kernel space and perform operations on it?</p>
  
  <p>Second, <strong>Apart from system calls are there any other ways I can write into kernel space from an user application?</strong> </p>
  
  <p>I referred to this <a href="https://stackoverflow.com/questions/5957570/kernel-space-vs-user-space">link</a> from stackoverflow. But I think my question is not answered there and is from different perspective. Hence I thought of asking a different question.</p>
  
  <p>Please share your knowledge...
  Thanks.</p>