lkml.org 
[lkml]   [2018]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/6] uaccess: add untagged_addr definition for other arches
    Date
    To allow arm64 syscalls 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 (like the mm subsystem), the untagged_addr
    macro should be defined for all architectures.

    Define it as a noop for other architectures besides arm64.

    Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    ---
    include/linux/uaccess.h | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
    index efe79c1cdd47..c045b4eff95e 100644
    --- a/include/linux/uaccess.h
    +++ b/include/linux/uaccess.h
    @@ -13,6 +13,10 @@

    #include <asm/uaccess.h>

    +#ifndef untagged_addr
    +#define untagged_addr(addr) addr
    +#endif
    +
    /*
    * Architectures should provide two primitives (raw_copy_{to,from}_user())
    * and get rid of their private instances of copy_{to,from}_user() and
    --
    2.17.0.484.g0c8726318c-goog
    \
     
     \ /
      Last update: 2018-04-18 20:55    [W:3.599 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site