Re: [PATCH v18 10/15] drm/radeon: untag user pointers in radeon_gem_userptr_ioctl

2019-06-26 Thread Khalid Aziz
ups, which can only by done with > untagged pointers. > > This patch untags user pointers in radeon_gem_userptr_ioctl(). > > Suggested-by: Felix Kuehling > Acked-by: Felix Kuehling > Signed-off-by: Andrey Konovalov > --- Reviewed-by: Khalid Aziz > drivers/gpu/drm/rade

Re: [PATCH v17 12/15] media/v4l2-core, arm64: untag user pointers in videobuf_dma_contig_user_get

2019-06-19 Thread Khalid Aziz
to not be specific to arm64. Reviewed-by: Khalid Aziz > drivers/media/v4l2-core/videobuf-dma-contig.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > exact_copy_from_user > diff --git a/drivers/media/v4l2-core/videobuf-dma-contig.c > b/drivers/medi

Re: [PATCH v17 07/15] fs, arm64: untag user pointers in copy_mount_options

2019-06-19 Thread Khalid Aziz
before subtracting. > > Reviewed-by: Kees Cook > Reviewed-by: Catalin Marinas > Signed-off-by: Andrey Konovalov > --- Please update commit log to make it not arm64 specific since this change affects other architectures as well. Other than that, Reviewed-by: Khalid Aziz > fs/name

Re: [PATCH v17 06/15] mm, arm64: untag user pointers in get_vaddr_frames

2019-06-19 Thread Khalid Aziz
e to commit log in my previous email: Reviewed-by: Khalid Aziz > mm/frame_vector.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/frame_vector.c b/mm/frame_vector.c > index c64dca6e27c2..c431ca81dad5 100644 > --- a/mm/frame_vector.c > +++ b/mm/frame_vector

Re: [PATCH v17 04/15] mm, arm64: untag user pointers passed to memory syscalls

2019-06-19 Thread Khalid Aziz
On 6/19/19 9:55 AM, Khalid Aziz wrote: > On 6/12/19 5:43 AM, Andrey Konovalov wrote: >> This patch is a part of a series that extends arm64 kernel ABI to allow to >> pass tagged user pointers (with the top byte set to something else other >> than 0x00) as syscall arguments. &g

Re: [PATCH v17 05/15] mm, arm64: untag user pointers in mm/gup.c

2019-06-19 Thread Khalid Aziz
s. > > Reviewed-by: Kees Cook > Reviewed-by: Catalin Marinas > Signed-off-by: Andrey Konovalov > --- Reviewed-by: Khalid Aziz > mm/gup.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/mm/gup.c b/mm/gup.c > index ddde097cf9e4..c37df3d455a2 100644 > --

Re: [PATCH v17 04/15] mm, arm64: untag user pointers passed to memory syscalls

2019-06-19 Thread Khalid Aziz
ur for the > corresponding vma. > > Reviewed-by: Catalin Marinas > Reviewed-by: Kees Cook > Signed-off-by: Andrey Konovalov > --- Reviewed-by: Khalid Aziz > mm/madvise.c | 2 ++ > mm/mempolicy.c | 3 +++ > mm/migrate.c | 2 +- > mm/mincore.c | 2 ++ > mm/mloc

Re: [PATCH v16 04/16] mm: untag user pointers in do_pages_move

2019-06-11 Thread Khalid Aziz
On 6/3/19 10:55 AM, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > do_pages_move() is used in the implementation of the

Re: [PATCH v16 03/16] lib, arm64: untag user pointers in strn*_user

