title: How to mmap a Linux kernel buffer to user space?
body: <p>Let's say the buffer is allocated using a page based scheme. One way to implement mmap would be to use remap_pfn_range but LDD3 says this does not work for conventional memory. It appears we can work around this by marking the page(s) reserved using SetPageReserved so that it gets locked in memory. But isn't all kernel memory already non-swappable i.e. already reserved? Why the need to set the reserved bit explicitly?</p>
  
  <p>Does this have something to do with pages allocated from HIGH_MEM?</p>