lkdtm: Annotate do_nothing()
From: Peter Zijlstra
Date: Mon Mar 03 2025 - 04:38:28 EST
Hi Kees,
During my FineIBT testing the other week I stumbled upon the following
complaint:
vmlinux.o: warning: objtool: execute_location+0x4f: relocation to !ENDBR: .text+0x1032008
I finally got around to looking at it and realized we have means of
annotating that since 93f16a1ab78c ("x86/boot: Mark start_secondary() with __noendbr")
(which might still be in tip only).
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
diff --git a/drivers/misc/lkdtm/perms.c b/drivers/misc/lkdtm/perms.c
index 5b861dbff27e..9600af4494d8 100644
--- a/drivers/misc/lkdtm/perms.c
+++ b/drivers/misc/lkdtm/perms.c
@@ -36,6 +36,7 @@ static noinline void do_nothing(void)
{
return;
}
+ANNOTATE_NOENDBR_SYM(do_nothing);
/* Must immediately follow do_nothing for size calculuations to work out. */
static noinline void do_overwritten(void)