diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-09-07 07:22:06 -0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-12-06 18:14:00 +0100 |
commit | bd690a3f314893040876db9ffa623058ce2e9164 (patch) | |
tree | 3159002269180576ab22b0e1e044767f3050a907 /kernel/rwsem.c | |
parent | 68ee93f3d058ff58f994d08be00d3aad9ec20970 (diff) | |
download | kernel_samsung_smdk4412-bd690a3f314893040876db9ffa623058ce2e9164.zip kernel_samsung_smdk4412-bd690a3f314893040876db9ffa623058ce2e9164.tar.gz kernel_samsung_smdk4412-bd690a3f314893040876db9ffa623058ce2e9164.tar.bz2 |
ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS
commit 8404663 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 <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[bwh: Backported to 3.2: TUSER() was called T()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[steven@steven676.net: make apply to 3.0]
Tested-by: Moritz Bandemer <replicant@posteo.mx>
Diffstat (limited to 'kernel/rwsem.c')
0 files changed, 0 insertions, 0 deletions