[PATCH v13 04/20] mm, arm64: untag user pointers passed to memory syscalls

Catalin Marinas catalin.marinas at arm.com
Fri Mar 22 11:43:57 UTC 2019


On Wed, Mar 20, 2019 at 03:51:18PM +0100, 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.
> 
> This patch allows tagged pointers to be passed to the following memory
> syscalls: madvise, mbind, get_mempolicy, mincore, mlock, mlock2, brk,
> mmap_pgoff, old_mmap, munmap, remap_file_pages, mprotect, pkey_mprotect,
> mremap, msync and shmdt.
> 
> This is done by untagging pointers passed to these syscalls in the
> prologues of their handlers.
> 
> Signed-off-by: Andrey Konovalov <andreyknvl at google.com>
> ---
>  ipc/shm.c      | 2 ++
>  mm/madvise.c   | 2 ++
>  mm/mempolicy.c | 5 +++++
>  mm/migrate.c   | 1 +
>  mm/mincore.c   | 2 ++
>  mm/mlock.c     | 5 +++++
>  mm/mmap.c      | 7 +++++++
>  mm/mprotect.c  | 1 +
>  mm/mremap.c    | 2 ++
>  mm/msync.c     | 2 ++
>  10 files changed, 29 insertions(+)

I wonder whether it's better to keep these as wrappers in the arm64
code.

-- 
Catalin


More information about the amd-gfx mailing list