Re: [ 043/218] ARM: 7527/1: uaccess: explicitly check __userpointer when !CPU_USE_DOMAINS

From: Ben Hutchings
Date: Fri Sep 28 2012 - 19:37:41 EST


On Fri, 2012-09-28 at 13:14 -0700, Greg Kroah-Hartman wrote:
> 3.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
>
> 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]
[...]

It looks like this is needed for at least some older kernel versions,
but a backported version will be needed for 3.2 and earlier.

Ben.

--
Ben Hutchings
Usenet is essentially a HUGE group of people passing notes in class.
- Rachel Kadel, `A Quick Guide to Newsgroup Etiquette'

Attachment: signature.asc
Description: This is a digitally signed message part