Re: ARM: vmsplit 4g/4g

2020-06-15 Thread afzal mohammed
Hi Linus, On Mon, Jun 15, 2020 at 11:11:04AM +0200, Linus Walleij wrote: > OK I would be very happy to look at it so I can learn a bit about the > hands-on and general approach here. Just send it to this address > directly and I will look! Have sent it > > For the next 3 weeks, right now, i

Re: ARM: vmsplit 4g/4g

2020-06-15 Thread Linus Walleij
Hi Afzal! On Fri, Jun 12, 2020 at 12:25 PM afzal mohammed wrote: > > > Note that this was done on a topic branch for user copy. Changes for > > > kernel static mapping to vmalloc has not been merged with these. > > > Also having kernel lowmem w/ a separate asid & switching at kernel > > >

Re: ARM: vmsplit 4g/4g

2020-06-12 Thread afzal mohammed
Hi, On Wed, Jun 10, 2020 at 12:10:21PM +0200, Linus Walleij wrote: > On Mon, Jun 8, 2020 at 1:09 PM afzal mohammed wrote: > > Not yet. Yes, i will do the performance evaluation. > > > > i am also worried about the impact on performance as these > > [ get_user_pages() or friends, kmap_atomic() ]

Re: ARM: vmsplit 4g/4g

2020-06-10 Thread Linus Walleij
On Mon, Jun 8, 2020 at 1:09 PM afzal mohammed wrote: > On Sun, Jun 07, 2020 at 05:11:16PM +0100, Russell King - ARM Linux admin > wrote: > > On Sun, Jun 07, 2020 at 06:29:32PM +0530, afzal mohammed wrote: > > > > get_user_pages_fast() followed by kmap_atomic() & then memcpy() seems > > > to work

Re: ARM: vmsplit 4g/4g

2020-06-09 Thread Arnd Bergmann
On Tue, Jun 9, 2020 at 2:15 PM afzal mohammed wrote: > On Mon, Jun 08, 2020 at 08:47:27PM +0530, afzal mohammed wrote: > > On Mon, Jun 08, 2020 at 04:43:57PM +0200, Arnd Bergmann wrote: > > > > There is another difference: get_user_pages_fast() does not return > > > a vm_area_struct pointer,

Re: ARM: vmsplit 4g/4g

2020-06-09 Thread afzal mohammed
Hi, On Mon, Jun 08, 2020 at 08:47:27PM +0530, afzal mohammed wrote: > On Mon, Jun 08, 2020 at 04:43:57PM +0200, Arnd Bergmann wrote: > > There is another difference: get_user_pages_fast() does not return > > a vm_area_struct pointer, which is where you would check the access > > permissions. I

Re: ARM: vmsplit 4g/4g

2020-06-08 Thread afzal mohammed
Hi, On Mon, Jun 08, 2020 at 04:43:57PM +0200, Arnd Bergmann wrote: > There is another difference: get_user_pages_fast() does not return > a vm_area_struct pointer, which is where you would check the access > permissions. I suppose those pointers could not be returned to callers > that don't

Re: ARM: vmsplit 4g/4g

2020-06-08 Thread Arnd Bergmann
On Mon, Jun 8, 2020 at 1:18 PM afzal mohammed wrote: > On Sun, Jun 07, 2020 at 09:26:26PM +0200, Arnd Bergmann wrote: > > > I think you have to use get_user_pages() though instead of > > get_user_pages_fast(), > > in order to be able to check the permission bits to prevent doing a > >

Re: ARM: vmsplit 4g/4g

2020-06-08 Thread afzal mohammed
Hi, On Sun, Jun 07, 2020 at 09:26:26PM +0200, Arnd Bergmann wrote: > I think you have to use get_user_pages() though instead of > get_user_pages_fast(), > in order to be able to check the permission bits to prevent doing a > copy_to_user() > into read-only mappings. i was not aware of this, is

Re: ARM: vmsplit 4g/4g

2020-06-08 Thread afzal mohammed
Hi, [ my previous mail did not make into linux-arm-kernel mailing list, got a mail saying it has a suspicious header and that it is waiting moderator approval ] On Sun, Jun 07, 2020 at 05:11:16PM +0100, Russell King - ARM Linux admin wrote: > On Sun, Jun 07, 2020 at 06:29:32PM +0530, afzal

Re: ARM: vmsplit 4g/4g

2020-06-07 Thread Arnd Bergmann
On Sun, Jun 7, 2020 at 2:59 PM afzal mohammed wrote: > On Sat, May 16, 2020 at 09:35:57AM +0200, Arnd Bergmann wrote: > > On Sat, May 16, 2020 at 8:06 AM afzal mohammed > > wrote: > > > > Okay, so the conclusion i take is, > > > 1. VMSPLIT 4G/4G have to live alongside highmem > > > 2. For user

Re: ARM: vmsplit 4g/4g

2020-06-07 Thread Russell King - ARM Linux admin
On Sun, Jun 07, 2020 at 06:29:32PM +0530, afzal mohammed wrote: > Hi, > > On Sat, May 16, 2020 at 09:35:57AM +0200, Arnd Bergmann wrote: > > On Sat, May 16, 2020 at 8:06 AM afzal mohammed > > wrote: > > > > Okay, so the conclusion i take is, > > > 1. VMSPLIT 4G/4G have to live alongside

ARM: vmsplit 4g/4g

2020-06-07 Thread afzal mohammed
Hi, On Sat, May 16, 2020 at 09:35:57AM +0200, Arnd Bergmann wrote: > On Sat, May 16, 2020 at 8:06 AM afzal mohammed > wrote: > > Okay, so the conclusion i take is, > > 1. VMSPLIT 4G/4G have to live alongside highmem > > 2. For user space copy, do pinning followed by kmap > Right, though