aboutsummaryrefslogtreecommitdiffstats
path: root/lib/generic-radix-tree.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2020-01-23 08:34:18 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2020-01-24 09:27:34 -0800
commitab10ae1c3bef56c29bac61e1201c752221b87b41 (patch)
tree20ae31e0a7fcbbbe516fbba8aeacf43c0ea37205 /lib/generic-radix-tree.c
parentMerge tag 'mmc-v5.5-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc (diff)
downloadlinux-dev-ab10ae1c3bef56c29bac61e1201c752221b87b41.tar.xz
linux-dev-ab10ae1c3bef56c29bac61e1201c752221b87b41.zip
lib: Reduce user_access_begin() boundaries in strncpy_from_user() and strnlen_user()
The range passed to user_access_begin() by strncpy_from_user() and strnlen_user() starts at 'src' and goes up to the limit of userspace although reads will be limited by the 'count' param. On 32 bits powerpc (book3s/32) access has to be granted for each 256Mbytes segment and the cost increases with the number of segments to unlock. Limit the range with 'count' param. Fixes: 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'") Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/generic-radix-tree.c')
0 files changed, 0 insertions, 0 deletions