From patchwork Fri Feb 22 12:53:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10825945 Return-Path: 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 EA80713B5 for ; Fri, 22 Feb 2019 12:56:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D664C3242E for ; Fri, 22 Feb 2019 12:56:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9FD532462; Fri, 22 Feb 2019 12:56:12 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 7C6003242E for ; Fri, 22 Feb 2019 12:56:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=9Ke0VwbQ0JM3NSUCyOUsVE1/GahSyRGlJwJBYJbus1s=; b=EVmOcAE27VA6FD A/YQ6s7n1wuWZWGz0G9Hgl6N3Rhw7FR57ozu2oWiIzaPwphkC2MLW7zm0xKUB8nwTfbL0ii1XIeME NGYiwqZRXJGZhl7eGedy7u9VLWmO7ABvjXmV2IUaL4LUhvwsWjM2PLJdBDpZWnabUcXXDLSvrI/+X e3H6DU2SihMQEnOfZRo78sRMGygWRcROI2PNgyz9Hq8W+KAdravqJyJNIcxlHSh3RCILDp6Au6oJ8 f+w+w9ZVYuzTv3C2lFBPZuAIrhaGN5LbvFuRjnpxwjZR/xgqYHM2Yfu5ev8Tf1e++ai1McBPXfLJk 0OML/KV5NP2+3ByCgG6A==; 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 1gxAN9-0002N1-QP; Fri, 22 Feb 2019 12:56:11 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxAKf-00072t-BU for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 12:53:38 +0000 Received: by mail-wr1-x444.google.com with SMTP id n2so2246550wrw.8 for ; Fri, 22 Feb 2019 04:53:33 -0800 (PST) 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=Cci7ZilHiWLbA64Mc6AMOu/bLCyx/LwY/bSfReud1WI=; b=mN2rwWcXbmXv4T54C8g+dQZceONkqeqfDnfFBkdS/1z2f+11756LZtilFVL9vmN8Ub asXmJYdmjDVQkCK9dtCydjOWxr+KWTUU0EEaMipiA+1WfFsqs10CUXUyp5B+yuljcBc1 0C0tywzNl+KEsDi5E1V9a1Ws2dGSyCYbuw6oXbdAfIH3UZ7l6SUpfEF4GcTbMbPCNeeB Ot4+ZahceUY35FVe2YDPYC6Ax0ARG1yKOQgJNw51FBiolm56hh/XyUho+qccTDZViTri rRytDOGFcggeSEQD/tMlfRQXS2V8i4wpp47+jYCO3tkhuGYSljzEFFfYn0oW2evDAak3 2ugw== 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=Cci7ZilHiWLbA64Mc6AMOu/bLCyx/LwY/bSfReud1WI=; b=fekZLtX5LcvwFLQ/whfChilWsH+/7OZb3zgcmbbg/Q2ciJivxldMmzyX8zIFN37ABB IoOiQeUwrDOolLGJQL/OJ/PBnFJIVznDG0pafRTXC25L/hWnRS1Se+jpocSY23XB2Ble 4cN1XglEc8TYQOBFCsZe3HUiruI9pN6Auuqbw903KEhPGe4VEBgRSWR0tnNpvdNZu8rs yiMaKH1AmIVwJ24Vtcw8GZ6CWjZ7U//iiSdLMh61Gj7P4kQRbdbqR3/VrP1xd0kfsAUz 6DqrRR5LNe26Svdb3lrH2t67Bsv3pjzILb/+c0vQVEurFa0v8/5u1zLjINDmMMhKjMuo sB3w== X-Gm-Message-State: AHQUAubBteHosI9tiAttKhsekYGBRFP1x89C35qK7tX7rNI+EmoV+/1R TfDd9CNNO9ufQVMtoOAZt0lJZQ== X-Google-Smtp-Source: AHgI3IYNE5YTD6dA2Rm0c87bwvFj8qPgC6wZI8wCmOm2tGxzmyo49L1MzMubdg2VCbScaD+W4rhlpw== X-Received: by 2002:adf:f6ca:: with SMTP id y10mr2869999wrp.148.1550840011806; Fri, 22 Feb 2019 04:53:31 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:13:8ce:d7fa:9f4c:492]) by smtp.gmail.com with ESMTPSA id o14sm808209wrp.34.2019.02.22.04.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 04:53:30 -0800 (PST) From: Andrey Konovalov To: Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Vincenzo Frascino , 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 v10 01/12] uaccess: add untagged_addr definition for other arches Date: Fri, 22 Feb 2019 13:53:13 +0100 Message-Id: <2b5a5d7d7a36a75a2a796f0c2b9b30669d81d470.1550839937.git.andreyknvl@google.com> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190222_045337_569316_438C38D1 X-CRM114-Status: GOOD ( 12.15 ) 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: Kevin Brodsky , Chintan Pandya , Jacob Bramley , Ruben Ayrapetyan , Szabolcs Nagy , Andrey Konovalov , Lee Smith , Kostya Serebryany , Dmitry Vyukov , Ramana Radhakrishnan , Luc Van Oostenryck , Dave Martin , Evgeniy Stepanov 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 to 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 architectures other than arm64. Acked-by: Catalin Marinas Signed-off-by: Andrey Konovalov --- include/linux/memory.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/memory.h b/include/linux/memory.h index a6ddefc60517..fc383bc39ab8 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -21,6 +21,10 @@ #include #include +#ifndef untagged_addr +#define untagged_addr(addr) (addr) +#endif + #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) struct memory_block {