linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Handle faults in KUnit tests
@ 2024-03-01 19:40 Mickaël Salaün
  2024-03-01 19:40 ` [PATCH v2 1/7] kunit: Handle thread creation error Mickaël Salaün
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Mickaël Salaün @ 2024-03-01 19:40 UTC (permalink / raw)
  To: Brendan Higgins, David Gow, Kees Cook, Rae Moar, Shuah Khan
  Cc: Mickaël Salaün, Alan Maguire, Borislav Petkov,
	Dave Hansen, H . Peter Anvin, Ingo Molnar, James Morris,
	Luis Chamberlain, Madhavan T . Venkataraman, Marco Pagani,
	Paolo Bonzini, Sean Christopherson, Stephen Boyd, Thara Gopinath,
	Thomas Gleixner, Vitaly Kuznetsov, Wanpeng Li, Zahra Tarkhani,
	kvm, linux-hardening, linux-hyperv, linux-kernel,
	linux-security-module, linux-um, x86

Hi,

This patch series teaches KUnit to handle kthread faults as errors, and
it brings a few related fixes and improvements.

I removed the previous patch that moved the KUnit test execution at the
very end of kernel initialization.  We'll address that with a separate
series.

A new test case check NULL pointer dereference, which wasn't possible
before.

This is useful to test current kernel self-protection mechanisms or
future ones such as Heki: https://github.com/heki-linux

Previous version:
v1: https://lore.kernel.org/r/20240229170409.365386-1-mic@digikod.net

Regards,

Mickaël Salaün (7):
  kunit: Handle thread creation error
  kunit: Fix kthread reference
  kunit: Fix timeout message
  kunit: Handle test faults
  kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests
  kunit: Print last test location on fault
  kunit: Add tests for fault

 include/kunit/test.h      | 24 ++++++++++++++++++---
 include/kunit/try-catch.h |  3 ---
 lib/kunit/kunit-test.c    | 45 ++++++++++++++++++++++++++++++++++++++-
 lib/kunit/try-catch.c     | 33 +++++++++++++++++-----------
 lib/kunit_iov_iter.c      | 18 ++++++++--------
 5 files changed, 95 insertions(+), 28 deletions(-)


base-commit: d206a76d7d2726f3b096037f2079ce0bd3ba329b
-- 
2.44.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-03-12 12:16 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 19:40 [PATCH v2 0/7] Handle faults in KUnit tests Mickaël Salaün
2024-03-01 19:40 ` [PATCH v2 1/7] kunit: Handle thread creation error Mickaël Salaün
2024-03-05 20:57   ` Rae Moar
2024-03-12  4:53   ` David Gow
2024-03-01 19:40 ` [PATCH v2 2/7] kunit: Fix kthread reference Mickaël Salaün
2024-03-05 20:57   ` Rae Moar
2024-03-12  4:53   ` David Gow
2024-03-01 19:40 ` [PATCH v2 3/7] kunit: Fix timeout message Mickaël Salaün
2024-03-05 20:58   ` Rae Moar
2024-03-12  4:53   ` David Gow
2024-03-01 19:40 ` [PATCH v2 4/7] kunit: Handle test faults Mickaël Salaün
2024-03-11 21:21   ` Rae Moar
2024-03-12 12:15     ` Mickaël Salaün
2024-03-12  5:05   ` David Gow
2024-03-12 12:15     ` Mickaël Salaün
2024-03-01 19:40 ` [PATCH v2 5/7] kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests Mickaël Salaün
2024-03-12  4:54   ` David Gow
2024-03-01 19:40 ` [PATCH v2 6/7] kunit: Print last test location on fault Mickaël Salaün
2024-03-12  4:54   ` David Gow
2024-03-12 12:15     ` Mickaël Salaün
2024-03-01 19:40 ` [PATCH v2 7/7] kunit: Add tests for fault Mickaël Salaün
2024-03-12  4:54   ` David Gow

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).