Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1003750pxb; Tue, 9 Feb 2021 19:39:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAobdhdyjytRJvFZjEUa3xwIYmLYrxEuep9IGmsB//7Ky760T+aph2NOfVm7DEKTQxDoX1 X-Received: by 2002:aa7:d1da:: with SMTP id g26mr1259422edp.154.1612928388427; Tue, 09 Feb 2021 19:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612928388; cv=none; d=google.com; s=arc-20160816; b=s0N0Kp1aom17Qy3nZviyLZrwtolsJ1idG8fVC9ewemmHnQHfkcwFFn8fW2E4OAgnvz VT4yi8ceNloIYPVDgwX46y+YfzzBjuNqJphihgT3KVXg0Dy8Pr+eCZRpmKadLzDxg3+/ e1D57/rT260TcpMJvj+NoYLZ3qo+oGLAyMPU61BndrQZeHdMnXnF5nedLlDm+e74k+y2 rc+iDAS5642HZDTp5DDMySEXDZixf84BECA/Z5nlQ9yfVakC75sOLATLYfeCcVQN7nQ7 S5xi9yI65ZMuPEnhE77ib0tjCxgQxzrEiNJbhHzPG+PC2j4Cq8ZjOx36Ye1JdKy7fEbT BfOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1LcsJPib3ykdKJkUyHq0slItdjG/aplCkHhRsVFDezI=; b=Ae5HB/1FXOQ8h7e4/0RSDHqTGKwVk1uxmdk5/SVYaKXESIAAfcTeV2LgKjraDG2J2s rodxp/ggoQgz101sS3eLBqYDBnHRHfwLk4Phyy9ulxqYBG3h6FHGCuq9GcB3ryT5nqef CRnV6PeF1uI4FEoNTffTnoa9Bz+8YoMxi+gW6u8qW+sfj5EFVs5Bj5pYntI1HceJsReU S/2NGcZmAjzdPmk9c9vmfpk6J00WHa0aPr15/FO1Va4EvMWHcQJISPN+CVdYlT/h1Hym m7fY51lqHdaFu/6rnFF7UEeT0zeBF8LeD6iNLGCdVp6KHq3r63EkXr4U3SVeFr/KaCL7 YM5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si418425ejb.459.2021.02.09.19.39.25; Tue, 09 Feb 2021 19:39:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbhBIMax (ORCPT + 99 others); Tue, 9 Feb 2021 07:30:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:41090 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhBIMav (ORCPT ); Tue, 9 Feb 2021 07:30:51 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 26F8DADE1; Tue, 9 Feb 2021 12:30:08 +0000 (UTC) Subject: Re: [PATCH] kunit: tool: Disable PAGE_POISONING under --alltests To: David Gow , Brendan Higgins , Shuah Khan Cc: kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210209071034.3268897-1-davidgow@google.com> From: Vlastimil Babka Message-ID: <91207d64-e50f-872d-10db-55153da41aec@suse.cz> Date: Tue, 9 Feb 2021 13:30:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210209071034.3268897-1-davidgow@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/9/21 8:10 AM, David Gow wrote: > kunit_tool maintains a list of config options which are broken under > UML, which we exclude from an otherwise 'make ARCH=um allyesconfig' > build used to run all tests with the --alltests option. > > Something in UML allyesconfig is causing segfaults when page poisining > is enabled (and is poisoning with a non-zero value). Previously, this > didn't occur, as allyesconfig enabled the CONFIG_PAGE_POISONING_ZERO > option, which worked around the problem by zeroing memory. This option > has since been removed, and memory is now poisoned with 0xAA, which > triggers segfaults in many different codepaths, preventing UML from > booting. > > Note that we have to disable both CONFIG_PAGE_POISONING and > CONFIG_DEBUG_PAGEALLOC, as the latter will 'select' the former on > architectures (such as UML) which don't implement __kernel_map_pages(). > > Ideally, we'd fix this properly by tracking down the real root cause, > but since this is breaking KUnit's --alltests feature, it's worth > disabling there in the meantime so the kernel can boot to the point > where tests can actually run. Agree on both arguments :) > Fixes: f289041ed4 ("mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO") > Signed-off-by: David Gow Acked-by: Vlastimil Babka ... > Disabling PAGE_POISONING fixes this. The issue can't be repoduced with > just PAGE_POISONING, there's clearly something (or several things) also > enabled by allyesconfig which contribute. Ideally, we'd track these down > and fix this at its root cause, but in the meantime it'd be nice to > disable PAGE_POISONING so we can at least get the kernel to boot. One > way would be to add a 'depends on !UML' or similar, but since > PAGE_POISONING does seem to work in the non-allyesconfig case, adding it > to our list of broken configs seemed the better choice. > > Thoughts? Agreed that it's better to use kunit-specific config file instead of introducing such workaround dependencies in Kconfig proper. > (Note that to reproduce this, you'll want to run > ./tools/testing/kunit/kunit.py run --alltests --raw_output > It also depends on a couple of other fixes which are not upstream yet: > https://www.spinics.net/lists/linux-rtc/msg08294.html > https://lore.kernel.org/linux-i3c/20210127040636.1535722-1-davidgow@google.com/ > > Cheers, > -- David > > tools/testing/kunit/configs/broken_on_uml.config | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/testing/kunit/configs/broken_on_uml.config b/tools/testing/kunit/configs/broken_on_uml.config > index a7f0603d33f6..690870043ac0 100644 > --- a/tools/testing/kunit/configs/broken_on_uml.config > +++ b/tools/testing/kunit/configs/broken_on_uml.config > @@ -40,3 +40,5 @@ > # CONFIG_RESET_BRCMSTB_RESCAL is not set > # CONFIG_RESET_INTEL_GW is not set > # CONFIG_ADI_AXI_ADC is not set > +# CONFIG_DEBUG_PAGEALLOC is not set > +# CONFIG_PAGE_POISONING is not set >