lkml.org 
[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v16 04/16] mm: untag user pointers in do_pages_move
    From
    Date
    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 move_pages syscall.
    >
    > Untag user pointers in this function.
    >
    > Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    > ---
    > mm/migrate.c | 1 +
    > 1 file changed, 1 insertion(+)
    >
    > diff --git a/mm/migrate.c b/mm/migrate.c
    > index f2ecc2855a12..3930bb6fa656 100644
    > --- a/mm/migrate.c
    > +++ b/mm/migrate.c
    > @@ -1617,6 +1617,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
    > if (get_user(node, nodes + i))
    > goto out_flush;
    > addr = (unsigned long)p;
    > + addr = untagged_addr(addr);

    Why not just "addr = (unsigned long)untagged_addr(p);"

    --
    Khalid

    \
     
     \ /
      Last update: 2019-06-11 22:19    [W:2.751 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site