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 know

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 sl

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 th