Messages in this thread | | | Date | Sat, 23 Mar 2013 17:25:35 -0300 | Subject | Re: remap kernel static memory to user space | From | Eduardo Cruz <> |
| |
I'm adding some asm code in arch/ia64/kernel/ivt.S to gather some memory usage statistics.
From whatever reason, when I allocate the memory using kmalloc/vmalloc, my assembly code cashes the machine when I load the allocated memory.
If I use static allocated memory, the asm code works.
I know the problem is not the assembly code.
The problem is that I want to be able to read this data from user space. Since the code performance critical, I don't want to do a copy_to_user, I prefer to mmap this data into user space.
The problem is, if I use kmalloc/vmalloc, I managed to map the memory to user space. However, the asm interrupt handler crashs.
On the other hand, if I use static data, the asm interrupt handler works, while the mmap fails.
Do you have any clues?
2013/3/22 Clemens Ladisch <clemens@ladisch.de>: > Eduardo Cruz wrote: >> Please, anyone knows how to solve this problem? >> >> 2013/3/20 Eduardo Cruz <eduardohmdacruz@gmail.com>: >>> I'm trying to remap some kernel static memory to user space using >>> remap_pfn_range. > > Well, don't do that. > > What is the actual problem you're trying to solve? > > > Regards, > Clemens
-- Eduardo Henrique Molina da Cruz PhD student Parallel and Distributed Processing Group Federal University of Rio Grande do Sul (UFRGS)
| |