Hi all,

I was wondering if it is possible to memory map buffer that has _not_
dynamically been allocated (e.g. via kmalloc or vmalloc) into user space?

Example:

Within my device driver code I have the following table ...

typedef struct foobar_entry {
       char      foo[1024];
       char      bar[1024];
       uint32_t  x;
       uint32_t  y;
} foobar_entry_t;

foobar_entry_t foobar_table[] =
{
     { "foo1", "bar1", 232, 0 },
     { "foo2", "bar2", 233, 1 },
     { "foo3", "bar3", 234, 0 },
     { "foo4", "bar4", 235, 1 },
};
EXPORT_SYMBOL(foobar_table);

... and I'd like this to be memory mappped as read-only into user space.
I tried things with 'remap_pfn_range', but without success. Do you have
any idea/code example how to manage this?

Best regards,
Daniel

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to