On Tue, Nov 14, 2017 at 12:47:04PM +0800, Vincent Chen wrote:
> Thanks
> So, I should keep the area that we've copied into instead of zeroing
> the area even if unpredicted exception is happened. Right?
Yes. Here's what's required: if raw_copy_{from,to}_user(from, to, size)
returns n, we want
>>On Wed, Nov 08, 2017 at 01:55:06PM +0800, Greentime Hu wrote:
>
>> +#define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs()
>> +-size))
>> +
>> +#define access_ok(type, addr, size) \
>> + __range_ok((unsigned long)addr, (unsigned long)size)
>
>> +#define __get_us
On Wed, Nov 08, 2017 at 01:55:06PM +0800, Greentime Hu wrote:
> +#define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs() -size))
> +
> +#define access_ok(type, addr, size) \
> + __range_ok((unsigned long)addr, (unsigned long)size)
> +#define __get_user_x(__r2,__p
On Wed, Nov 8, 2017 at 6:55 AM, Greentime Hu wrote:
> +#define get_user(x,p) \
> + ({ \
> + const register typeof(*(p)) __user *__p asm("$r0") = (p);\
> +
From: Greentime Hu
Signed-off-by: Vincent Chen
Signed-off-by: Greentime Hu
---
arch/nds32/include/asm/string.h | 30 +++
arch/nds32/include/asm/swab.h| 48 +
arch/nds32/include/asm/uaccess.h | 385 ++
arch/nds32/kernel/nds32_ksyms.c | 54 +++
5 matches
Mail list logo