Re: remap kernel static memory to user space
From: Eduardo Cruz
Date: Sat Mar 23 2013 - 16:25:39 EST
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
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@xxxxxxxxxx>:
> Eduardo Cruz wrote:
>> Please, anyone knows how to solve this problem?
>> 2013/3/20 Eduardo Cruz <eduardohmdacruz@xxxxxxxxx>:
>>> I'm trying to remap some kernel static memory to user space using
> Well, don't do that.
> What is the actual problem you're trying to solve?
Eduardo Henrique Molina da Cruz
Parallel and Distributed Processing Group
Federal University of Rio Grande do Sul (UFRGS)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/