From: Benjamin Berg Date: Thu, 19 Sep 2024 12:45:06 +0000 (+0200) Subject: um: Add compile time assert that stub fits on a page X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=77eb31b6003a158cce534fa9ca9df21fc82672ea;p=users%2Fjedix%2Flinux-maple.git 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 Link: https://patch.msgid.link/20240919124511.282088-6-benjamin@sipsolutions.net Signed-off-by: Johannes Berg --- diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 3385d653ebd0d..dc9d9a68af559 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");