Message ID | 82fadd039625707fea89668cd50cfae24d19681e.1522169685.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 80B1760386 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 27 Mar 2018 17:00:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7035B298DD for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 27 Mar 2018 17:00:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E28529D6D; Tue, 27 Mar 2018 17:00:07 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID 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 DFE2129B31 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 27 Mar 2018 17:00:06 +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=KCHHkMQNmFVPbZ/fb2xkyVILzIBOuuaezPZN8IY/7GI=; b=d6E46I5pF7BJ3ZTCcFV9PtlnO9 QevfuWYcukxWxTBrwqOJmDNPL/5yAzHJVQ8D+h5c3Gcm+pJeOHxQISuvfT+ithmPDWk9OlvkuUZcy WhuwKtGDsyrN3OdbZgono1e28MN14sb8h9u0mLWmiaB8cNliWQSGt51VnXyoIQYyvXeTVa9i+gsOZ 05nlpnHvzf2LlIJ2EdrPYRDgf/gwyQD+40rcqgN1XHh//cm5r6L7/MhJBtiupaxiqjMU9GcrxoWyC ZAmQ4BWwJmoptIJaJX0hpe4qu6c3Rpl4RdF3nW3YXop0Eq714W0cb2BKO7pCnMZywGUs2pibb1YQa 2vyQHzXg==; 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 1f0rx0-0001A8-D7; Tue, 27 Mar 2018 16:59:58 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0rv6-0007zg-5E for linux-arm-kernel@lists.infradead.org; Tue, 27 Mar 2018 16:58:02 +0000 Received: by mail-wr0-x242.google.com with SMTP id y55so2540165wry.3 for <linux-arm-kernel@lists.infradead.org>; Tue, 27 Mar 2018 09:57:51 -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=eJaUh+CmLgN3GGwHqK4N3gE7joHAOCvWBMJLvmKkuIs=; b=j0fTrT7HrngKQMXZNOj8n7NOGfUo7qd6xupuNYgm8COVky1GMwI9bSCEc8MjvQ7NO8 93iyZCaluHos1YVwStlHfoZlMjzkdOsAQOZsArayGVshCigPKgFiRXAtFbRcMbpeZwU1 prBhUOwx6yo4L6mN+2n5zuQ7jQEnoiOVOrke4JaaZoFy9MAg3TVXXSIJR7TIVFNCAs9/ QC6ISTtVaJn0sUbwcZ3/+QCW7t+0uRCl6Po0QQJ3rzqvHUFTVC7zSoW2pl7njQKkpacn vWn7ySQGDpa0TNh5zj8oi0e8d43aPXGBJRAbMc1FsKSp1A3FRiF8o86BGAfDPm1oKBLx 4dUQ== 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=eJaUh+CmLgN3GGwHqK4N3gE7joHAOCvWBMJLvmKkuIs=; b=pm1QEHtwP8djvJ5HlBxBMEeAriOk2cHAMYA+kSOUGLdyu9PeSOuHsEp+u5KrtQSzOc SrX4WFM81zP1eTn3O9U85lYqUVuHu8wo3fAmDIHMxpp/RlNVCCxJWhZceByYlVNAHcxz uAV+Y74PtfUL80Kuf2LHhRMaL9DRAyjfUX0qxOHm/pfWVu9ckSV5KMBWeAB9RMPAGVKX egHnuyVJbwsu+7eJp8s2FbDfu0CzZUd/hhrkoQqHxAKY6FLYyJbSN85ep8u8egeQNCPl bNrvzMaOQfROMm4plLrZQOg0rh+J6RvpCNLCeH1u735evjFlg0nKMdq7HD/1Rz4l2kJl Wi2g== X-Gm-Message-State: AElRT7Ee0zTYJHOkDwL1S7licBgLHEgK3cfepafD2i04vkfz5id3SWXA T5gI6Lv+02wZxqy+DPrahTl7zw== X-Google-Smtp-Source: AIpwx486DN8+yq+du0k+qQSl+nN6KjPkVcB/PM1Wof913SgviRcF5T935zJkvApGf4eM5HikxxMJWw== X-Received: by 10.223.136.146 with SMTP id f18mr108268wrf.57.1522169869849; Tue, 27 Mar 2018 09:57: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 93sm1622992wrh.46.2018.03.27.09.57.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 09:57:48 -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: [RFC PATCH v2 2/6] uaccess: add untagged_addr definition for other arches Date: Tue, 27 Mar 2018 18:57:38 +0200 Message-Id: <82fadd039625707fea89668cd50cfae24d19681e.1522169685.git.andreyknvl@google.com> X-Mailer: git-send-email 2.17.0.rc0.231.g781580f067-goog In-Reply-To: <cover.1522169685.git.andreyknvl@google.com> References: <cover.1522169685.git.andreyknvl@google.com> In-Reply-To: <cover.1522169685.git.andreyknvl@google.com> References: <cover.1522169685.git.andreyknvl@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180327_095800_266991_8AB5CCE7 X-CRM114-Status: GOOD ( 14.09 ) 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(+)