diff options
author | Benjamin Berg <[email protected]> | 2024-09-19 14:45:06 +0200 |
---|---|---|
committer | Johannes Berg <[email protected]> | 2024-10-10 13:37:21 +0200 |
commit | 77eb31b6003a158cce534fa9ca9df21fc82672ea (patch) | |
tree | ab9827425eea1ea6c909e72502ba7a3e219c6f8f /arch/um/kernel | |
parent | fdb2ecd35d327a1fc6bba69b97f85b494e1f4b6b (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.S | 3 |
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"); |