Thread (70 messages) 70 messages, 7 authors, 2019-06-15

Re: [PATCH v7 07/14] x86/cet/ibt: Add arch_prctl functions for IBT

From: Peter Zijlstra <peterz@infradead.org>
Date: 2019-06-07 08:07:24
Also in: linux-arch, linux-doc, linux-mm, lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help