summaryrefslogtreecommitdiff
path: root/include/linux/objtool.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-10-14 10:37:11 +0300
committerJani Nikula <jani.nikula@intel.com>2025-10-14 10:37:11 +0300
commit2acee98fcc61052d63fab4539fcb6ee677555645 (patch)
tree7809a2a2d02620d825a70123947246508bd90078 /include/linux/objtool.h
parenta051ef9f12f5b15857b54d6d68f1f525959c7ad9 (diff)
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
downloadlinux-2acee98fcc61052d63fab4539fcb6ee677555645.tar.xz
Merge drm/drm-next into drm-intel-next
Sync to v6.18-rc1. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/linux/objtool.h')
-rw-r--r--include/linux/objtool.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/objtool.h b/include/linux/objtool.h
index 366ad004d794..46ebaa46e6c5 100644
--- a/include/linux/objtool.h
+++ b/include/linux/objtool.h
@@ -184,6 +184,15 @@
* WARN using UD2.
*/
#define ANNOTATE_REACHABLE(label) __ASM_ANNOTATE(label, ANNOTYPE_REACHABLE)
+/*
+ * This should not be used; it annotates away CFI violations. There are a few
+ * valid use cases like kexec handover to the next kernel image, and there is
+ * no security concern there.
+ *
+ * There are also a few real issues annotated away, like EFI because we can't
+ * control the EFI code.
+ */
+#define ANNOTATE_NOCFI_SYM(sym) asm(__ASM_ANNOTATE(sym, ANNOTYPE_NOCFI))
#else
#define ANNOTATE_NOENDBR ANNOTATE type=ANNOTYPE_NOENDBR
@@ -194,6 +203,7 @@
#define ANNOTATE_INTRA_FUNCTION_CALL ANNOTATE type=ANNOTYPE_INTRA_FUNCTION_CALL
#define ANNOTATE_UNRET_BEGIN ANNOTATE type=ANNOTYPE_UNRET_BEGIN
#define ANNOTATE_REACHABLE ANNOTATE type=ANNOTYPE_REACHABLE
+#define ANNOTATE_NOCFI_SYM ANNOTATE type=ANNOTYPE_NOCFI
#endif
#if defined(CONFIG_NOINSTR_VALIDATION) && \