Message ID | 80f7d6a2f68adb1c41ef5baf8973537380c681b0.1556630205.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C43E41390 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 May 2019 07:19:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD90428ABC for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 May 2019 07:19:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0E8D28B3E; Wed, 1 May 2019 07:19:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 521BC28ABC for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 May 2019 07:19:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE20F893AB; Wed, 1 May 2019 07:19:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vs1-xe4a.google.com (mail-vs1-xe4a.google.com [IPv6:2607:f8b0:4864:20::e4a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0913389180 for <dri-devel@lists.freedesktop.org>; Tue, 30 Apr 2019 13:25:37 +0000 (UTC) Received: by mail-vs1-xe4a.google.com with SMTP id h23so2356948vsp.14 for <dri-devel@lists.freedesktop.org>; Tue, 30 Apr 2019 06:25:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=CVV6psz/Vns5azsm7jZt0BKocrzPfr2CsD5f51mITmQ=; b=Su+qyLdOQ+eFLUhWnDqvR8xnynzA9QeYpkNvq61Vt38xWa0ZW9adtslLC/ibSieRPQ ewdUW2BASAJECS4PjWTAc5NtObc3NYOonVyULzJNcNVLeKxv92GbjbqRoAz720QkLEcU ZUy31/j0acsHX25CKmvQKkRW3XPYHOEGn278Pyqv99lCQPjqQVWG8Fm9yhSGqJfrZ6Q2 nMl4zNahUarORA7aMGX62h5J4sVyBUD6QEvjVyoELtAeZA4rjcuS4qwWrBnT7crHZw7F MiSCZhwVYgqr1bM7FO/7dsFgm0it1Co+w5BJahkmEySpDUFO/b1lDSFNE+OcE83rzmrh 6G4A== X-Gm-Message-State: APjAAAXjsOcdq1uBQQU9w4cGpsFyjvZDyExgeWSKu6vWKijSz1pS7TNp P+tHnJ9Fsgv/X/2JFs/5eJaHuMA6dhRwowDp X-Google-Smtp-Source: APXvYqxbH0hW8IUGPJRsH+MKg4I9yJOI2DrUXBayHbDSUEVQsqLwVaAkxsd+/0KcP5RvItcIqz2adgVjyHXkB8kF X-Received: by 2002:a67:dd01:: with SMTP id y1mr18718014vsj.39.1556630736057; Tue, 30 Apr 2019 06:25:36 -0700 (PDT) Date: Tue, 30 Apr 2019 15:25:02 +0200 In-Reply-To: <cover.1556630205.git.andreyknvl@google.com> Message-Id: <80f7d6a2f68adb1c41ef5baf8973537380c681b0.1556630205.git.andreyknvl@google.com> Mime-Version: 1.0 References: <cover.1556630205.git.andreyknvl@google.com> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog Subject: [PATCH v14 06/17] mm: untag user pointers in do_pages_move From: Andrey Konovalov <andreyknvl@google.com> To: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org X-Mailman-Approved-At: Wed, 01 May 2019 07:18:43 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=CVV6psz/Vns5azsm7jZt0BKocrzPfr2CsD5f51mITmQ=; b=pHAUFUPIK00HUvs8fYzbfMDhOtYuRZOYj18jl6SUOemiz8hMuVoEwpyBcBFZsdPfRy CP69mD/DWkxSBrhRr7+Ao/OQBLtynTBk0B9gn31tW8yWHjU69Q7PB4ZDpgvtdnhUTEzK 8CbwpHg2uux/P91ru8mr0G2/NpJ+DVwloVARu7ft7n27vA6hkWJDGMY1mugB3YmYuyhT OwmXeDxT9woV4yHQlsAA+KWTEq0dG80iCwsoH+0J1dhKu1C33LiknxZR75he7h2J78XE ZKdvpYjQpomJrWqZzF9raVXk6z/lSdaqbAYdD0YzglrS0vRmztdJidedrkfiqCqRVd3N hnSw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, Koenig@google.com, Szabolcs Nagy <Szabolcs.Nagy@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Kostya Serebryany <kcc@google.com>, Chintan Pandya <cpandya@codeaurora.org>, Felix <Felix.Kuehling@amd.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Jacob Bramley <Jacob.Bramley@arm.com>, Leon Romanovsky <leon@kernel.org>, Kuehling@google.com, Dave Martin <Dave.Martin@arm.com>, Evgeniy Stepanov <eugenis@google.com>, Kevin Brodsky <kevin.brodsky@arm.com>, Kees Cook <keescook@chromium.org>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Andrey Konovalov <andreyknvl@google.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Deucher@google.com, Alex Williamson <alex.williamson@redhat.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Dmitry Vyukov <dvyukov@google.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Yishai Hadas <yishaih@mellanox.com>, Jens Wiklander <jens.wiklander@linaro.org>, Lee Smith <Lee.Smith@arm.com>, Alexander <Alexander.Deucher@amd.com>, Andrew Morton <akpm@linux-foundation.org>, Robin Murphy <robin.murphy@arm.com>, Christian <Christian.Koenig@amd.com>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
arm64: untag user pointers passed to the kernel
|
expand
|
diff --git a/mm/migrate.c b/mm/migrate.c index 663a5449367a..c014a07135f0 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); err = -ENODEV; if (node < 0 || node >= MAX_NUMNODES)
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. Signed-off-by: Andrey Konovalov <andreyknvl@google.com> --- mm/migrate.c | 1 + 1 file changed, 1 insertion(+)