Message ID | 07836d7852b5c2d9588e28e4081a6f783689377c.1544445454.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5B7F717FE for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 10 Dec 2018 12:51:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CD3F2A228 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 10 Dec 2018 12:51:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A3452A299; Mon, 10 Dec 2018 12:51:16 +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=-10.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC2E62A236 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 10 Dec 2018 12:51:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 87B068E000A; Mon, 10 Dec 2018 07:51:13 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 801428E0001; Mon, 10 Dec 2018 07:51:13 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A3138E000A; Mon, 10 Dec 2018 07:51:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id 17D0F8E0001 for <linux-mm@kvack.org>; Mon, 10 Dec 2018 07:51:13 -0500 (EST) Received: by mail-wr1-f69.google.com with SMTP id 49so3503201wra.14 for <linux-mm@kvack.org>; Mon, 10 Dec 2018 04:51:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DGAUj6PSqqPDQJ5J6R6pKlBVa6bTvYS48OkmKh4Sulk=; b=mmG0k7EAuwfGHmo6qyFchn1usat0mSfVkAEHYLv1XRNjL+VDo48WQZqq4wDQbIEczb M5q4RhF2TnLsNeXPeT888BZI17fc3CFcPr8bHszORrZJQ0UxNnh3IQQPnjdZDxmbujgq wZQ88N+05uB2rd6fCwO7RODQPbX5RhmqF7uhjWZRAONnpifr6ZZbHGzso8YcBsBUMtjU Tl8dK4ZJ9KX6oKm9nHCY4e+z3O5CG7oTRjQU32XNC/7YpBLSLBsZfBb0pPEFFOEi8ShN RzPhHNbjygSy2QkJNpjWIy3oHlinMq4XvUyG8SgO9GSkpnLF+sAMUdavr3u5z8dz9fWZ 6rYA== X-Gm-Message-State: AA+aEWa8jFnC+ZyMJTcKDfHH31Q8e057XqINVxFcc6PqDz8MYIn6kwLr KqF0YhjeJAK9LqyvAT87gmGKaBuR/80LFQr6NSzf5WSgDhqHQnSiVmObxtmvXLz7XN7bbBs0GA5 NuCpjtVj/5GifpOPLPephPE5DMpWcjXKhckKBpVqRmacVFiqSxCvVWIE69chqwgOhBiyKydoGl3 yw0cwK0ZAOliWInLv7A9YzRd6UYkMyAkTkoqLLvI4a1YeB8WFr4wBDqWFXKA8scoK8q8jSTRLaW 1dng6oZeOrGfA5S8VnIBcF8dL9h1jYcjbeAqscE3YD4GAxMXIZJ5VwgKYoFt4OXbjq3hVRKDFJR JtEi/rUtjqvS9UeHvULFPlAHY514tuV8Z9cvf1nsc/M9bMtFXdCe2yF7FIIZNMNiQZQyEyqV9Sw + X-Received: by 2002:adf:83e7:: with SMTP id 94mr9763463wre.278.1544446272565; Mon, 10 Dec 2018 04:51:12 -0800 (PST) X-Received: by 2002:adf:83e7:: with SMTP id 94mr9763420wre.278.1544446271703; Mon, 10 Dec 2018 04:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544446271; cv=none; d=google.com; s=arc-20160816; b=jDM/4ijfZIZUFVStxpbyXW/mn02QrpDNeimrwQvpSMvU4zFlP6sqDFi5+kIkXNiVNb HZK4S8PTVeuYP7BCL+7qmpIHK2IEp9ugqKl5vZeDcmLkNQ01VRw/p1jpzW9ER9r9xSAc aY7/smKtaWlouoyuKV9DVZQb1NjLaF+K4Y7tCMa+vC4xUiwpShEZEhU5anv+KE1AAG/M l3lf/e0bcGVJPFAR5o4IZ8DpRI+mP/6gc2WeKfrXFT61LXDLGMgGnZEFjeBGukPK+kTl km9qejvXRpc8oezXPo3yWbVlqUAwXdma4MrB8P2QWnP5NPXnyRqJ5Ud3hHjZ3yjROgWt HQYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DGAUj6PSqqPDQJ5J6R6pKlBVa6bTvYS48OkmKh4Sulk=; b=iXG4B+VNn/6v4gL4PsOtcVfPI0m8bhJqNql1UOgAiC5LUvXrL8kgXcIWRp3+vTie48 0nAojS8KVclq5oI3aT90MsYUxEpOdJxA6lEUGpxZgUuqfU7IBQjn4g78YQ802fT7tXoq czbumDGDYBB1jBAEYtU65ZHAZXpJUIMkWH/avFdlRo9WfticXKa21MQZGN8R1CMkmo4n dydNHGlGdS31/lJdRSiz+avECUEyfZp+qT62ARBY8+4kLShpM4etk9LpQvR7yLLM5k2Z JH8bQtSa+ucnRr0iTeLgdVvmM3IiJxjIjVJYaNQ96Epur6I04UnfszXeWNxMQBOGUyTp /o/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gls6f17i; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f187sor7296713wmg.13.2018.12.10.04.51.11 for <linux-mm@kvack.org> (Google Transport Security); Mon, 10 Dec 2018 04:51:11 -0800 (PST) Received-SPF: pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gls6f17i; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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=DGAUj6PSqqPDQJ5J6R6pKlBVa6bTvYS48OkmKh4Sulk=; b=gls6f17iFdY+aaMHKZj2c6iqSD/1QrF4roruo3c5l5rPA1aVvvzHjI2CFqg/lmlOS5 QV5WzVIcjFGeG5EZOAQBUSLUhKGejG5O9B8bsP3m0ZDDbDXlypr860QwpgdjRFT3VtOy XxeDJnbsSvMDNeVg7Zd3WWKgfoYfCaUgEKOfQw5HnKoHFqbh4YmdPnz+wYY39XjVd+O7 nOiFe7/AFJYVdSf7VYpOu//HoHkRLNS028ysC6yapgWia3lzb7Jo2WuChJRuNCDkW4mV cPqpApKuM6RsIoZYmQ0wgoKMKNyLL+EL+mT4Ax0maE+25TL9RSBHw3MXHz8+SN4ZTCt0 F53A== X-Google-Smtp-Source: AFSGD/Wfd26kZrXesEpia2lo9KfLrUJNSZ6LeKcsVzx9h0ZIx3ectSG+FrTDJ+dLbEuGhtbGIsbJVQ== X-Received: by 2002:a7b:cb18:: with SMTP id u24mr10123577wmj.138.1544446271115; Mon, 10 Dec 2018 04:51:11 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:3180:41f8:3010:ff61]) by smtp.gmail.com with ESMTPSA id l197sm36893363wma.44.2018.12.10.04.51.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 04:51:09 -0800 (PST) From: Andrey Konovalov <andreyknvl@google.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com>, Kees Cook <keescook@chromium.org>, Kate Stewart <kstewart@linuxfoundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@kernel.org>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Shuah Khan <shuah@kernel.org>, 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 <dvyukov@google.com>, Kostya Serebryany <kcc@google.com>, Evgeniy Stepanov <eugenis@google.com>, Lee Smith <Lee.Smith@arm.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Jacob Bramley <Jacob.Bramley@arm.com>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Chintan Pandya <cpandya@codeaurora.org>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com>, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH v9 1/8] arm64: add type casts to untagged_addr macro Date: Mon, 10 Dec 2018 13:50:58 +0100 Message-Id: <07836d7852b5c2d9588e28e4081a6f783689377c.1544445454.git.andreyknvl@google.com> X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805-goog In-Reply-To: <cover.1544445454.git.andreyknvl@google.com> References: <cover.1544445454.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
arm64: untag user pointers passed to the kernel
|
expand
|
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 07c34087bd5e..3c3864ba3cc1 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h @@ -101,7 +101,8 @@ static inline unsigned long __range_ok(const void __user *addr, unsigned long si * up with a tagged userland pointer. Clear the tag to get a sane pointer to * pass on to access_ok(), for instance. */ -#define untagged_addr(addr) sign_extend64(addr, 55) +#define untagged_addr(addr) \ + ((__typeof__(addr))sign_extend64((u64)(addr), 55)) #define access_ok(type, addr, size) __range_ok(addr, size) #define user_addr_max get_fs