[parisc-linux] warning: minor abi change
Grant Grundler
grundler@parisc-linux.org
Sat, 5 Jul 2003 22:12:10 -0600
On Sat, Jul 05, 2003 at 07:53:34PM -0400, John David Anglin wrote:
> Instead of adding (void *) to each comparison,
This is just a temporary workaround and I have no plans of committing
any (void *) casts to fix this problem.
> you could add a kernel
> version of __canonicalize_funcptr_for_compare:
>
> __canonicalize_funcptr_for_compare:
> bv %r0(%r2)
> copy %r26,%r28
>
> or for PA 2.0
>
> __canonicalize_funcptr_for_compare:
> bve (%r2)
> copy %r26,%r28
>
> I think there was a possible solution along these lines posted on the list
> a few months ago (joel?).
Ok. I didn't see it when trolling the mail archive.
No matter, I'll try it.
Anyone have an opinion on which arch/parisc file this should go in?
> This solution assumes that canonicalization is unnecessary in the kernel.
> Probably, in most cases it is. However, if you really need to canonicalize
> a function pointer from user space, then you are going to have to figure
> out how to call into the dynamic loader from the kernel. This obviously
> isn't very safe. So, possibly this implies that function pointers passed
> in syscalls should be canonicalized before the kernel is entered (i.e.,
> glibc should do the canonicalization).
>
> As far as kernel modules go, I don't know how function pointers are
> handled. If you pass a function pointer from one module to another,
> does it need canonicalization?
I depend on willy/tausq/amodra/et al to understand stuff like this.
> If canonicalization is never necessary
> in the kernel, possibly I could add a GCC option to disable canonicalization.
I think willy suggested privately that might be case.
> Sorry, about the lack of documentation. To see what the function does,
> it's currently necessary to look in the GCC gcc/config/pa directory.
oh no problem. Kernel has lots of stale/missing documentation too.
Just need guidance on where to find the relevant code and which
path to take.
thanks,
grant