[parisc-linux] 64 bit kernel crash with wrong r27 value
Richard Hirst
rhirst@linuxcare.com
Fri, 22 Dec 2000 11:39:50 +0000
Hi,
I just had a crash loading a kernel module; it was in schedule(),
but r27 (dp) was still pointing to the modules local data.
r2 referenced the syscall exit path.
My theory is that the syscall involved calling the module, which
would set dp to reference the modules local data, and the return path
had no cause to reload dp as that is always the callers responsibility.
So, I have added a loadgp to entry.S at syscall_exit:, which solved the
problem.
However, (a) I'm not sure this is the right place to loadgp - maybe
it should be in syscall.S, and (b) there may well be other places
where we need to do loadgp - eg. returning from interrupt. Comments?
Didn't see this on 32 bit kernel, because kernel and modules all run on
the same dp value. For 64 bit, the kernel and each module has its own
dp value.
Richard