From patchwork Mon Aug 6 16:40:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10557431 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 19F1A15E9 for ; Mon, 6 Aug 2018 16:41:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 085D0298B9 for ; Mon, 6 Aug 2018 16:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAF1F2978E; Mon, 6 Aug 2018 16:41:31 +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 44E0D2978E for ; Mon, 6 Aug 2018 16:41: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: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=7ErPk7T8JyWqifqb2ooqnGZE/WWeLkPBIOBbsUWPYNE=; b=YZQEzvE48O/EZt N3934p8+VIhn+M+s7ys5uEO+Nrnw9VwOw8hUZK7MK+8O/8K3qVKPtZgzTLqgq/WXHictmfY5tWRhe 2BSy0cSw1R+vREgxnjPNQP27eEfTveKvXnrxKztqGxO2BERUt2C8S9WZSbNr9g7M7VWeQqNM/m7j9 zy+6GuZmyW06EHQ9dLRJ+Jxa2w1Lg/ZnJD+ADLZSQFmi6dSTOXee3KfgHYcbwH+AVF0FiP3D8IKhZ 0rpj9beSeT28dn+C3HFzXbhvwH0W70oaiUoySiN72YYczqN9TIn+jfB6rjEqmed21/Td7xh3UAefe DTJ6ErPe8uP5x7egTVyg==; 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 1fmiZN-0007oo-D2; Mon, 06 Aug 2018 16:41:21 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmiZA-0007U9-8U for linux-arm-kernel@lists.infradead.org; Mon, 06 Aug 2018 16:41:09 +0000 Received: by mail-wr1-x443.google.com with SMTP id v14-v6so12996912wro.5 for ; Mon, 06 Aug 2018 09:40:58 -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 :mime-version:content-transfer-encoding; bh=YBeH5wb0hNzlivAoVU1htfthx3SJVx7ZblkVtJGW9ZA=; b=ZfDD4//e+nKU3Jk48Adjac7R2nCCq1HmUAoIcnD0wQGnnbJdjWUlD2Aytat6evC4LS VVCRE4GradGfF7mcdUatpkfkbS3oUExjCB/oJKRWeOgr7D4ns0ZdM/ecmR+rDEiJijY5 S5Sn5a3jb2HgFLP5cDZykHlUrABGLypRXZBcf03L4NF2mJDMuWsf2I0cBuuPGn4R+s/1 lH0SekuGSZvecQg1AancsSigJdj1Yu9rEv5ENqjlxw1iJ0P7zjekaIIfk0F3yh9DLnKi TZpN0Zr9j707UzVmqzktL466xYpXyXTkduX6zmE7Ee23DujIeKOV8ZkSblww3yE0f9TH 8Z4w== 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=YBeH5wb0hNzlivAoVU1htfthx3SJVx7ZblkVtJGW9ZA=; b=uSxQQP6TFg57IIuaFkXoCUEORXRfjjg7RuaXjZZaRR/nA0bx8vtW7+YKz+1tWPjihB tLc4YjlVLnc8LR9KOKlZUe9dpYZNM5yF8Zb7TFEVXH5fIrNmBmDqPpkCjbdUpuG3r6gS lOzNTx2G2YBOz/wG/fpGDSorK10qWeglRTne2mV2FNXWmXSR6RCvQD/M9kYJMuNVp+tQ M+t2E1i6gz+PclM33aanyeNq5k15bc1TicmbdE+R0Z3ugTIXFcnl7e4seXFK0mvqr9VD akmWf4B0ndUYMDd7xrX87G4/rWfrNha/8KYasqOd8eW4ByyjEm9h+x7rmQhLrrn9rV6i bkSQ== X-Gm-Message-State: AOUpUlHsnZJuxRQKlFHUa9Sx3cncA52Oe38GAkj+jHItSSetxHo9HH6X cOWjCMT0RbMst4Ec/v7C+mMeIA== X-Google-Smtp-Source: AAOMgpcsiooZAsa7Co5DL90XZQSeO75lLqOzA0ZY/k14f/rzEmHb2gPZjF9ufPSZOUffbBSYdCeBEQ== X-Received: by 2002:adf:91e5:: with SMTP id 92-v6mr10363242wri.124.1533573656582; Mon, 06 Aug 2018 09:40:56 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id 66-v6sm16385790wmw.34.2018.08.06.09.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 09:40:55 -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 v5 02/10] uaccess: add untagged_addr definition for other arches Date: Mon, 6 Aug 2018 18:40:37 +0200 Message-Id: X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-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-20180806_094108_300532_ED3B498E X-CRM114-Status: GOOD ( 13.27 ) 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 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, the untagged_addr macro needs to 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