[PATCH] ARM: fix string functions on !MMU
Will Deacon
will.deacon at arm.com
Tue Apr 22 02:44:24 PDT 2014
On Mon, Apr 21, 2014 at 07:10:08PM +0100, Rabin Vincent wrote:
> 8c56cc8be5b38e ("ARM: 7449/1: use generic strnlen_user and
> strncpy_from_user functions") apparently broken those string operations
> for !MMU. USER_DS == KERNEL_DS on !MMU, so user_addr_max() always
> restricts the addresses to TASK_SIZE.
>
> TASK_SIZE has anyway no meaning on !MMU, so make user_addr_max() not
> restrict anything.
Might be worth mentioning that this is an issue because KERNEL_DS is 0x0
(since it's a 32-bit quantity), so checks like addr < user_addr_max() will
fail. Anyway, the code looks fine to me:
Acked-by: Will Deacon <will.deacon at arm.com>
Will
More information about the linux-arm-kernel
mailing list