lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Mapping non-page aligned data to user
Vira wrote:
> Hi,
>
> Is there a way to map a non-page aligned kernel physical address to user virtual address? remap_pfn_range and vm_insert_page operate only on page-aligned physical addresses.
>
> If there is no such support, would it be too complicated to try out
> writing something on my own to map non-page aligned addresses (the data
> size is under my control - so I can make that a multiple of page size)?
>
> Any suggestions appreciated.

The CPU, and therefore the kernel, couldn't ensure that the user doesn't
write outside the mapped region of kernel memory if it's not page
aligned (the access control is page granularity only). That seems like
it would be a show-stopper in most cases.

What exactly is it you're trying to achieve with this?


\
 
 \ /
  Last update: 2009-02-06 01:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site