Thread (13 messages) 13 messages, 4 authors, 2017-04-07

[PATCH v6 2/4] x86/syscalls: Specific usage of verify_pre_usermode_state

flat view

From: H. Peter Anvin <hpa@zytor.com>
Date: 2017-04-04 18:35:16
Also in: linux-api, linux-s390, lkml

On 04/04/17 10:47, Thomas Garnier wrote:
Implement specific usage of verify_pre_usermode_state for user-mode
returns for x86.

Signed-off-by: Thomas Garnier <redacted>
 
+	/*
+	 * If address limit is not based on user-mode, jump to slow path for
+	 * additional security checks.
+	 */
+	movq	$TASK_SIZE_MAX, %rcx
+	cmp	%rcx, TASK_addr_limit(%r11)
+	jnz	1f
+
 	LOCKDEP_SYS_EXIT
Nitpick: use jne not jnz when comparing for equality.  Same instruction
but more readable.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help