mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + kfence-test-fail-fast-if-disabled-at-boot.patch added to -mm tree
@ 2021-08-31 22:54 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-08-31 22:54 UTC (permalink / raw)
  To: dvyukov, elver, glider, mm-commits, wangkefeng.wang


The patch titled
     Subject: kfence: test: fail fast if disabled at boot
has been added to the -mm tree.  Its filename is
     kfence-test-fail-fast-if-disabled-at-boot.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/kfence-test-fail-fast-if-disabled-at-boot.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/kfence-test-fail-fast-if-disabled-at-boot.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Marco Elver <elver@google.com>
Subject: kfence: test: fail fast if disabled at boot

Fail kfence_test fast if KFENCE was disabled at boot, instead of each test
case trying several seconds to allocate from KFENCE and failing.  KUnit
will fail all test cases if kunit_suite::init returns an error.

Even if KFENCE was disabled, we still want the test to fail, so that CI
systems that parse KUnit output will alert on KFENCE being disabled
(accidentally or otherwise).

Link: https://lkml.kernel.org/r/20210825105533.1247922-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Reported-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/kfence/kfence_test.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/mm/kfence/kfence_test.c~kfence-test-fail-fast-if-disabled-at-boot
+++ a/mm/kfence/kfence_test.c
@@ -800,6 +800,9 @@ static int test_init(struct kunit *test)
 	unsigned long flags;
 	int i;
 
+	if (!__kfence_pool)
+		return -EINVAL;
+
 	spin_lock_irqsave(&observed.lock, flags);
 	for (i = 0; i < ARRAY_SIZE(observed.lines); i++)
 		observed.lines[i][0] = '\0';
_

Patches currently in -mm which might be from elver@google.com are

kfence-show-cpu-and-timestamp-in-alloc-free-info.patch
kfence-test-fail-fast-if-disabled-at-boot.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 22:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 22:54 + kfence-test-fail-fast-if-disabled-at-boot.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).