Messages in this thread | | | Date | Fri, 7 Jun 2019 10:07:06 +0200 | From | Peter Zijlstra <> | Subject | Re: [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.
| |