[PATCH] MSR_RI not cleared early enough in entry.S

Craig Chaney cchaney at us.ibm.com
Tue Sep 28 01:18:25 EST 2004


Hi,

This patch fixes a small hole in entry.S.  In the section of code under the
label syscall_exit_trace_cont, the kernel is reverting to its previous
context.  The kernel stack pointer is updated, MSR_RI is cleared, and then the
rest of the context is restored leading up to the rfid instruction.

An exception between the update of the kernel stack pointer and the clearing
of MSR_RI can cause a problem.  If r1 has been updated to point to userspace,
this will trigger an error condition at the top of EXCEPTION_PROLOG_COMMON,
and we get the "Bad kernel stack pointer" error.

If I understand the use of MSR_RI correctly, we should delay the update of the
kernel stack pointer until after the clearing of MSR_RI.

I'm new to this, so please let me know if I've made any mistakes (not only in
the patch itself of course, but also in the conventions of submitting a patch).
Is submitting the patch here sufficient for it to make it upstream?

Thanks,
Craig

Signed-off-by: Craig Chaney <cchaney at us.ibm.com>




More information about the Linuxppc64-dev mailing list