lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v7 07/14] x86/cet/ibt: Add arch_prctl functions for IBT
    On Thu, Jun 06, 2019 at 01:09:19PM -0700, Yu-cheng Yu wrote:

    > +static int handle_bitmap(unsigned long arg2)
    > +{
    > + unsigned long addr, size;
    > +
    > + if (get_user(addr, (unsigned long __user *)arg2) ||
    > + get_user(size, (unsigned long __user *)arg2 + 1))
    > + return -EFAULT;
    > +
    > + return cet_setup_ibt_bitmap(addr, size);
    > +}


    > + /*
    > + * Allocate legacy bitmap and return address & size to user.
    > + */
    > + case ARCH_X86_CET_SET_LEGACY_BITMAP:
    > + return handle_bitmap(arg2);

    AFAICT it does exactly the opposite of that comment; it gets the address
    and size from userspace and doesn't allocate anything at all.

    \
     
     \ /
      Last update: 2019-06-07 10:08    [W:4.149 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site