From patchwork Tue Apr 30 13:24:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10923459 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 123FE14DB for ; Tue, 30 Apr 2019 13:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0004C27EE2 for ; Tue, 30 Apr 2019 13:25:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6A922860A; Tue, 30 Apr 2019 13:25:29 +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 9A81227EE2 for ; Tue, 30 Apr 2019 13:25:29 +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:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9PEZ3KK/nKyXf8eUDtYSzs+Wci2AdoT6VTVEwmrCnsk=; b=KXfCkqfw9N7dHR JqyawZnmb7IkJX4l9f9lAGxBtnlxMWX1z2e/RykzNSaZy43NNgi3oaG8C0wW6X4/oW4dja5JaCJp9 3lDgtjPP3gVLS8bXPUNrQG+kqVXS+PlI+tsdxP/4sImGk1KRvOn/b/PF2h60iwgvlTxBXua3yDT+t JI01T87amqBu5f3Majm79myHGIan0DtPNznjmTHwWDrALHtYC/i1kzvxo+rTGpPIa6Clsv3GRH3/m AWAIXS1xe4NdAtHbQ6Dbh0V2ziXR59S++qOaB3F2xYJFj8nl0CyG6pSq/QIZE2eSQBNNjLoarOcPQ xdXUlSZTkVgmBBJH6axg==; 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 1hLSlB-0001UP-64; Tue, 30 Apr 2019 13:25:25 +0000 Received: from mail-yw1-xc49.google.com ([2607:f8b0:4864:20::c49]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLSl8-0001T8-1X for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2019 13:25:23 +0000 Received: by mail-yw1-xc49.google.com with SMTP id i5so6702891ywc.6 for ; Tue, 30 Apr 2019 06:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Yt+PWI13/w7NMYz3zwPrNGqq+ReXtpTWddPqmKmBKgk=; b=jG67MQO6uSTq+PQJ7NLS3u3pGPqYxBD6j6Z7zSYau7uP7jvgt3bFEq3faUxv1qOiIb Lhjg89Y6A0R/eNow3E4oC26RwU4x5nya0AVoMdWDIBSbYBBhFLCViwOATovkHqYFgw83 hOVUMM4j6unbJMoC5S4qfPmdZGJuwasxoQN5pLBzNoODYCmMWIdN+DK/0OhTFTFrX99t 6EDwehqEld5biejrj0QAkLSZAfR6m8nobezuReC4ugk/eXbqiTH4l+ivloQAzM7wUwIe NZAar432hbtNkfGtL2tuOjYFn681Ww9UC8SmNz4UpJpUm1tSs7E6peMLsrX4yxW2SbA8 caHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Yt+PWI13/w7NMYz3zwPrNGqq+ReXtpTWddPqmKmBKgk=; b=Y0e3HeiULESXmjfkxJkchFVkkFenm+iQM4qbGoUbEKU+cLdUIi3ssxGzi3qo5IWO9k jbno8SlVWaQq9xUZJnMLQ6j0CR7XHEYoN0/uH3b4SZdjiupWckt8qU/SyjDk8t1OsZ5B 4eZMQavT30Vuhq9RFS9Sly5XEUGjAfk/nOk6fvKNxAFByf5hXaiD/7ZQD+7TFZ6QwlvD aBVg0wiTU6sZ1UE32xuY3PrQTp+H9O6pQp5mtkSt2qxtalo6t1bCHWTbQ65OO8UoRg78 zkg3QZvlqPPazPso7tt8l6wfg4Dq83CRVODV+KGDtClGETUtjTeRymnLNaPXAe8oWgGh oEFQ== X-Gm-Message-State: APjAAAVi26mNgRPR+LyaNeVVGUjTQRwhMoqh+tgJ4tb4c3MUVBW84obA SeKKw7Eqs+plIp9PF1Ep+g2KUKVb5nXTfbXhpdI7+zvzGO9qD1uVB6tf3afOYteunyn0qcXoy0K pDcnBaM9H3Omo88W6SNa2gxliIgC4S1gej5MTc5Nxac910YrRVNwdxRXqIV8YsMfboSZHF0Z58p ayE2ewj3cvyx69ZU4= X-Google-Smtp-Source: APXvYqzn+VCXcz3/MPYUKI1STEW4oOzSku7o6dMmFF+1zuaxsiuVuMrbdGrvK+1IRDapYK9+TGfb+TbRJGhClYr2 X-Received: by 2002:a81:3d51:: with SMTP id k78mr56599045ywa.106.1556630720203; Tue, 30 Apr 2019 06:25:20 -0700 (PDT) Date: Tue, 30 Apr 2019 15:24:57 +0200 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog Subject: [PATCH v14 01/17] uaccess: add untagged_addr definition for other arches From: Andrey Konovalov To: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190430_062522_092108_72E795F8 X-CRM114-Status: GOOD ( 10.05 ) 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: Mark Rutland , Koenig@google.com, Szabolcs Nagy , Catalin Marinas , Will Deacon , Kostya Serebryany , Chintan Pandya , Felix , Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , Kuehling@google.com, Dave Martin , Evgeniy Stepanov , Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Andrey Konovalov , Ramana Radhakrishnan , Deucher@google.com, Alex Williamson , Mauro Carvalho Chehab , Dmitry Vyukov , Greg Kroah-Hartman , Yishai Hadas , Jens Wiklander , Lee Smith , Alexander , Andrew Morton , Robin Murphy , Christian , Luc Van Oostenryck 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/mm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 6b10c21630f5..44041df804a6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly; #include #include +#ifndef untagged_addr +#define untagged_addr(addr) (addr) +#endif + #ifndef __pa_symbol #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) #endif