summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-05-14 04:09:06 -0700
committerAndreas Kling <kling@serenityos.org>2021-05-14 13:28:21 +0200
commit9c384756088658e02ee6fba10030efcce1dc876b (patch)
treec1ec296519b7f4af1ffe67ea3496b73bffdd4e70 /Meta
parent6329e9fce69b538bfe10321aa7fc70deb2649160 (diff)
downloadserenity-9c384756088658e02ee6fba10030efcce1dc876b.zip
Kernel: Add the ability to verify we don't kmalloc under spinlock.
Ideally we would never allocate under a spinlock, as it has many performance and potentially functionality (deadlock) pitfalls. We violate that rule in many places today, but we need a tool to track them all down and fix them. This change introduces a new macro option named `KMALLOC_VERIFY_NO_SPINLOCK_HELD` which can catch these situations at runtime via an assert.
Diffstat (limited to 'Meta')
-rw-r--r--Meta/CMake/all_the_debug_macros.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake
index fd5c5f909a..8842f7e9a7 100644
--- a/Meta/CMake/all_the_debug_macros.cmake
+++ b/Meta/CMake/all_the_debug_macros.cmake
@@ -65,6 +65,7 @@ set(PORTABLE_IMAGE_LOADER_DEBUG ON)
set(SYNTAX_HIGHLIGHTING_DEBUG ON)
set(KEYBOARD_SHORTCUTS_DEBUG ON)
set(KMALLOC_DEBUG ON)
+set(KMALLOC_VERIFY_NO_SPINLOCK_HELD ON)
set(MARKDOWN_DEBUG ON)
set(REGEX_DEBUG ON)
set(TLS_DEBUG ON)