Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4377562ybc; Fri, 15 Nov 2019 03:47:01 -0800 (PST) X-Google-Smtp-Source: APXvYqw6s4Op/7LyQimlyPu7FyfA4o4MrTIi/qcT+ZsVNQ+udAiRq32ol3BJzTN59AcBWiIdf2TG X-Received: by 2002:a17:906:74d7:: with SMTP id z23mr315553ejl.1.1573818421662; Fri, 15 Nov 2019 03:47:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573818421; cv=none; d=google.com; s=arc-20160816; b=qvyMb1oh1cpT1RXx6igXE42Yq3/GU+xqctopAOXD+S+DPvFPMI14CIN5Wf1Rll/Jbj PAboNB016TvSB+SJTwznPTJaolI5ly/mbW2g45OpGpxZGeMGR9TE5Lhb68Cm51natyFN 6SrDPEHN1Wdr6Ht4gTiYntrmbGEZdfR4UxhufFYDSTmi7f6aWkQW4c2D91Qg/RSO3TyM IxGgRUWcKIBbgP/piyTw4aFGhr8Hntd2lJfMJz9J7QKhwhSEPY3XvHPUZeAt2XC2k/Fx SbaOtmA3RNfmrJ3uJQZAF7uZjPIc4wDeXpO3TGLTwGF9d00EnTvhxfIWv59n09j8kSPB uXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vQ5lcC3H4qOgke9+oJRcyPaE03+uFexHlMr3n5xn+Xk=; b=U1pk1qvqgc623ZtduGpUW7JrHnb+TtwF/Smh8BdJdqlRRqvqAEpW0NfyJsFzIMBdRK pEGslc9T++KDvtHPTVUq5r2sgh/WmvitWWk1c67zI9/wxZXCYpPDOV9oXma2O2BLIByd IzFIZ7g95mQ8pJ6rv+hF+Z3PI3y0iVl2dcM5Xh5tUpqCYYfsVO1ViztPQeH2Te4xeeci ueTuzF81vDhQVehMJBrBadY9MB7tI8sA26vnCFF0iUvNeha05G/KLnw+CJKqXfBxLQgN JoSfegRFPa8xKVx0ftz+269dDxubo5JMGzqc/oT6yBktC7A4kIAtMdHAzHKd65O/UxMm OKsg== ARC-Authentication-Results: i=1; mx.google.com; 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 p25si5143847eji.415.2019.11.15.03.46.35; Fri, 15 Nov 2019 03:47:01 -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; 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 S1727241AbfKOLpN (ORCPT + 99 others); Fri, 15 Nov 2019 06:45:13 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:53555 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727122AbfKOLpN (ORCPT ); Fri, 15 Nov 2019 06:45:13 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iVa1Z-0007QU-T6; Fri, 15 Nov 2019 12:44:25 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iVa1Q-0008K2-Ab; Fri, 15 Nov 2019 12:44:16 +0100 Date: Fri, 15 Nov 2019 12:44:16 +0100 From: Marco Felsch To: Florian Fainelli Cc: mark.rutland@arm.com, alexandre.belloni@bootlin.com, mhocko@suse.com, julien.thierry@arm.com, catalin.marinas@arm.com, christoffer.dall@arm.com, dhowells@redhat.com, yamada.masahiro@socionext.com, ryabinin.a.a@gmail.com, glider@google.com, kvmarm@lists.cs.columbia.edu, corbet@lwn.net, liuwenliang@huawei.com, daniel.lezcano@linaro.org, linux@armlinux.org.uk, kasan-dev@googlegroups.com, geert@linux-m68k.org, dvyukov@google.com, bcm-kernel-feedback-list@broadcom.com, drjones@redhat.com, vladimir.murzin@arm.com, keescook@chromium.org, arnd@arndb.de, marc.zyngier@arm.com, andre.przywara@arm.com, pombredanne@nexb.com, jinb.park7@gmail.com, tglx@linutronix.de, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, nico@fluxnic.net, gregkh@linuxfoundation.org, ard.biesheuvel@linaro.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, rob@landley.net, philip@cog.systems, akpm@linux-foundation.org, thgarnie@google.com, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v6 0/6] KASan for arm Message-ID: <20191115114416.ba6lmwb7q4gmepzc@pengutronix.de> References: <20190617221134.9930-1-f.fainelli@gmail.com> <20191114181243.q37rxoo3seds6oxy@pengutronix.de> <7322163f-e08e-a6b7-b143-e9d59917ee5b@gmail.com> <20191115070842.2x7psp243nfo76co@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191115070842.2x7psp243nfo76co@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:28:52 up 2:47, 19 users, load average: 0.00, 0.04, 0.03 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Florian, On 19-11-15 08:08, Marco Felsch wrote: > Hi Florian, > > On 19-11-14 15:01, Florian Fainelli wrote: > > Hello Marco, > > > > On 11/14/19 10:12 AM, Marco Felsch wrote: > > > Hi Florian, > > > > > > first of all, many thanks for your work on this series =) I picked your > > > and Arnd patches to make it compilable. Now it's compiling but my imx6q > > > board didn't boot anymore. I debugged the code and found that the branch > > > to 'start_kernel' won't be reached > > > > > > 8<------- arch/arm/kernel/head-common.S ------- > > > .... > > > > > > #ifdef CONFIG_KASAN > > > bl kasan_early_init > > > #endif > > > mov lr, #0 > > > b start_kernel > > > ENDPROC(__mmap_switched) > > > > > > .... > > > 8<---------------------------------------------- > > > > > > Now, I found also that 'KASAN_SHADOW_OFFSET' isn't set due to missing > > > 'CONFIG_KASAN_SHADOW_OFFSET' and so no '-fasan-shadow-offset=xxxxx' is > > > added. Can that be the reason why my board isn't booted anymore? > > > > The latest that I have is here, though not yet submitted since I needed > > to solve one issue on a specific platform with a lot of memory: > > > > https://github.com/ffainelli/linux/pull/new/kasan-v7 > > Thanks for that hint, I will try this series too :) I read that you > wanna prepare a v7 but didn't found it ^^ > > > Can you share your branch as well? I did not pick all of Arnd's patches > > since some appeared to be seemingly independent from KASan on ARM. This > > is the KASAN related options that are set in my configuration: > > Of course I will push it to github and inform you shortly. Here comes the link: https://github.com/medude/linux/tree/v5.4/topic/kasan-arm.v7 I just applied Arnds Patche which you didn't added into your v7. > > grep KASAN build/linux-custom/.config > > CONFIG_HAVE_ARCH_KASAN=y > > CONFIG_CC_HAS_KASAN_GENERIC=y > > CONFIG_KASAN=y > > CONFIG_KASAN_GENERIC=y > > CONFIG_KASAN_OUTLINE=y > > # CONFIG_KASAN_INLINE is not set > > CONFIG_KASAN_STACK=1 > > CONFIG_TEST_KASAN=m > > My config is: > > CONFIG_HAVE_ARCH_KASAN=y > CONFIG_CC_HAS_KASAN_GENERIC=y > CONFIG_KASAN=y > CONFIG_KASAN_GENERIC=y > CONFIG_KASAN_OUTLINE=y > # CONFIG_KASAN_INLINE is not set > CONFIG_KASAN_STACK=1 > # CONFIG_TEST_KASAN is not set > > > are you using something different by any chance? > > Unfortunately not. With your v7 it is working on my imx6 but unfortunately I can't run my gstreamer testcase. My CPU load goes to 100% after starting gstreamer and nothing happens.. But the test_kasan module works =) So I decided to check a imx6quadplus but this target did not boot.. I used another toolchain for the imx6quadplus gcc-9 instead of gcc-8. So it seems that something went wrong during compilation. Because you didn't changed something within the logic. I wonder why we must not define the CONFIG_KASAN_SHADOW_OFFSET for arm. Regards, Marco > Regards, > Marco > > > -- > > Florian > > >