From: Russell King Date: Fri, 7 Sep 2012 17:22:28 +0000 (+0100) Subject: ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS X-Git-Tag: v3.2.54~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5c70f452589114e6a551803bf312eed1b57f964;p=pandora-kernel.git ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS commit 8404663f81d212918ff85f493649a7991209fa04 upstream. The {get,put}_user macros don't perform range checking on the provided __user address when !CPU_HAS_DOMAINS. This patch reworks the out-of-line assembly accessors to check the user address against a specified limit, returning -EFAULT if is is out of range. [will: changed get_user register allocation to match put_user] [rmk: fixed building on older ARM architectures] Reported-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Russell King [bwh: Backported to 3.2: TUSER() was called T()] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed