Re: [PATCH] powerpc/64/tm: Don't let userspace set regs->trap via sigreturn

2020-04-01 Thread Michael Ellerman
On Wed, 2020-04-01 at 02:38:36 UTC, Michael Ellerman wrote: > In restore_tm_sigcontexts() we take the trap value directly from the > user sigcontext with no checking: > > err |= __get_user(regs->trap, >gp_regs[PT_TRAP]); > > This means we can be in the kernel with an arbitrary regs->trap

[PATCH] powerpc/64/tm: Don't let userspace set regs->trap via sigreturn

2020-03-31 Thread Michael Ellerman
In restore_tm_sigcontexts() we take the trap value directly from the user sigcontext with no checking: err |= __get_user(regs->trap, >gp_regs[PT_TRAP]); This means we can be in the kernel with an arbitrary regs->trap value. Although that's not immediately problematic, there is a risk we