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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> > +
> > +       if (show_unhandled_signals && unhandled_signal(tsk,
> SIGSEGV)) {
> > +               printk_ratelimited("%s[%d] umip emulation segfault
> ip:%lx sp:%lx error:%lx in %lx\n",
> > +                                  tsk->comm, task_pid_nr(tsk),
> regs->ip,
> > +                                  regs->sp, UMIP_PF_USER |
> UMIP_PF_WRITE,
> > +                                  regs->ip);
> > +       }
> > +
> > +       tsk->thread.cr2         = (unsigned long)address;
> > +       tsk->thread.error_code  = UMIP_PF_USER | UMIP_PF_WRITE;
> 
> Please just move enum x86_pf_error_code into a header and rename the
> fields X86_PF_USER, etc rather than duplicating it.

Thanks again for your feedback! I will do this.

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux