Message ID | 3001f7c75f1f99b4c7b789cf91da06678df3435e.1524077494.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0384A601D7 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 18 Apr 2018 18:56:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7170287F2 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 18 Apr 2018 18:56:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA66B287F4; Wed, 18 Apr 2018 18:56:36 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A506287F2 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 18 Apr 2018 18:56:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RprvUWmHWuNPb87fg/jFXG3j2PRep8tuE3/sIgxI1kU=; b=m2+svLYFliyfkVniyL9yQaTqj4 6I8myNSAAsWb2VBY2V+/WGjajO3RtqsiE9+S1BgL77uJNVqKpGFPmYbFxDTNXLfAZZPCIGYqefPj6 O4Qtpoui2NFruKxlNMNG1dUm26XOBCd9qQ7xWa5eadL3LnTqyrt5ifetdtTAlgSRJ4E5dDJes+jgX 4Nm3aSLb7LIuhINiH1yIpHjJuupaBKkNsVwqessyDh/3mgS1ixgPn8lqTWOCzGGa45HQnrrc8kp/Q PG4tk7sJvDe7l2c8YRoqOheOs1pwFNDRUObi4PaYj7gO8s/wc1k9o8k+vp+Ki8I4eTYIK7SLAWcAb Z730BK/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8sFl-0005LT-ON; Wed, 18 Apr 2018 18:56:25 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8sCy-0002uf-6w for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 18:53:37 +0000 Received: by mail-wr0-x241.google.com with SMTP id w3-v6so7540597wrg.2 for <linux-arm-kernel@lists.infradead.org>; Wed, 18 Apr 2018 11:53:23 -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 :in-reply-to:references; bh=7LqFHjLc9fmiJK6kWcf35NOcOGeLklJMrxXiJTH3PIY=; b=Y5qNS+wHx6+CdgIacN8a4BPFjxE7EoaznGgXPH0N69fY3IWMwTWpEXmbLRVRwyyqry voRnd/lDcaZTlJwuhOwlsW9Kj+nnXs59nC3JQ4WOIoy3I7Qopip8meH07jej6FmN37zV XpvoTdaIFA/jLueSy1SL9CtUIw1C3MwLNDAVmYy3u7TzGMliMrGWJpxyMF8Cwbp0e6wG nmheGOWmiMdRbd3pFcZ3ZocVM/ZWzUELsN+ZO8b27T7/UZyijkP71A8ijZrxFL2OiuG1 RKQB14fWH4xVs/nyD1rfIzPFk627U2in3JTk3p0kVZhaYo3FVQBbDONs1Bn96/YDJYor TGKg== 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:in-reply-to:references; bh=7LqFHjLc9fmiJK6kWcf35NOcOGeLklJMrxXiJTH3PIY=; b=ig3TfiGZJpVuElb7J53M/Zm13G/XmlDe7bU22Kn6ltAoiFiy03gjAwlaYLd8uzHshQ UC/aBhP6ei2h1oINd9tqaxl95ygcPXwrLwWjVnHt1Oo1JdVOxisxPdKrc91vb5AUj7Da 6McP2tsa2hg/Vdm3foJhZM/tT4xGtPmCZ7NMYlq+JAm9crF7W9+ZlZ/s2MPcBBCRbBn8 z6r2FYvL6tryPxcbrF6iEa9cuT2V9Iol7K3WghmwjgWYGWaGblEETHkKiCHfsDQJ8Y5z BRS1w2LHUlQpSJ3lSNy8ZkwGQULMVUWmCQZXcRRvzBpVH/x/+C0ox220bR4FrbyKJjJO Hsdg== X-Gm-Message-State: ALQs6tCCCH+7jT4FiZP0FnBSxOgumPQVkcSpaC2PLH8OZK+jEoHLazLz JXC8GILQj8UJ6IdZr/7wLcV2oQ== X-Google-Smtp-Source: AIpwx4+B0pjbQyWKQY9fQR9K19/64zAuAzCr4KKSyoP7Syb44CYVgusfIIjx+clr3qT4sbFKWLN/pQ== X-Received: by 10.28.40.4 with SMTP id o4mr2674684wmo.44.1524077601662; Wed, 18 Apr 2018 11:53:21 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id k79sm2616735wmg.39.2018.04.18.11.53.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 11:53:20 -0700 (PDT) From: Andrey Konovalov <andreyknvl@google.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Jonathan Corbet <corbet@lwn.net>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com>, Al Viro <viro@zeniv.linux.org.uk>, Andrey Konovalov <andreyknvl@google.com>, James Morse <james.morse@arm.com>, Kees Cook <keescook@chromium.org>, Bart Van Assche <bart.vanassche@wdc.com>, Kate Stewart <kstewart@linuxfoundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thomas Gleixner <tglx@linutronix.de>, Philippe Ombredanne <pombredanne@nexb.com>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@kernel.org>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Dan Williams <dan.j.williams@intel.com>, "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>, Zi Yan <zi.yan@cs.rutgers.edu>, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 2/6] uaccess: add untagged_addr definition for other arches Date: Wed, 18 Apr 2018 20:53:11 +0200 Message-Id: <3001f7c75f1f99b4c7b789cf91da06678df3435e.1524077494.git.andreyknvl@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog In-Reply-To: <cover.1524077494.git.andreyknvl@google.com> References: <cover.1524077494.git.andreyknvl@google.com> In-Reply-To: <cover.1524077494.git.andreyknvl@google.com> References: <cover.1524077494.git.andreyknvl@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_115332_850127_51A5FD53 X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jacob Bramley <Jacob.Bramley@arm.com>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Lee Smith <Lee.Smith@arm.com>, Kostya Serebryany <kcc@google.com>, Dmitry Vyukov <dvyukov@google.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Evgeniy Stepanov <eugenis@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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 (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(+)