Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-11 Thread Andrey Konovalov
On Tue, May 8, 2018 at 5:11 PM, Catalin Marinas wrote: > On Wed, May 02, 2018 at 07:25:17PM +0200, Andrey Konovalov wrote: >> On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov >> wrote: >> > On Wed, May 02, 2018 at 02:38:42PM +,

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-11 Thread Andrey Konovalov
On Tue, May 8, 2018 at 5:11 PM, Catalin Marinas wrote: > On Wed, May 02, 2018 at 07:25:17PM +0200, Andrey Konovalov wrote: >> On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov >> wrote: >> > On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >> >> > Does having a tagged address

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-08 Thread Catalin Marinas
On Wed, May 02, 2018 at 07:25:17PM +0200, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > wrote: > > On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > >> > Does having a tagged address here makes any difference? I

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-08 Thread Catalin Marinas
On Wed, May 02, 2018 at 07:25:17PM +0200, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > wrote: > > On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > >> > Does having a tagged address here makes any difference? I couldn't hit a > >> > failure with

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Thu, May 3, 2018 at 5:24 PM, Kirill A. Shutemov wrote: > On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: >> On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov >> wrote: >> I wasn't able to find anything that calls follow_page with

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Thu, May 3, 2018 at 5:24 PM, Kirill A. Shutemov wrote: > On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: >> On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov >> wrote: >> I wasn't able to find anything that calls follow_page with pointers >> passed from userspace except for

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Kirill A. Shutemov
On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov > wrote: > > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > > wrote: > >> On Wed, May 02, 2018 at 02:38:42PM +,

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Kirill A. Shutemov
On Thu, May 03, 2018 at 04:09:56PM +0200, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov > wrote: > > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > > wrote: > >> On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > >>> > Does having a tagged

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > wrote: >> On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >>> > Does having a tagged address here makes any

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-03 Thread Andrey Konovalov
On Wed, May 2, 2018 at 7:25 PM, Andrey Konovalov wrote: > On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov > wrote: >> On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >>> > Does having a tagged address here makes any difference? I couldn't hit a >>> > failure with my simple

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Andrey Konovalov
On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov wrote: > On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >> > Does having a tagged address here makes any difference? I couldn't hit a >> > failure with my simple tests (LD_PRELOAD a library that

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Andrey Konovalov
On Wed, May 2, 2018 at 5:36 PM, Kirill A. Shutemov wrote: > On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: >> > Does having a tagged address here makes any difference? I couldn't hit a >> > failure with my simple tests (LD_PRELOAD a library that randomly adds >> > tags to

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Kirill A. Shutemov
On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > > Does having a tagged address here makes any difference? I couldn't hit a > > failure with my simple tests (LD_PRELOAD a library that randomly adds > > tags to pointers returned by malloc). > > I think you're right,

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Kirill A. Shutemov
On Wed, May 02, 2018 at 02:38:42PM +, Andrey Konovalov wrote: > > Does having a tagged address here makes any difference? I couldn't hit a > > failure with my simple tests (LD_PRELOAD a library that randomly adds > > tags to pointers returned by malloc). > > I think you're right,

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Andrey Konovalov
On Thu, Apr 26, 2018 at 7:47 PM, Catalin Marinas wrote: My approach with this was to add untagging to every gup.c function that is exposed for external use, but perhaps adding untagging only where it is actually required is a better approach. > On Wed, Apr 18, 2018 at

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-05-02 Thread Andrey Konovalov
On Thu, Apr 26, 2018 at 7:47 PM, Catalin Marinas wrote: My approach with this was to add untagging to every gup.c function that is exposed for external use, but perhaps adding untagging only where it is actually required is a better approach. > On Wed, Apr 18, 2018 at 08:53:13PM +0200, Andrey

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-04-26 Thread Catalin Marinas
On Wed, Apr 18, 2018 at 08:53:13PM +0200, Andrey Konovalov wrote: > diff --git a/mm/gup.c b/mm/gup.c > index 76af4cfeaf68..fb375de7d40d 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -386,6 +386,8 @@ struct page *follow_page_mask(struct vm_area_struct *vma, > struct page *page; > struct

Re: [PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-04-26 Thread Catalin Marinas
On Wed, Apr 18, 2018 at 08:53:13PM +0200, Andrey Konovalov wrote: > diff --git a/mm/gup.c b/mm/gup.c > index 76af4cfeaf68..fb375de7d40d 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -386,6 +386,8 @@ struct page *follow_page_mask(struct vm_area_struct *vma, > struct page *page; > struct

[PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-04-18 Thread Andrey Konovalov
mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example get_user_pages, that is used by the futex syscall). Here we also need to handle the case of tagged user pointers. Untag addresses passed to this interface. Signed-off-by: Andrey

[PATCH 4/6] mm, arm64: untag user addresses in mm/gup.c

2018-04-18 Thread Andrey Konovalov
mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example get_user_pages, that is used by the futex syscall). Here we also need to handle the case of tagged user pointers. Untag addresses passed to this interface. Signed-off-by: Andrey