OSDN Git Service

kunit: tool: Disable PAGE_POISONING under --alltests
authorDavid Gow <davidgow@google.com>
Tue, 9 Feb 2021 07:10:34 +0000 (23:10 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Mar 2021 21:37:37 +0000 (14:37 -0700)
commit7fd53f41f771d250eb08db08650940f017e37c26
treeb2216d7077d03a13e278e063fab7fc15694da31f
parent7421b1a4d10c633ca5f14c8236d3e2c1de07e52b
kunit: tool: Disable PAGE_POISONING under --alltests

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: f289041ed4cf ("mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO")
Signed-off-by: David Gow <davidgow@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/configs/broken_on_uml.config