Re: [v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-06 Thread Ricardo Neri
On Sun, 2017-03-05 at 08:18 -0800, Andy Lutomirski wrote: > > + */ > > +static void __force_sig_info_umip_fault(void __user *address, > > + struct pt_regs *regs) > > +{ > > + siginfo_t info; > > + struct task_struct *tsk = current; > > + > > +

Re: [v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-06 Thread Ricardo Neri
On Sun, 2017-03-05 at 08:18 -0800, Andy Lutomirski wrote: > > + */ > > +static void __force_sig_info_umip_fault(void __user *address, > > + struct pt_regs *regs) > > +{ > > + siginfo_t info; > > + struct task_struct *tsk = current; > > + > > +

Re: [v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-05 Thread Andy Lutomirski
On Fri, Mar 3, 2017 at 1:41 PM, Ricardo Neri wrote: > fixup_umip_exception will be called from do_general_protection. If the > former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. > However, when emulation is successful but the emulated

Re: [v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-05 Thread Andy Lutomirski
On Fri, Mar 3, 2017 at 1:41 PM, Ricardo Neri wrote: > fixup_umip_exception will be called from do_general_protection. If the > former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. > However, when emulation is successful but the emulated result cannot be > copied to user space

[v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-03 Thread Ricardo Neri
fixup_umip_exception will be called from do_general_protection. If the former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. However, when emulation is successful but the emulated result cannot be copied to user space memory, it is more accurate to issue a SIGSEGV with

[v5 17/20] x86/umip: Force a page fault when unable to copy emulated result to user

2017-03-03 Thread Ricardo Neri
fixup_umip_exception will be called from do_general_protection. If the former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. However, when emulation is successful but the emulated result cannot be copied to user space memory, it is more accurate to issue a SIGSEGV with