Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-05 Thread Sam Ravnborg
> >access_ok() always returns 1. > > Thanks for pointing it out. And, I didn't notice that gup is just built for > SPARC64. I though it is built by both 64 bit and 32 bit. > > A follow-up question, is there any reason to just have sparc specific fast > gup for 64 bit not for 32 bit? I do not

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-05 Thread Sam Ravnborg
> >access_ok() always returns 1. > > Thanks for pointing it out. And, I didn't notice that gup is just built for > SPARC64. I though it is built by both 64 bit and 32 bit. > > A follow-up question, is there any reason to just have sparc specific fast > gup for 64 bit not for 32 bit? I do not

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-03 Thread Shi, Yang
On 12/3/2015 12:38 PM, Sam Ravnborg wrote: Hi Yang. On Wed, Nov 25, 2015 at 02:45:43PM -0800, Yang Shi wrote: Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-03 Thread Sam Ravnborg
Hi Yang. On Wed, Nov 25, 2015 at 02:45:43PM -0800, Yang Shi wrote: > Check if user address is accessible in atomic version __get_user_pages_fast() > before walking the page table. > And, check if end > start in get_user_pages_fast(), otherwise fallback to slow > path. Two different but related

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-03 Thread Sam Ravnborg
Hi Yang. On Wed, Nov 25, 2015 at 02:45:43PM -0800, Yang Shi wrote: > Check if user address is accessible in atomic version __get_user_pages_fast() > before walking the page table. > And, check if end > start in get_user_pages_fast(), otherwise fallback to slow > path. Two different but related

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-03 Thread Shi, Yang
On 12/3/2015 12:38 PM, Sam Ravnborg wrote: Hi Yang. On Wed, Nov 25, 2015 at 02:45:43PM -0800, Yang Shi wrote: Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to

Re: [PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Shi, Yang
On 11/25/2015 4:26 PM, kbuild test robot wrote: Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as

Re: [PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread kbuild test robot
Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as .config) reproduce: wget

[V2 PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi --- Just found slow_irqon label is not defined, added it to avoid compile

[PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi --- arch/sparc/mm/gup.c | 5 + 1 file changed, 5 insertions(+) diff

[V2 PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi --- Just found slow_irqon label is not defined, added it

Re: [PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread kbuild test robot
Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as .config) reproduce: wget

Re: [PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Shi, Yang
On 11/25/2015 4:26 PM, kbuild test robot wrote: Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as

[PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi --- arch/sparc/mm/gup.c | 5 + 1 file changed, 5