From patchwork Fri May 25 17:21:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10428119 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 A2D24602D8 for ; Fri, 25 May 2018 17:23:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8946529705 for ; Fri, 25 May 2018 17:23:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DEB52972B; Fri, 25 May 2018 17:23:51 +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 CCF4C29711 for ; Fri, 25 May 2018 17:23:50 +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=DKxzDMfRndVrJUeQS+0dk2f2tRGbzdVJewmKCvZsDtE=; b=l7ApN1+DFVAz1UxRi1mAex2cXX zFs6cGO6uR+CsM3FtOo5LRL1RIFZogrd94pgT0WVKsRAXbQTzCOZcCcGXLAfGBjx1gxIb8V0dMEED F6cDzUB5mgwbuxUA3+Y9SgIERywoOZzBvh+j6gZyovEI7k0F7AbQeCxmXrO2rl+pFFw/eJpOGs91d M5COzDR2Qx+9UJxLNxzRvhPAqKjarcmQZw2oMDT2iQ3nU/e31Qumi1NzImMBFNbSZ01zH1mff3oB7 RZRotjt1TjtPE7JxEDHEmZG3R+eVhq/Z+LFPEcQYqzEcGX2pWD6b6g451jR9y1rAq+BRsCuQ/28VR eNmKUkzQ==; 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 1fMGRD-0002YV-Hm; Fri, 25 May 2018 17:23:35 +0000 Received: from mail-wr0-f194.google.com ([209.85.128.194]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMGPG-0001cv-SI for linux-arm-kernel@lists.infradead.org; Fri, 25 May 2018 17:22:11 +0000 Received: by mail-wr0-f194.google.com with SMTP id w10-v6so10443810wrk.9 for ; Fri, 25 May 2018 10:21:24 -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=ZDgTBkc7SgtSMHD63ovogp2w1o0H2E+utv6QzLdbKbE=; b=CWX2KrxtOpOGEhzQyMghOdwHK2k6aPH3o7eD3rNp8WSLhYe0UdTc042AN8ik/cwOWc x9hQeNVDL8PxiCrCBp0iDPKGYbfjmv5iUZZG/ReZsXe5eO0oSnrMIYju+BlmlnHvvI2s vFwmZ6WoxDfmFQSS0yXGCfEnWDW5AWfooh19S+g5u3Zef/0344xDlJ34NPWtnDZDQwea /htXuR2NK85coCDPG7azc5VoiRrW6gus1MfAmaNZRtx+zvQuvwgjT7SAiSJjYj8Ixsye XpA73/ICdqmO2ybICF4N9DRstkCLBjufVzOA4sS/u8Z5Ykhwub2ec3A2+OUUzAiLVDX2 E5/w== 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=ZDgTBkc7SgtSMHD63ovogp2w1o0H2E+utv6QzLdbKbE=; b=rKmX12G8NHp1o0HDdjxo7idEHW2lNRInUrqTghNZuru9+LV2Z+1JMJ1aG+EDjlBPmy 8RVmlejTzjzQ8lli8lmuqhFW875uo6TQABtRhXudNM4lS+LBPmNL9pGZPIDc4bAXx7cX grISwcIUnPy6+DD2/7ZSFT/2iqW+jbl9F8iEptJxRaNT/8P36Pt6eE9Qn4nVzifiYcch HFxL5UPA026K7tHAIuUPcvksrmgdlyzM/PCQhiyFOajtE1D+pRvia3P1iVchXWfbfgMd C7Lgc4UUCGqQuHfIp6rGXNaSum6ORHL9w4GusN1/gOsDPSGQfORqqtSQfo3e4FSggM5L rT3A== X-Gm-Message-State: ALKqPwdwRBZOTK66uXkukZTYCCz+u48M0SagNHIYPnAuWjsx6xiTtKwp BWf8Do/DqJG1tiuI8g6A6GA4kA== X-Google-Smtp-Source: AB8JxZqdncVPgboUx+muPIF6UZylHBYvo3cLcj9D5apljZ+baBrO3bD8dYoz6bx4+7Zz/q2kAv0kFg== X-Received: by 2002:adf:80ad:: with SMTP id 42-v6mr3255242wrl.211.1527268882429; Fri, 25 May 2018 10:21:22 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id s5-v6sm26579964wra.48.2018.05.25.10.21.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 10:21:21 -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" , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/6] uaccess: add untagged_addr definition for other arches Date: Fri, 25 May 2018 19:21:12 +0200 Message-Id: <8213858e15e7ad5f27cccb442a62db141269c973.1527268727.git.andreyknvl@google.com> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180525_102134_954341_85B7072E X-CRM114-Status: GOOD ( 13.95 ) 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