From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com ([195.60.68.17]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6tgv-00HAsI-NY for linux-um@lists.infradead.org; Thu, 30 Jun 2022 12:54:43 +0000 Date: Thu, 30 Jun 2022 14:54:34 +0200 From: Vincent Whitchurch Subject: Re: [PATCH v4 2/2] UML: add support for KASAN under x86_64 Message-ID: <20220630125434.GA20153@axis.com> References: <20220630080834.2742777-1-davidgow@google.com> <20220630080834.2742777-2-davidgow@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Dmitry Vyukov Cc: David Gow , Johannes Berg , Patricia Alfonso , Jeff Dike , Richard Weinberger , "anton.ivanov@cambridgegreys.com" , Brendan Higgins , Andrew Morton , Andrey Konovalov , Andrey Ryabinin , kasan-dev , "linux-um@lists.infradead.org" , LKML , Daniel Latypov , "linux-mm@kvack.org" , "kunit-dev@googlegroups.com" On Thu, Jun 30, 2022 at 11:41:04AM +0200, Dmitry Vyukov wrote: > On Thu, 30 Jun 2022 at 10:08, David Gow wrote: > > diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile > > index 1c2d4b29a3d4..a089217e2f0e 100644 > > --- a/arch/um/kernel/Makefile > > +++ b/arch/um/kernel/Makefile > > @@ -27,6 +27,9 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o > > obj-$(CONFIG_STACKTRACE) += stacktrace.o > > obj-$(CONFIG_GENERIC_PCI_IOMAP) += ioport.o > > > > +KASAN_SANITIZE_stacktrace.o := n > > +KASAN_SANITIZE_sysrq.o := n > > Why are these needed? > It's helpful to leave some comments for any of *_SANITIZE:=n. > Otherwise later it's unclear if it's due to some latent bugs, some > inherent incompatibility, something that can be fixed, etc. I believe I saw the stacktrace code itself triggering KASAN splats and causing recursion when sanitization was not disabled on it. I noticed that other architectures disabled sanitization of their stacktrace code, eg. ARM in commit 4d576cab16f57e1f87978f ("ARM: 9028/1: disable KASAN in call stack capturing routines"), so I did not investigate it further. (Note that despite the name, sysrq.c is also just stacktrace code.) _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um