Christophe Leroy ab10ae1c3b 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>
2020-01-24 09:27:34 -08:00
..
2019-09-20 09:06:26 -07:00
2019-12-09 18:55:03 +01:00
2018-08-22 10:52:48 -07:00
2018-10-12 09:17:46 +02:00
2018-08-16 12:14:42 -07:00
2018-08-22 10:52:48 -07:00
2019-12-03 13:58:22 -08:00
2014-04-30 19:49:37 +01:00
2017-02-24 17:46:57 -08:00
2019-12-07 11:00:19 -08:00
2019-12-07 11:00:19 -08:00
2019-12-05 11:43:31 -08:00
2018-10-16 13:45:44 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2018-06-27 18:58:49 +03:00
2018-10-15 16:31:29 -04:00
2019-12-01 12:59:05 -08:00
2017-08-15 09:02:07 -07:00