From patchwork Wed Jun 20 15:24:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10477759 Return-Path: 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 134A960230 for ; Wed, 20 Jun 2018 15:26:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02D3328A8E for ; Wed, 20 Jun 2018 15:26:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E967428F3C; Wed, 20 Jun 2018 15:26:54 +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 9DD4228A8E for ; Wed, 20 Jun 2018 15:26:54 +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=sANHLNE59En2UhWqWDOYHdPWwbkMNDw0YyZf0rlzkfY=; b=UcGYIN4DvNfTMsOdJ20ycqMuxt QkJnOF64IEHIt3yI2914BFSjOJzg+qUpEEmit2h96pkqpmvpOv9rUQUYeLbh/TphZR0cjMKrCxHNo T6CvXQQBTLtK2xDJ/LrucT7RIoI0G1dHdQX1De19BYsjYZO4vVSXFJQ+IHnOeb1akfmYDTr0MNois ozSGcjzruzSIRHnoi9ew7zFpfcJNVgBJy8jjNx/epPTzoCzPCyX9OjP9X7aYacxqM0QVKP1kAvZ00 9UiW3dQvxnsameb3Ee6kCiEC2OHT8FOpI08N49rdSQpr03d62CSoJJjG4iVYrrKpVn5vCI7K6XoOt FK6SwI1g==; 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 1fVf0L-0007SN-QL; Wed, 20 Jun 2018 15:26:41 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVeyT-00058a-Ls for linux-arm-kernel@lists.infradead.org; Wed, 20 Jun 2018 15:24:49 +0000 Received: by mail-wr0-x243.google.com with SMTP id e18-v6so3736453wrs.5 for ; Wed, 20 Jun 2018 08:24:34 -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; bh=XKjQm946wgqBcvKf36FFRVltlqNjqNquoHht/aDg6nU=; b=lEJigrz2OiWBxMqQ2GbgTMNaf8HM5o4WfSODpVX11gR3uVG3NYEkX6OOAxhXBkO2VM jomcNT4FHr5zvHDoAr14vO7x6jbK/mhwcwrRvRYcV3f14W3VEREc3BgU5Uu4PLBrMPvd AxlLMDnVf6PytDxds14J7F6wIztQmBZ8ZVXxk0wQd7oBiM5FB87jNG8Z8VbYARGtapY0 Jqj71BFYcO6Arm4MqZyQEoxU7h9jidia7mGzCLpPPKekORuZtnizCR4o1aemqWBVwI7r m/qrma4RcAX2hw+LUNMM9RiOQUTiUZer0boGMlOxJt1C6TjzUg1yXvyarAOiHl0ijDnv X7Uw== 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; bh=XKjQm946wgqBcvKf36FFRVltlqNjqNquoHht/aDg6nU=; b=aiKCm3YnGYT1w8H9M+BQzPCU2L3k9WXKEmxv8XcsUbn+wCeuEbg3Bd/n3LktNqpMLO j0YCBEura0ZPMKdjPVaDUphcGYjDVrXDVSQme48w5VlV3rJYcqEEff5yKiFLExzG1stw iToHQq04FuJeoIk0OVpEwTtSD5k64E4d2VopHSR2O1rsj937Abg8UX7MnU447MFVTLL0 1CERf4Hv6UroRftqWCIHEZDyeSktH+/2xJ7JJUpo+FzDux1Uuzo8yCbGdbwCtPvaMNPB WD+wOI8s1U2F6IqhvfCtB63ThtDhbyEUwlhykFybjYYCxHU6TXjw4PP0dHDVhNpVQxE9 cwLQ== X-Gm-Message-State: APt69E1GQCMSWDR182uR4sl8rZ7/AJgvEx3+q+4r02Jbrj8zNOKxigI0 v6BzW9oOW6VTixjQC2EAC75I/g== X-Google-Smtp-Source: ADUXVKKaG9tLMBQSmpdBkcvCAygtoJeNPH5U1f8+dJ0VYDreDtubosvrhkERRf+42VqZN8GkOQZ0gA== X-Received: by 2002:adf:a706:: with SMTP id c6-v6mr19077169wrd.61.1529508272731; Wed, 20 Jun 2018 08:24:32 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id c11-v6sm3959244wrm.65.2018.06.20.08.24.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 08:24:32 -0700 (PDT) From: Andrey Konovalov To: Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Al Viro , Andrey Konovalov , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , 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 Subject: [PATCH v4 2/7] uaccess: add untagged_addr definition for other arches Date: Wed, 20 Jun 2018 17:24:21 +0200 Message-Id: X-Mailer: git-send-email 2.18.0.rc1.244.gcf134e6275-goog In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180620_082445_735398_132D9D2B X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chintan Pandya , Jacob Bramley , Ruben Ayrapetyan , Lee Smith , Kostya Serebryany , Dmitry Vyukov , Ramana Radhakrishnan , Evgeniy Stepanov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- include/linux/uaccess.h | 4 ++++ 1 file changed, 4 insertions(+) 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 +#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