From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02D97C433EF for ; Thu, 30 Jun 2022 12:54:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 803C46B0072; Thu, 30 Jun 2022 08:54:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 78E208E0003; Thu, 30 Jun 2022 08:54:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 654998E0002; Thu, 30 Jun 2022 08:54:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 52CCA6B0072 for ; Thu, 30 Jun 2022 08:54:37 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2ABA6202AA for ; Thu, 30 Jun 2022 12:54:37 +0000 (UTC) X-FDA: 79634896194.11.7530B9A Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by imf09.hostedemail.com (Postfix) with ESMTP id 2CACC14003A for ; Thu, 30 Jun 2022 12:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1656593676; x=1688129676; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=00xPuIlNNMZ8E6p+AtWP/6zDNpgBkiHKeyoEzjO0F/o=; b=oxnbg2MquyZ0Epj7DQMA3e9GOAvS7pcQTtfkPtIexZrA9F51OU8gNGhH Ft2dXajP/ljTFcasdLqvq/UbbWRi/7Blpb0JRYShbzWcin3xes+Y4Gcmx N9JPwL3aycuYO+pGP7CuXKWFj3rAmU7HectGYb6o96bYW2eUWB3dVGu2+ gw7R2QXiDULtBi3imc4Ebm7eVurTDqCf262wQKzyw1kmU0tgBKCCYwmj0 W960Y4OM077TlkCkDzPtD6xEwePeyRMITZBI3xS+4nKCKECQuA8Bh1wAD BtbKnAGkBu5XqyYrL26igKrFbmOeZSinaRYqXI0/PRA+Hj1GxpqMYKGXs A==; Date: Thu, 30 Jun 2022 14:54:34 +0200 From: Vincent Whitchurch 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" 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-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656593676; a=rsa-sha256; cv=none; b=WvByZFr0fgMATzn212AeI/HVuXPDHjMa62Re6M6zuBgcWo9Dy1Hv0SWQGWW6bdnTWHdxz8 4xOKUfjeQGP8FoPTyP2jtp0vsUYifofD1bg7nxhl1E0pYkz+mZaqFD2OZmCQ/lWYAB5QME /9CYE+kzYyHseXKwUHynADU5+3zuFs8= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=oxnbg2Mq; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf09.hostedemail.com: domain of Vincent.Whitchurch@axis.com designates 195.60.68.17 as permitted sender) smtp.mailfrom=Vincent.Whitchurch@axis.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656593676; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=00xPuIlNNMZ8E6p+AtWP/6zDNpgBkiHKeyoEzjO0F/o=; b=H/d6ZUA4kW/Mj9DWAdKy1OixPQhY5v8R6ZuLjz796GO1g0/+PsZjKDEsG3tk5UH6BeHMFd 3xBgT+REdEdOfzfBTDRDpKlJEFHkVyGL5fnE0vq+5dUlLvDQZiQhZcPYz3JOiJnv3yVLs8 NsfDEpSUh70OJKGh3vPN7BsGDOmi5ls= X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2CACC14003A Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=oxnbg2Mq; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf09.hostedemail.com: domain of Vincent.Whitchurch@axis.com designates 195.60.68.17 as permitted sender) smtp.mailfrom=Vincent.Whitchurch@axis.com X-Rspam-User: X-Stat-Signature: rqetuyb4erprp34ekb7j36rp78nnfazz X-HE-Tag: 1656593675-434971 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000033, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.)