|
From: Julian S. <js...@ac...> - 2005-11-12 01:37:24
|
> > So does anybody have a clue what the significance of 0x30001 vs 0x1 is? > > Paul? > > It's a kernel internal detail that shouldn't be leaking to user > space - if you look at include/asm-generic/siginfo.h in the kernel > source you will see that SEGV_MAPERR is 0x30001 if __KERNEL__ is > defined and 1 if it isn't. > > When copy_siginfo_to_user in kernel/signal.c copies the siginfo > structure out to user space it deliberately casts the si_code > value to a short to discard the top half of it. > > It sounds like this MontaVista kernel is a bit broken... It's based on 2.4.20, not that that means it's not broken. So the implication is that we should mask si_code ourselves whenever we use it. Ah well. Ok. J |