Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1303155imm; Tue, 2 Oct 2018 06:14:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV614IQnq1YlcTNCrlwqPbW84aUDSwcg4M4oXLzY0fwyCjYdm1yRc8J1dKJOjTm20+J2LFxyb X-Received: by 2002:a62:3995:: with SMTP id u21-v6mr16370846pfj.116.1538486069542; Tue, 02 Oct 2018 06:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538486069; cv=none; d=google.com; s=arc-20160816; b=wOg93vvomP6ueEOcztAzVab5TzMMUnbkkyRQF672M6n+74tVFK7gx4fi4n5zkE9vPK G9oYL8a+1JuexPtFIkI30a8VPOvMTSGtHvEL0xCMvaho9kBLv02sRdQLEAwjvTYCzhNW itRuN5J0hurhpfZTeGx2x2aHoqDZcthl1ZAYzbrOvDijjUQz1azpHj0KrKYesVNv6PU8 GIDqBfvOjKqunL+8mY3DdK3GAhZmbUcsdYvnyRAu1rtFLl7BOH5uHRKJcIpMUMcRB7Bg 5vkO4aGT3hv+SYj1vQwDck1XR3LU8LiTfRBLgjlXuYnwki8bZ8h80usay8RAHDp7dEe4 gLAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cq3vN6aPcQwtnG7Yk3tP2XwC690M9TeiFA6EGKo+spg=; b=APFlIa/SxiwRmNnHBeVicLloy0iVrCP764gnjMFQLsItBPQNMNhATX+d94H5bNSCW0 wO2+0vn5CElmAZNI07LqfzMztiVefwTqpd/od30HxTjlTheODSPMQrHKCNb3X/vCpcsB E2OwHxacAba3AwG7alkmBXGwWg9YOyV8u2wONtqBpWvQRTG/2FCzD+nWO+hK0l+QCexZ 7i1DchZqcnQKR3vScSwTtl5+oHSgMitGGtZUhkxMvIXPfTZkBS+tMGdJXofGSj7G+jrD XKWTd7hj8XovtUI3/s8W6OOLGeCJrFVuDQ66ocabNHtZylvArpvxazg6Xn1vuMCCKMkY Fb9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wVK2wJsB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187-v6si16502797pfg.122.2018.10.02.06.14.13; Tue, 02 Oct 2018 06:14:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wVK2wJsB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728003AbeJBT4I (ORCPT + 99 others); Tue, 2 Oct 2018 15:56:08 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43287 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbeJBT4H (ORCPT ); Tue, 2 Oct 2018 15:56:07 -0400 Received: by mail-wr1-f65.google.com with SMTP id n1-v6so2160331wrt.10 for ; Tue, 02 Oct 2018 06:12:49 -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=Cq3vN6aPcQwtnG7Yk3tP2XwC690M9TeiFA6EGKo+spg=; b=wVK2wJsBGU5FIzxsuMJcgTdTL10q6LtoeL+UENspJKFgA0RDNTzi9Wn5gAyDr+6Szv RncY5kWukrU8NwSkp4uPffTL6eb+JtiBGH/Jp80QDfaMmzXGUpB7izMO5ZlGKrJ/c+NM S3mjkFvCJ3ABkch+sQLZcNPA/SdENdR9ieF/M8THE6aUPYbQYb7DD3n9cIvpFuI7qLT3 +ZUu1kES5j/a2JYULJs6Ry0XZ+RqRXQI2jOIg5lPqOT26QlkW3W+kKGlm1f1B+9coovo V0zbhgSer4xnymtNsXnnPFCfur591TOZxRATREyyigBwTz3+tXsZi3uIwP51Q2Zc36uq h/rQ== 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=Cq3vN6aPcQwtnG7Yk3tP2XwC690M9TeiFA6EGKo+spg=; b=Jtvj0Djov+gFVtt5ZOnMkdwqj56siPc0EdYd6lDwxDdvi17lTMjroPnOuqz7dmI29V B/JjGilw/GxrTm7We5vhN80WqsFS1qOHgsIZkl9GiJ6iDlBnpkevDDWo+CiqT4ImJ5Zt l8Z3fF/EsP/5bpBoW4eMN1+yQB2in70TfV6CUkXEEswXNhd174WYHw3gHOmWiA5Rkz0D 546ak5nRdEbFDs15oX6o8dezhkvMbsNTOJZeupFh+bHqvxnr0ospdKvLSZxDTAXOGyCc WkuNbkC57taruazOYivRA+HBRvhjWVmbp3EDQUOzyDBTHNBi3w0qCINEEgPWVPAimbeh rM3Q== X-Gm-Message-State: ABuFfohWDYIdyitpEsbovyyB/OiC2r0jgsYYPrYlitK3PAUJ/x92lyPe y/Fm+FjcMmmV/QqvHvvYagtbLw== X-Received: by 2002:adf:db8e:: with SMTP id u14-v6mr10999323wri.217.1538485969081; Tue, 02 Oct 2018 06:12:49 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id v10-v6sm17458681wrp.0.2018.10.02.06.12.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 06:12:48 -0700 (PDT) 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 , 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 Cc: Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya , Luc Van Oostenryck , Andrey Konovalov Subject: [PATCH v7 2/8] uaccess: add untagged_addr definition for other arches Date: Tue, 2 Oct 2018 15:12:37 +0200 Message-Id: <1ff6af9a9ab1f716d0ecbfcfe6788a02e21b7480.1538485901.git.andreyknvl@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.19.0.605.g01d371f741-goog