From patchwork Tue Feb 9 07:10:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 1438137 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=NQmtgLoy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=Bb5HKfqM; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DZYw30CSzz9sBJ for ; Tue, 9 Feb 2021 18:11:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=9xdIQxQSpKHwhxwrlS+DE5YbZvk2Na9PpAw15LJPFCU=; b=NQmtgLoyuEZScjN8uEz8OjQ/6f GS4zLW34HfWaLuUp4iYVZwszb3nEnviTPXzPJNEgysQlVQoC5xZPKOkXXr9BoLgCyXOV88/SlbEuO XaCU3s0OGv26zwI5D0KlkmhEvua+TU9I6FVe9UqVs2pEcMUduaPBGGIIjd9WD3eO6vbp8Xyhx+FJ9 Tx02tSrggp40ZB4vCR8zoX7/TqmXQWjt2KRl3W5bHLkEy83BxwaMOWUQiBVUlKnuqAwSd4xWldMYb UrAMqS3993vRCE5w16/IAZB/56Kt4b9K4e+d1wfgMqd8QIpphp314QqEb4PsGJ4SFC2l2ejEY7iUM s9v4K8xg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9NAh-0001Xi-VG; Tue, 09 Feb 2021 07:10:51 +0000 Received: from mail-pj1-x104a.google.com ([2607:f8b0:4864:20::104a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9NAf-0001WK-3w for linux-um@lists.infradead.org; Tue, 09 Feb 2021 07:10:50 +0000 Received: by mail-pj1-x104a.google.com with SMTP id x5so1094574pjk.7 for ; Mon, 08 Feb 2021 23:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=hKso1MwLRLw8n4+Grqq4tnQrzP51F50oX7aHEUrMrFI=; b=Bb5HKfqMvcuXwLRKuIc/nM60N7hDs2c47YYZ6XuJx8vUW9hQmNBlsZdudbUsOmTt9W 25NVlfcONEgRGyjPOq7wb9lgFVq5lQ8IVBO4SrLEDCAHfnFUfJLP88AmiZ6ko4xj+zv1 J8NH5Z5F3fOuurrK6m9dEBIf0AE1jLI0esPgKg2+6ujWAFc/CIdL88E5zXEimKNtef48 FFnGOa4H0V5cULMnyJUpzW9rKH6nwmhl/g9jIn0YoW21jojQ2Nd7M7hHvMNsUKu5nbdL p16B6NjKKIltD23f7gmZByI1PbrSufoLBm9z/Yt6yUeqerwNf/y1L2iPUXje+Z5DKnKr sn6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=hKso1MwLRLw8n4+Grqq4tnQrzP51F50oX7aHEUrMrFI=; b=ckM+0xEKWz7fkgLJaTu9HzQhG69lSjmC67uRd7zSgTzFetJYPUtv78N0JgF4qtboUX 86SE+8yVPAPszG19OUngcZ3qMtFM9QMe02rewnM/z2yOKfie8Meoakjg74h8OGBtkHKP yIpjHlrGNcfKWsdozpCK9s6dmtzFt8/n0QuEBZyZBXPSV4+aQotlpNFGzKoCUlMzZM58 H0uI8Y49uzIT9YR0TfOTc26t9aekEEudRSZc+TfkTCbcjUWztOq+auAwhT2Bgwb9sl0X CwHyqvkq8XU7V3ULIdb/T5wpnDyw5j1If7v4XpSBondj3ywzqqrai3OqYkplR2SmpL7E Sk/g== X-Gm-Message-State: AOAM53008wP4l8N9pNmAVi+a2mtw611hX4pEycjQ0EEOUsF09OKba+Jm tTLo1KX1+fTcTUflr+vAuc+fkY058yq03w== X-Google-Smtp-Source: ABdhPJz2uyZNOUWxCh8+bTaw0WF2AyuBjDmjriJxozzN+RmdDvksIBD9JocSbE0wQEhImCMlRxv9hoQdlniMiQ== X-Received: from spirogrip.svl.corp.google.com ([2620:15c:2cb:201:e4e6:62d4:a840:252a]) (user=davidgow job=sendgmr) by 2002:aa7:98d2:0:b029:1da:3374:4777 with SMTP id e18-20020aa798d20000b02901da33744777mr13937516pfm.45.1612854641040; Mon, 08 Feb 2021 23:10:41 -0800 (PST) Date: Mon, 8 Feb 2021 23:10:34 -0800 Message-Id: <20210209071034.3268897-1-davidgow@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH] kunit: tool: Disable PAGE_POISONING under --alltests From: David Gow To: Brendan Higgins , Shuah Khan , Vlastimil Babka X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_021049_261438_338D0F66 X-CRM114-Status: GOOD ( 14.74 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:104a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, linux-kselftest@vger.kernel.org, David Gow , kunit-dev@googlegroups.com Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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. Fixes: f289041ed4 ("mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO") Signed-off-by: David Gow Acked-by: Vlastimil Babka Reviewed-by: Brendan Higgins --- As described above, 'make ARCH=um allyesconfig' is broken. KUnit has been maintaining a list of configs to force-disable for this in tools/testing/kunit/configs/broken_on_uml.config. The kernels we've built with this have broken since CONFIG_PAGE_POISONING_ZERO was removed, panic-ing on startup with: <0>[ 0.100000][ T11] Kernel panic - not syncing: Segfault with no mm <4>[ 0.100000][ T11] CPU: 0 PID: 11 Comm: kdevtmpfs Not tainted 5.11.0-rc7-00003-g63381dc6f5f1-dirty #4 <4>[ 0.100000][ T11] Stack: <4>[ 0.100000][ T11] 677d3d40 677d3f10 0000000e 600c0bc0 <4>[ 0.100000][ T11] 677d3d90 603c99be 677d3d90 62529b93 <4>[ 0.100000][ T11] 603c9ac0 677d3f10 62529b00 603c98a0 <4>[ 0.100000][ T11] Call Trace: <4>[ 0.100000][ T11] [<600c0bc0>] ? set_signals+0x0/0x60 <4>[ 0.100000][ T11] [<603c99be>] lookup_mnt+0x11e/0x220 <4>[ 0.100000][ T11] [<62529b93>] ? down_write+0x93/0x180 <4>[ 0.100000][ T11] [<603c9ac0>] ? lock_mount+0x0/0x160 <4>[ 0.100000][ T11] [<62529b00>] ? down_write+0x0/0x180 <4>[ 0.100000][ T11] [<603c98a0>] ? lookup_mnt+0x0/0x220 <4>[ 0.100000][ T11] [<603c8160>] ? namespace_unlock+0x0/0x1a0 <4>[ 0.100000][ T11] [<603c9b25>] lock_mount+0x65/0x160 <4>[ 0.100000][ T11] [<6012f360>] ? up_write+0x0/0x40 <4>[ 0.100000][ T11] [<603cbbd2>] do_new_mount_fc+0xd2/0x220 <4>[ 0.100000][ T11] [<603eb560>] ? vfs_parse_fs_string+0x0/0xa0 <4>[ 0.100000][ T11] [<603cbf04>] do_new_mount+0x1e4/0x260 <4>[ 0.100000][ T11] [<603ccae9>] path_mount+0x1c9/0x6e0 <4>[ 0.100000][ T11] [<603a9f4f>] ? getname_kernel+0xaf/0x1a0 <4>[ 0.100000][ T11] [<603ab280>] ? kern_path+0x0/0x60 <4>[ 0.100000][ T11] [<600238ee>] 0x600238ee <4>[ 0.100000][ T11] [<62523baa>] devtmpfsd+0x52/0xb8 <4>[ 0.100000][ T11] [<62523b58>] ? devtmpfsd+0x0/0xb8 <4>[ 0.100000][ T11] [<600fffd8>] kthread+0x1d8/0x200 <4>[ 0.100000][ T11] [<600a4ea6>] new_thread_handler+0x86/0xc0 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? (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