From 7c73113f8e087e76eb4f0984caa13f7f0a9af138 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 12 Feb 2013 15:37:02 -0800 Subject: [PATCH] --- yaml --- r: 356179 b: refs/heads/master c: ff52c3b02b3f73178bfe0c219cd22abdcb0e46c3 h: refs/heads/master i: 356177: 1381e26ce77810b21b71d451e6d639eb7d2392b6 356175: 3c58d2556e4b862e42ed4272f87606e6b8e13f6e v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/uaccess.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d2fb1263a9db..0dc1164bad43 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3578baaed4613a9fc09bab9f79f6ce2ac682e8a3 +refs/heads/master: ff52c3b02b3f73178bfe0c219cd22abdcb0e46c3 diff --git a/trunk/arch/x86/include/asm/uaccess.h b/trunk/arch/x86/include/asm/uaccess.h index d710a2555fd6..5ee26875baea 100644 --- a/trunk/arch/x86/include/asm/uaccess.h +++ b/trunk/arch/x86/include/asm/uaccess.h @@ -148,9 +148,16 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) * * Returns zero on success, or -EFAULT on error. * On error, the variable @x is set to zero. - * + */ +/* * Careful: we have to cast the result to the type of the pointer * for sign reasons. + * + * The use of %edx as the register specifier is a bit of a + * simplification, as gcc only cares about it as the starting point + * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits + * (%ecx being the next register in gcc's x86 register sequence), and + * %rdx on 64 bits. */ #define get_user(x, ptr) \ ({ \