From patchwork Thu Aug 13 05:37:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 7005971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E219BC05AC for ; Thu, 13 Aug 2015 05:41:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D76CC20629 for ; Thu, 13 Aug 2015 05:41:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E961E20615 for ; Thu, 13 Aug 2015 05:41:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPlDU-0007WP-Mr; Thu, 13 Aug 2015 05:38:16 +0000 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPlDI-0007Qn-S2 for linux-arm-kernel@lists.infradead.org; Thu, 13 Aug 2015 05:38:05 +0000 Received: by lbbtg9 with SMTP id tg9so21214423lbb.1 for ; Wed, 12 Aug 2015 22:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4+kXEZwGucGpDjGEiB3dGwFWOK58DcGd6PKAK1H90J4=; b=nWfrEp+6N/fQh0GoaSvk3D762v+QspVLtNz0aLMJeWdDVrYI842fBnUbTTLWBm5ZCk N6BIC1qdX/o7WSbVOl4+4qwCVIAVCXX+OLGgF0+DiS+irNuhKxGkKeivw8EJHiJ2YdlK Btf8ExP0lE1/Y7jm1+P4uWs2UdN9tQWeFDsweOPRZogwUbPkFMh9Sh8vBdFB26Oa0nWe 6HAF01rAYJ8508mU4hASbf8prsSE8PEMv2Ja89VSjs/lo0L1sop+Vqu5wrJgkXyQHdtt +GA93aJ9Ykt1GtiBk4+oOn7iliJnocTcj9SvWVNqEMnf8d0nv2GOaPwoykhOEJeAH0gy cCiw== X-Received: by 10.152.206.41 with SMTP id ll9mr34639222lac.103.1439444263136; Wed, 12 Aug 2015 22:37:43 -0700 (PDT) Received: from localhost.localdomain ([84.47.128.244]) by smtp.gmail.com with ESMTPSA id qm6sm256471lbb.23.2015.08.12.22.37.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Aug 2015 22:37:42 -0700 (PDT) From: Andrey Ryabinin To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH v6 1/2] x86/kasan: define KASAN_SHADOW_OFFSET per architecture Date: Thu, 13 Aug 2015 08:37:23 +0300 Message-Id: <1439444244-26057-2-git-send-email-ryabinin.a.a@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1439444244-26057-1-git-send-email-ryabinin.a.a@gmail.com> References: <1439444244-26057-1-git-send-email-ryabinin.a.a@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150812_223805_176527_7E1F304F X-CRM114-Status: GOOD ( 12.45 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yury , Alexey Klimov , Arnd Bergmann , linux-mm@kvack.org, Catalin Marinas , Linus Walleij , Will Deacon , linux-kernel@vger.kernel.org, David Keitel , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , linux-arm-kernel@lists.infradead.org, "Aneesh Kumar K.V" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current definition of KASAN_SHADOW_OFFSET in include/linux/kasan.h will not work for upcomming arm64, so move it to the arch header. Signed-off-by: Andrey Ryabinin --- arch/x86/include/asm/kasan.h | 3 +++ include/linux/kasan.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kasan.h b/arch/x86/include/asm/kasan.h index 74a2a8d..1410b56 100644 --- a/arch/x86/include/asm/kasan.h +++ b/arch/x86/include/asm/kasan.h @@ -1,6 +1,9 @@ #ifndef _ASM_X86_KASAN_H #define _ASM_X86_KASAN_H +#include +#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL) + /* * Compiler uses shadow offset assuming that addresses start * from 0. Kernel addresses don't start from 0, so shadow diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 5486d77..6fb1c7d 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -10,7 +10,6 @@ struct vm_struct; #ifdef CONFIG_KASAN #define KASAN_SHADOW_SCALE_SHIFT 3 -#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL) #include #include