Commit 77eb31b6 authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg
Browse files

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: default avatarBenjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240919124511.282088-6-benjamin@sipsolutions.net


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent fdb2ecd3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -178,3 +178,6 @@ SECTIONS

  DISCARDS
}

ASSERT(__syscall_stub_end - __syscall_stub_start <= PAGE_SIZE,
       "STUB code must not be larger than one page");