kernel virtual memory access (from app) does not generate segfault
Sasha Sirotkin
buildroot at browserseal.com
Tue Apr 20 05:14:30 EDT 2010
More specifically, writing from usermode application to a kernel virtual
memory address on ARM does result in segmentation fault, however
calling a function in this memory region for some reason does not.
For instance, this code generates a segfault allright
int * aa;
aa = 0xc0000000;
*aa=42;
However this code does not, instead the process simply hangs (and can be
killed)
void (*func)(void);
func = 0xc0000000;
func();
I stumbled across this by accident. Just curious to understand why it
happens. Isn't it a bug ?
P.S. My kernel is 2.6.32.7 and the CPU is ARM926EJ-S rev 5 (v5l)
More information about the linux-arm-kernel
mailing list