Re: [PATCH] Fix msr check in compat_sys_swapcontext

2008-11-06 Thread Andreas Schwab
Paul Mackerras <[EMAIL PROTECTED]> writes: > Andreas Schwab writes: > >> Paul Mackerras <[EMAIL PROTECTED]> writes: >> >> > we need to use get_user, not __get_user, since we haven't done an >> > access_ok() check on the address. >> >> The address is always ok since its a compat pointer, see do_s

Re: [PATCH] Fix msr check in compat_sys_swapcontext

2008-11-06 Thread Paul Mackerras
Andreas Schwab writes: > Paul Mackerras <[EMAIL PROTECTED]> writes: > > > we need to use get_user, not __get_user, since we haven't done an > > access_ok() check on the address. > > The address is always ok since its a compat pointer, see do_setcontext. OK, since it's inside a CONFIG_PPC64 bloc

Re: [PATCH] Fix msr check in compat_sys_swapcontext

2008-11-06 Thread Andreas Schwab
Paul Mackerras <[EMAIL PROTECTED]> writes: > we need to use get_user, not __get_user, since we haven't done an > access_ok() check on the address. The address is always ok since its a compat pointer, see do_setcontext. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Product

Re: [PATCH] Fix msr check in compat_sys_swapcontext

2008-11-05 Thread Paul Mackerras
Andreas Schwab writes: > The new context may not be 16-byte aligned, so the real address of the > mcontext structure should be read from the uc_regs pointer instead of > directly using the (unaligned) uc_mcontext field. Good catch, but... > @@ -941,9 +941,17 @@ long sys_swapcontext(struct uconte

[PATCH] Fix msr check in compat_sys_swapcontext

2008-11-05 Thread Andreas Schwab
The new context may not be 16-byte aligned, so the real address of the mcontext structure should be read from the uc_regs pointer instead of directly using the (unaligned) uc_mcontext field. Signed-off-by: Andreas Schwab <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/kernel/signal_32.c b/arch/