|
From: Tom H. <to...@co...> - 2005-11-12 09:00:57
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> > 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.
It might be better to fix the siginfo structure at the start of
the signal handler(s) on ppc32 so that we only have to do it in
one or two places.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|