All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] 64 bit kernel crash with wrong r27 value
@ 2000-12-22 11:39 Richard Hirst
  2001-01-02 13:34 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Hirst @ 2000-12-22 11:39 UTC (permalink / raw)
  To: parisc-linux

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [parisc-linux] 64 bit kernel crash with wrong r27 value
  2000-12-22 11:39 [parisc-linux] 64 bit kernel crash with wrong r27 value Richard Hirst
@ 2001-01-02 13:34 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2001-01-02 13:34 UTC (permalink / raw)
  To: Richard Hirst; +Cc: parisc-linux

On Fri, 22 Dec 2000, Richard Hirst wrote:

> had no cause to reload dp as that is always the callers responsibility.

Yes.  For hppa64, dp should be assumed trashed by any function call.
That means some further patches in entry.S are needed, which ought to be  
made #ifdef __LP64__

Alan
-- 
Linuxcare.  Support for the Revolution.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-02 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-22 11:39 [parisc-linux] 64 bit kernel crash with wrong r27 value Richard Hirst
2001-01-02 13:34 ` Alan Modra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.