linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* kernel virtual memory access (from app) does not generate segfault
@ 2010-04-20  9:14 Sasha Sirotkin
  2010-04-20  9:34 ` Ben Dooks
  0 siblings, 1 reply; 30+ messages in thread
From: Sasha Sirotkin @ 2010-04-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

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)

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2010-06-08 14:19 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  9:14 kernel virtual memory access (from app) does not generate segfault Sasha Sirotkin
2010-04-20  9:34 ` Ben Dooks
2010-04-20 10:27   ` Dave P. Martin
2010-04-20 14:20     ` anfei
2010-04-20 17:09       ` Ben Dooks
2010-04-20 19:28         ` Russell King - ARM Linux
2010-04-20 22:31           ` Jamie Lokier
2010-04-20 22:41             ` Russell King - ARM Linux
2010-04-21  0:33               ` Jamie Lokier
2010-04-21 11:17               ` kernel virtual memory access (from app) does not generatesegfault Dave P. Martin
2010-04-21 12:43                 ` anfei
2010-04-21 16:07                   ` Dave P. Martin
2010-04-21 19:16                     ` Jamie Lokier
2010-04-21 19:40                       ` Russell King - ARM Linux
2010-04-21 21:00                         ` Jamie Lokier
2010-04-21 19:36                   ` Russell King - ARM Linux
2010-04-21 19:35                 ` Russell King - ARM Linux
2010-04-21 21:24                   ` Nicolas Pitre
2010-04-21 21:44                     ` Russell King - ARM Linux
2010-04-21 21:54                       ` Russell King - ARM Linux
2010-04-21 22:59                         ` Nicolas Pitre
2010-04-22 10:56                           ` Dave P. Martin
2010-04-22 12:29                             ` anfei
2010-04-22 13:18                               ` Dave P. Martin
2010-04-22 15:59                                 ` Jamie Lokier
2010-04-21 13:11           ` kernel virtual memory access (from app) does not generate segfault anfei
2010-04-21 19:45             ` Jamie Lokier
2010-06-08 13:29             ` anfei
2010-06-08 13:36               ` Russell King - ARM Linux
2010-06-08 14:19                 ` anfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).