From mboxrd@z Thu Jan 1 00:00:00 1970 From: khalid.aziz at oracle.com (Khalid Aziz) Date: Mon, 3 Jun 2019 11:02:33 -0600 Subject: [PATCH v16 01/16] uaccess: add untagged_addr definition for other arches In-Reply-To: <097bc300a5c6554ca6fd1886421bb2e0adb03420.1559580831.git.andreyknvl@google.com> References: <097bc300a5c6554ca6fd1886421bb2e0adb03420.1559580831.git.andreyknvl@google.com> Message-ID: <8ff5b0ff-849a-1e0b-18da-ccb5be85dd2b@oracle.com> On 6/3/19 10:55 AM, Andrey Konovalov wrote: > To allow arm64 syscalls to accept tagged pointers from userspace, we must > untag them when they are passed to the kernel. Since untagging is done in > generic parts of the kernel, the untagged_addr macro needs to be defined > for all architectures. > > 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/include/linux/mm.h b/include/linux/mm.h > index 0e8834ac32b7..949d43e9c0b6 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly; > #include > #include > > +#ifndef untagged_addr > +#define untagged_addr(addr) (addr) > +#endif > + > #ifndef __pa_symbol > #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) > #endif > Andrey, This patch has now become part of the other patch series Chris Hellwig has sent out - . Can you coordinate with that patch series? -- Khalid From mboxrd@z Thu Jan 1 00:00:00 1970 From: khalid.aziz@oracle.com (Khalid Aziz) Date: Mon, 3 Jun 2019 11:02:33 -0600 Subject: [PATCH v16 01/16] uaccess: add untagged_addr definition for other arches In-Reply-To: <097bc300a5c6554ca6fd1886421bb2e0adb03420.1559580831.git.andreyknvl@google.com> References: <097bc300a5c6554ca6fd1886421bb2e0adb03420.1559580831.git.andreyknvl@google.com> Message-ID: <8ff5b0ff-849a-1e0b-18da-ccb5be85dd2b@oracle.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190603170233.HxeUkPgzTvUQhJ3WfMWFP5xO6ElsnG-76J9Faa2JyNU@z> On 6/3/19 10:55 AM, Andrey Konovalov wrote: > To allow arm64 syscalls to accept tagged pointers from userspace, we must > untag them when they are passed to the kernel. Since untagging is done in > generic parts of the kernel, the untagged_addr macro needs to be defined > for all architectures. > > 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/include/linux/mm.h b/include/linux/mm.h > index 0e8834ac32b7..949d43e9c0b6 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly; > #include > #include > > +#ifndef untagged_addr > +#define untagged_addr(addr) (addr) > +#endif > + > #ifndef __pa_symbol > #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) > #endif > Andrey, This patch has now become part of the other patch series Chris Hellwig has sent out - . Can you coordinate with that patch series? -- Khalid