2019-06-11 Thread Khalid Aziz
ters to perform > validity checks, but then uses them as is to perform user memory accesses. > > Reviewed-by: Catalin Marinas > Signed-off-by: Andrey Konovalov > --- > lib/strncpy_from_user.c | 3 ++- > lib/strnlen_user.c | 3 ++- > 2 files changed, 4 insertions(

Re: [PATCH v16 01/16] uaccess: add untagged_addr definition for other arches

2019-06-03 Thread Khalid Aziz
On 6/3/19 11:29 AM, Christoph Hellwig wrote: > On Mon, Jun 03, 2019 at 11:24:35AM -0600, Khalid Aziz wrote: >> On 6/3/19 11:06 AM, Andrey Konovalov wrote: >>> On Mon, Jun 3, 2019 at 7:04 PM Khalid Aziz wrote: >>>> Andrey, >>>> >>>> This pat

Re: [PATCH v16 01/16] uaccess: add untagged_addr definition for other arches

2019-06-03 Thread Khalid Aziz
On 6/3/19 11:06 AM, Andrey Konovalov wrote: > On Mon, Jun 3, 2019 at 7:04 PM Khalid Aziz wrote: >> Andrey, >> >> This patch has now become part of the other patch series Chris Hellwig >> has sent out - >> <https://lore.kernel.org/lkml/20190601074959.14036-1

Re: [PATCH v16 01/16] uaccess: add untagged_addr definition for other arches

2019-06-03 Thread Khalid Aziz
rchitectures. > > Define it as a noop for architectures other than arm64. > > Acked-by: Catalin Marinas > Reviewed-by: Khalid Aziz > Signed-off-by: Andrey Konovalov > --- > include/linux/mm.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/in

Re: [PATCH v15 05/17] arms64: untag user pointers passed to memory syscalls

2019-05-30 Thread Khalid Aziz
On 5/30/19 9:11 AM, Catalin Marinas wrote: > On Wed, May 29, 2019 at 01:16:37PM -0600, Khalid Aziz wrote: >> mmap() can return the same tagged address but I am uneasy about kernel >> pre-coloring the pages. Database can mmap 100's of GB of memory. That is >> lot of

Re: [PATCH v15 05/17] arms64: untag user pointers passed to memory syscalls

2019-05-29 Thread Khalid Aziz
On 5/29/19 8:20 AM, Catalin Marinas wrote: > Hi Khalid, > > On Tue, May 28, 2019 at 05:33:04PM -0600, Khalid Aziz wrote: >> On Tue, 2019-05-28 at 16:40 +0100, Catalin Marinas wrote: >>> I think another aspect is how we define the ABI. Is allowing tags to >>> mlock

Re: [PATCH v15 01/17] uaccess: add untagged_addr definition for other arches

2019-05-29 Thread Khalid Aziz
ris started, there is a generic need to untag addresses in kernel and this patch gets us ready for that. Reviewed-by: Khalid Aziz > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 6b10c21630f5..44041df804a6 100644 > --- a/include/linux/mm.h > +++ b/include/lin

Re: [PATCH v15 05/17] arms64: untag user pointers passed to memory syscalls

2019-05-28 Thread Khalid Aziz
On Tue, 2019-05-28 at 16:40 +0100, Catalin Marinas wrote: > On Tue, May 28, 2019 at 03:54:11PM +0100, Andrew Murray wrote: > > On Mon, May 27, 2019 at 03:37:20PM +0100, Catalin Marinas wrote: > > > On Mon, May 06, 2019 at 06:30:51PM +0200, Andrey Konovalov wrote: > > > > This patch is a part of a

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-24 Thread Khalid Aziz
On 5/24/19 4:11 AM, Catalin Marinas wrote: > On Thu, May 23, 2019 at 03:49:05PM -0600, Khalid Aziz wrote: >> On 5/23/19 2:11 PM, Catalin Marinas wrote: >>> On Thu, May 23, 2019 at 11:51:40AM -0600, Khalid Aziz wrote: >>>> On 5/21/19 6:04 PM, Kees Cook wrote: >&g

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-23 Thread Khalid Aziz
On 5/23/19 2:11 PM, Catalin Marinas wrote: > Hi Khalid, > > On Thu, May 23, 2019 at 11:51:40AM -0600, Khalid Aziz wrote: >> On 5/21/19 6:04 PM, Kees Cook wrote: >>> As an aside: I think Sparc ADI support in Linux actually side-stepped >>> this[1] (i.e. chose &qu

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-23 Thread Khalid Aziz
On 5/23/19 2:11 PM, Catalin Marinas wrote: > Hi Khalid, > > On Thu, May 23, 2019 at 11:51:40AM -0600, Khalid Aziz wrote: >> On 5/21/19 6:04 PM, Kees Cook wrote: >>> As an aside: I think Sparc ADI support in Linux actually side-stepped >>> this[1] (i.e. chose &qu

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-23 Thread Khalid Aziz
On 5/21/19 6:04 PM, Kees Cook wrote: > As an aside: I think Sparc ADI support in Linux actually side-stepped > this[1] (i.e. chose "solution 1"): "All addresses passed to kernel must > be non-ADI tagged addresses." (And sadly, "Kernel does not enable ADI > for kernel code.") I think this was a