Message ID | 5cb565e6a6b17eceb6590a33d84208f725cf8dc2.1542648335.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-kbuild-owner@kernel.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 38C7E14DB for <patchwork-linux-kbuild@patchwork.kernel.org>; Mon, 19 Nov 2018 17:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B1A829FD4 for <patchwork-linux-kbuild@patchwork.kernel.org>; Mon, 19 Nov 2018 17:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E85C29FDB; Mon, 19 Nov 2018 17:29:26 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D53C29FAF for <patchwork-linux-kbuild@patchwork.kernel.org>; Mon, 19 Nov 2018 17:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404196AbeKTDxm (ORCPT <rfc822;patchwork-linux-kbuild@patchwork.kernel.org>); Mon, 19 Nov 2018 22:53:42 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34605 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404712AbeKTDvh (ORCPT <rfc822;linux-kbuild@vger.kernel.org>); Mon, 19 Nov 2018 22:51:37 -0500 Received: by mail-wm1-f65.google.com with SMTP id f1-v6so6550092wmg.1 for <linux-kbuild@vger.kernel.org>; Mon, 19 Nov 2018 09:27:13 -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=1YhKty0PhBPSl7VZmDwGA+CXyNSRUPKrtcyaCeImY3A=; b=DnG4e1wJQP7UD6p6zIz57/Rv8pyRn6SQ8HJI0SVPFeiAkkFExKONMAX5F3DnTwyOah jlxMnrHVidMA0iBppEJreCsRSZSmTCkl/vQmtwv0zX6Sis02dF/q6YhQ0tuCy9MevN62 sQnySQ2k9tiaKs3VCMmHZXVu9sAg3dZd0ofuLPUfas+VFLIU3xWkBt67dN/j+gfvjNyn ADr69OpHpZ7rV9SYeeb6A5M6p0ilZbXkzmlesFgYR2iDng071A9Gvk8BwkHiV+uNzaQS iNToRyorfV5Ah8VewgqY0Tvh7DIQKHsYjgQbuZmxuHMlH5BYYFYK+ZXOLD1F3BODIn59 cHtQ== 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=1YhKty0PhBPSl7VZmDwGA+CXyNSRUPKrtcyaCeImY3A=; b=L271Tc91FzwH0AgCoaQBaaQjwaIBTrK/ws9nu/c1OiLAowdQcvW8F3Uce6qU0r6L5g 21A7dP4CsBTQr7XE7QMpWZNFG5Uy5e8pGYz2/z02VTN5+Fd8lrvbrDIRubxGw9ci4LNi xbkO+1yzYs4zBckVUXo2WCaqgHnCu/i7O0Owoa6WO34BJz4GwiOT/JzWZGhCKga3uhiQ 8XBRrouLiIvH43jD2fPqtZVkSR/wJflRi6SYtgAbPuoogJZ24HnImXntpaM4/+YQNhKx 1XdEHxjuKCkt8u4a6NKNElYjtRI388bIlr6mv2+miCgatoP33Lqcij8Tv+9mecMh8R+N 9Iuw== X-Gm-Message-State: AGRZ1gIOLunIF2YrhMamRuVap7XqnK3ERjN0FCVAD2slRnBGyZ7ONSKa gGVTfUo5Cil0i0sKDnNyA9yRKQ== X-Google-Smtp-Source: AJdET5erzvm32b8ZF3d92FQfSjsREk6d9aLRHY/YmUcwUo+OxmSXKpVoDAiZpQ39XDdOFZWvSxgUJw== X-Received: by 2002:a7b:ca44:: with SMTP id m4mr7741735wml.76.1542648432514; Mon, 19 Nov 2018 09:27:12 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:3180:41f8:3010:ff61]) by smtp.gmail.com with ESMTPSA id l143-v6sm23685190wmb.23.2018.11.19.09.27.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 09:27:11 -0800 (PST) From: Andrey Konovalov <andreyknvl@google.com> To: Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Dmitry Vyukov <dvyukov@google.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Christoph Lameter <cl@linux.com>, Andrew Morton <akpm@linux-foundation.org>, Mark Rutland <mark.rutland@arm.com>, Nick Desaulniers <ndesaulniers@google.com>, Marc Zyngier <marc.zyngier@arm.com>, Dave Martin <dave.martin@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, "Eric W . Biederman" <ebiederm@xmission.com>, Ingo Molnar <mingo@kernel.org>, Paul Lawrence <paullawrence@google.com>, Geert Uytterhoeven <geert@linux-m68k.org>, Arnd Bergmann <arnd@arndb.de>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Kate Stewart <kstewart@linuxfoundation.org>, Mike Rapoport <rppt@linux.vnet.ibm.com>, kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org Cc: 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>, Jann Horn <jannh@google.com>, Mark Brand <markbrand@google.com>, Chintan Pandya <cpandya@codeaurora.org>, Vishwath Mohan <vishwath@google.com>, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH v11 11/24] kasan, arm64: untag address in _virt_addr_is_linear Date: Mon, 19 Nov 2018 18:26:27 +0100 Message-Id: <5cb565e6a6b17eceb6590a33d84208f725cf8dc2.1542648335.git.andreyknvl@google.com> X-Mailer: git-send-email 2.19.1.1215.g8438c0b245-goog In-Reply-To: <cover.1542648335.git.andreyknvl@google.com> References: <cover.1542648335.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kbuild.vger.kernel.org> X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
kasan: add software tag-based mode for arm64
|
expand
|
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index ae741827039c..ddad7df77027 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -322,9 +322,10 @@ static inline void *phys_to_virt(phys_addr_t x) #endif #endif -#define _virt_addr_is_linear(kaddr) (((u64)(kaddr)) >= PAGE_OFFSET) -#define virt_addr_valid(kaddr) (_virt_addr_is_linear(kaddr) && \ - _virt_addr_valid(kaddr)) +#define _virt_addr_is_linear(kaddr) \ + (__tag_reset((u64)(kaddr)) >= PAGE_OFFSET) +#define virt_addr_valid(kaddr) \ + (_virt_addr_is_linear(kaddr) && _virt_addr_valid(kaddr)) #include <asm-generic/memory_model.h>