Message ID | 1ff6af9a9ab1f716d0ecbfcfe6788a02e21b7480.1538485901.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.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 EF11414BD for <patchwork-linux-kselftest@patchwork.kernel.org>; Tue, 2 Oct 2018 13:13:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D772846C for <patchwork-linux-kselftest@patchwork.kernel.org>; Tue, 2 Oct 2018 13:13:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7BD1285C7; Tue, 2 Oct 2018 13:13:45 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 939302846C for <patchwork-linux-kselftest@patchwork.kernel.org>; Tue, 2 Oct 2018 13:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726156AbeJBT5B (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Tue, 2 Oct 2018 15:57:01 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44114 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727943AbeJBT4H (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Tue, 2 Oct 2018 15:56:07 -0400 Received: by mail-wr1-f66.google.com with SMTP id 63-v6so2155400wra.11 for <linux-kselftest@vger.kernel.org>; Tue, 02 Oct 2018 06:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cq3vN6aPcQwtnG7Yk3tP2XwC690M9TeiFA6EGKo+spg=; b=wVK2wJsBGU5FIzxsuMJcgTdTL10q6LtoeL+UENspJKFgA0RDNTzi9Wn5gAyDr+6Szv RncY5kWukrU8NwSkp4uPffTL6eb+JtiBGH/Jp80QDfaMmzXGUpB7izMO5ZlGKrJ/c+NM S3mjkFvCJ3ABkch+sQLZcNPA/SdENdR9ieF/M8THE6aUPYbQYb7DD3n9cIvpFuI7qLT3 +ZUu1kES5j/a2JYULJs6Ry0XZ+RqRXQI2jOIg5lPqOT26QlkW3W+kKGlm1f1B+9coovo V0zbhgSer4xnymtNsXnnPFCfur591TOZxRATREyyigBwTz3+tXsZi3uIwP51Q2Zc36uq h/rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cq3vN6aPcQwtnG7Yk3tP2XwC690M9TeiFA6EGKo+spg=; b=jOZfbEwJdRqd20kyimp80b9twBg/+9F85PwzEWLT61XTTYtNHgcxqDnUtyN7hC5AlR Fu2/LNzDIMbdr5yv9FnNnikziXoZGNQArLlLcOcMrXhE+0+pjXYgNhtfLjV5QjDDkj7H iS9m07lIWZK4imx9JjNIK+JxcL1yZ2SiFW+xgDabREGNKeqJugGqMafnxfhcfptP1v+D uIxxTlHkidB2003KSt35h0Ya1FTD1CpkJUJhIk63feiUlmLQrPuWhrLQNUvHzhPzP7/+ 463c0OA1XsQFYvKGoWYwPAI9NR5UPeWNfUGTgBwYBAgNzxQcZfJxleq3s+ZWFB7qf7EH x7rg== X-Gm-Message-State: ABuFfohn91NGCz1NCMO/UNAfBa4HSzC1cMRrJhT4055yQhZXCs4c3xR1 Mubsp8na9ZKAFnmC4c+j1Pl7OQ== X-Google-Smtp-Source: ACcGV62AocYuBthFf3RuZ7M7TITSn4vXXnPKZ8bb2eLezWn89dGEtVrCS/4KW1hgHo/fTVInkvsQ6Q== X-Received: by 2002:adf:db8e:: with SMTP id u14-v6mr10999323wri.217.1538485969081; Tue, 02 Oct 2018 06:12:49 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id v10-v6sm17458681wrp.0.2018.10.02.06.12.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 06:12:48 -0700 (PDT) From: Andrey Konovalov <andreyknvl@google.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com>, Kees Cook <keescook@chromium.org>, Kate Stewart <kstewart@linuxfoundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@kernel.org>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Shuah Khan <shuah@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov <dvyukov@google.com>, Kostya Serebryany <kcc@google.com>, Evgeniy Stepanov <eugenis@google.com>, Lee Smith <Lee.Smith@arm.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Jacob Bramley <Jacob.Bramley@arm.com>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Chintan Pandya <cpandya@codeaurora.org>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com>, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH v7 2/8] uaccess: add untagged_addr definition for other arches Date: Tue, 2 Oct 2018 15:12:37 +0200 Message-Id: <1ff6af9a9ab1f716d0ecbfcfe6788a02e21b7480.1538485901.git.andreyknvl@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: <cover.1538485901.git.andreyknvl@google.com> References: <cover.1538485901.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
arm64: untag user pointers passed to the kernel
|
expand
|
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
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, the untagged_addr macro needs to 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(+)