Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5895207ybv; Wed, 12 Feb 2020 02:12:38 -0800 (PST) X-Google-Smtp-Source: APXvYqx5BY7voU+lqxskSn/Jc1VIgJbjzglrFSUMsAcY35n+F5crhNZO5e3Cv+g5XRhb2wYXdDgm X-Received: by 2002:aca:2419:: with SMTP id n25mr5770523oic.13.1581502358151; Wed, 12 Feb 2020 02:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581502358; cv=none; d=google.com; s=arc-20160816; b=0noBbMtvbounOjt6dHF8Xpbc/0DZH0poG162jgp7cpj8PiTekoILFW2sfhWJ82At71 6YteKJxxfDuDtievzYJS3d1u29dp6DHul3gZXWOOm8iDwg4oPxC8hIw6CChTJpnNwfwq Tz1FC4ZmDWJkK4QeTHIfkaBD+bZcK2Xy2EY4z564mczmv2AaerugNHdEpce03jJneYXm UoKLEkMWEqe5c3AoPv9bWZQ9l9p0gtgX6Zh8BQfOe04o8xk6W2v7WaYjcQtmx010JdZV RgtdUfzX4T+wGaPE4He3XsWwkB8RlXJzEF0iKNb1czriQ17+OhIEH41r0/cbmTyvNuRh V1pg== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=KF/rQa9b+YDdw75c1nDcpos7LuX+EOPNM62K9KllEpE=; b=RT7zcDF0L0kCY1N9AJJSnOvfH6uIP9UHzrNJk5zwGUwbGshwbW53pakXucEts+N0bf 5EQ0dwKxRSu6VJpeb/CYcKqL4jcHyNjTvUO3n/CEyC86DjqZqWV5msAlP+WZ399jglFQ pKA5vZpzRIaBisnWrxNvxT2anMyNTP2tYs2GJh/oE+502sps/yCnenl9TKL174vMvuzK aceh/MKyv+jOT15PU3nt91d8AfW/QSVybC0RylFTUgsAYHeRwQE662GjIHoVEbQuwvn7 d89vBcwcllGOWRTsIvCAYHH2ApGbvAHb62/VRd60fgvHEOg/i/WGPwmkIINJF6QyU3P5 E0vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=l9MckMLM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si2984717oix.155.2020.02.12.02.12.25; Wed, 12 Feb 2020 02:12:38 -0800 (PST) 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=@axtens.net header.s=google header.b=l9MckMLM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727602AbgBLKMS (ORCPT + 99 others); Wed, 12 Feb 2020 05:12:18 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34923 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgBLKMR (ORCPT ); Wed, 12 Feb 2020 05:12:17 -0500 Received: by mail-pf1-f193.google.com with SMTP id y73so1019558pfg.2 for ; Wed, 12 Feb 2020 02:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=KF/rQa9b+YDdw75c1nDcpos7LuX+EOPNM62K9KllEpE=; b=l9MckMLM6VWO1ur/vOxwH7Ki/VdQKc3ohUWRt7Z+z5CEQdKhRYppYU0suH5JuIRRlW zMhhtPNhmyl6LV8NVVEBOxpA493MJxADljyEKDs7i7DResuH38OdDodI3gJp2XbHbmzF pl4+t+bEOXPrykcn67P2WFq+uELfWizH8f2Yw= 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:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=KF/rQa9b+YDdw75c1nDcpos7LuX+EOPNM62K9KllEpE=; b=Y+JbzucXaC5OeCltyffgw+tCeCNVDw6qHAkhjyP53XwP14Y50e9ti+FCuGUlqSuny/ yy/VKTvliqdFy9czY++DFnC/tPektLyvxHxUPorC+hwCGZZzvDxqYg7ffTVR9K6GX8Eq Uy+/pmuPa/bNKUq22j/RM2QaT/BtKpmSRcXEqsf5m+sFCkF86BKosHRA3IDP/rpfBtKg NA50wmbWKNEBpTRnksdyxjCgEFw8f6PQ1IoRmlQZL7F4lZ+loQ64F7LO1286wdOTAXMo 5x7CPbyIapwmGgjvqkj1w4z3brX/vJ0Z4RdVTW0Bg4yFROYq3TKfGgh9KUV/fYvAQFRy LZkw== X-Gm-Message-State: APjAAAUkl0wW0MUwpGs/BMLxHgFEdqxMkW41ctMlJDFg1K6RcQyeTPCB UeY4ypWkTPcmcywQmDL54D92/w== X-Received: by 2002:a63:d44e:: with SMTP id i14mr7939813pgj.417.1581502336089; Wed, 12 Feb 2020 02:12:16 -0800 (PST) Received: from localhost (2001-44b8-1113-6700-65dc-9b98-63a7-c7a4.static.ipv6.internode.on.net. [2001:44b8:1113:6700:65dc:9b98:63a7:c7a4]) by smtp.gmail.com with ESMTPSA id e7sm190440pfj.114.2020.02.12.02.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 02:12:15 -0800 (PST) From: Daniel Axtens To: Christophe Leroy , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com Cc: Michael Ellerman Subject: Re: [PATCH v6 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support In-Reply-To: <224745f3-db66-fe46-1459-d1d41867b4f3@c-s.fr> References: <20200212054724.7708-1-dja@axtens.net> <20200212054724.7708-5-dja@axtens.net> <224745f3-db66-fe46-1459-d1d41867b4f3@c-s.fr> Date: Wed, 12 Feb 2020 21:12:12 +1100 Message-ID: <87imkcru6b.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > Le 12/02/2020 =C3=A0 06:47, Daniel Axtens a =C3=A9crit=C2=A0: >> diff --git a/arch/powerpc/include/asm/kasan.h b/arch/powerpc/include/asm= /kasan.h >> index fbff9ff9032e..2911fdd3a6a0 100644 >> --- a/arch/powerpc/include/asm/kasan.h >> +++ b/arch/powerpc/include/asm/kasan.h >> @@ -2,6 +2,8 @@ >> #ifndef __ASM_KASAN_H >> #define __ASM_KASAN_H >>=20=20=20 >> +#include >> + >> #ifdef CONFIG_KASAN >> #define _GLOBAL_KASAN(fn) _GLOBAL(__##fn) >> #define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(__##fn) >> @@ -14,29 +16,41 @@ >>=20=20=20 >> #ifndef __ASSEMBLY__ >>=20=20=20 >> -#include >> - >> #define KASAN_SHADOW_SCALE_SHIFT 3 >>=20=20=20 >> #define KASAN_SHADOW_START (KASAN_SHADOW_OFFSET + \ >> (PAGE_OFFSET >> KASAN_SHADOW_SCALE_SHIFT)) >>=20=20=20 >> +#ifdef CONFIG_KASAN_SHADOW_OFFSET >> #define KASAN_SHADOW_OFFSET ASM_CONST(CONFIG_KASAN_SHADOW_OFFSET) >> +#endif >>=20=20=20 >> +#ifdef CONFIG_PPC32 >> #define KASAN_SHADOW_END 0UL >>=20=20=20 >> -#define KASAN_SHADOW_SIZE (KASAN_SHADOW_END - KASAN_SHADOW_START) >> +#ifdef CONFIG_KASAN >> +void kasan_late_init(void); >> +#else >> +static inline void kasan_late_init(void) { } >> +#endif >> + >> +#endif >> + >> +#ifdef CONFIG_PPC_BOOK3S_64 >> +#define KASAN_SHADOW_END (KASAN_SHADOW_OFFSET + \ >> + (RADIX_VMEMMAP_END >> KASAN_SHADOW_SCALE_SHIFT)) >> + >> +static inline void kasan_late_init(void) { } >> +#endif >>=20=20=20 >> #ifdef CONFIG_KASAN >> void kasan_early_init(void); >> void kasan_mmu_init(void); >> void kasan_init(void); >> -void kasan_late_init(void); >> #else >> static inline void kasan_init(void) { } >> static inline void kasan_mmu_init(void) { } >> -static inline void kasan_late_init(void) { } >> #endif > > Why modify all this kasan_late_init() stuff ? > > This function is only called from kasan init_32.c, it is never called by= =20 > PPC64, so you should not need to modify anything at all. I got a compile error for a missing symbol. I'll repro it and attach it. Regards, Daniel > > Christophe