aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorBenjamin Berg <[email protected]>2024-09-19 14:45:06 +0200
committerJohannes Berg <[email protected]>2024-10-10 13:37:21 +0200
commit77eb31b6003a158cce534fa9ca9df21fc82672ea (patch)
treeab9827425eea1ea6c909e72502ba7a3e219c6f8f /arch/um/kernel
parentfdb2ecd35d327a1fc6bba69b97f85b494e1f4b6b (diff)
um: Add compile time assert that stub fits on a page
The code assumes that the stub code can fit into a single page. This is unlikely to ever change, but add a link time assert instead so that there will be no hard to debug error. Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/dyn.lds.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 3385d653ebd0..dc9d9a68af55 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -178,3 +178,6 @@ SECTIONS
DISCARDS
}
+
+ASSERT(__syscall_stub_end - __syscall_stub_start <= PAGE_SIZE,
+ "STUB code must not be larger than one page");