[parisc-linux] 2.6.0-test1-pa1 crashes on 715/100

John David Anglin dave@hiauly1.hia.nrc.ca
Sat, 19 Jul 2003 16:43:16 -0400 (EDT)


> >Check the list for a kernel patch to avoid this.  The 3.2 branch has
> >canonicalize_funcptr_for_compare.  Debian 3.0.4 doesn't.
> >
> But it was accidently compiled with gcc-3.3.1. Is this kernelpatch also 
> for gcc-3.3?

All hppa-linux versions from 3.2 on have canonicalize_funcptr_for_compare.
This fixes the comparison of function pointers in user space.  However,
the version of canonicalize_funcptr_for_compare in libgcc.a isn't suitable
for the kernel.

This arises because function pointers are implemented using pointers
to non-unique function descriptors.  -1 to 4095 are also special.
This is allowed in the C standard but the current kernel code doesn't
take this into account when comparing function pointers.  The only
other linux port to use function descriptors is ia64 and I believe
that its function pointers are unique, so no special code is needed
to resolve the pointers.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)