mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: x86@kernel.org
Subject: lkdtm: Annotate do_nothing()
Date: Mon, 3 Mar 2025 10:38:17 +0100	[thread overview]
Message-ID: <20250303093817.GJ5880@noisy.programming.kicks-ass.net> (raw)

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@infradead.org>
---
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)

             reply	other threads:[~2025-03-03  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03  9:38 Peter Zijlstra [this message]
2025-03-03 17:26 ` Kees Cook
2025-03-03 18:35   ` Peter Zijlstra
2025-03-03 18:37     ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250303093817.GJ5880@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®