objtool: Rename frame.h -> objtool.h
authorJulien Thierry <jthierry@redhat.com>
Fri, 4 Sep 2020 15:30:25 +0000 (16:30 +0100)
committerJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 10 Sep 2020 15:43:13 +0000 (10:43 -0500)
Header frame.h is getting more code annotations to help objtool analyze
object files.

Rename the file to objtool.h.

[ jpoimboe: add objtool.h to MAINTAINERS ]

Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
14 files changed:
MAINTAINERS
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/kprobes/core.c
arch/x86/kernel/kprobes/opt.c
arch/x86/kernel/reboot.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/xen/enlighten_pv.c
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
include/linux/frame.h [deleted file]
include/linux/objtool.h [new file with mode: 0644]
kernel/bpf/core.c
kernel/kexec_core.c

index e4647c84c987e5498c60db9bc1f44602b3befb89..2605a086eb8a370484538fc714aea35c70c1df52 100644 (file)
@@ -12481,6 +12481,7 @@ M:      Josh Poimboeuf <jpoimboe@redhat.com>
 M:     Peter Zijlstra <peterz@infradead.org>
 S:     Supported
 F:     tools/objtool/
+F:     include/linux/objtool.h
 
 OCELOT ETHERNET SWITCH DRIVER
 M:     Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
index e7752b4038ff884895b5bfaa48917cf77743ff94..86651e86289dd403641816e127f3c8818c3b25b6 100644 (file)
@@ -4,7 +4,7 @@
 #define _ASM_X86_NOSPEC_BRANCH_H_
 
 #include <linux/static_key.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 
 #include <asm/alternative.h>
 #include <asm/alternative-asm.h>
index fdadc37d72af4b1c4bd5f65272567c5c1796145a..ae2488643029cb32455af63a0a004a1ab55e9a0b 100644 (file)
@@ -38,9 +38,9 @@
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
-#include <linux/frame.h>
 #include <linux/kasan.h>
 #include <linux/moduleloader.h>
+#include <linux/objtool.h>
 #include <linux/vmalloc.h>
 #include <linux/pgtable.h>
 
index c068e21c2c40d5ee3eb851c7b9ddd6f04e10b38a..9b1cb8f519b05672f539d9d40de6489e45eee13c 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/pgtable.h>
 #include <linux/static_call.h>
 
index a515e2d230b7564ae94b3cea11f6cca63318a91e..db115943e8bdc015ab1d02102d59ed44c37f3e17 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/sched.h>
 #include <linux/tboot.h>
 #include <linux/delay.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/pgtable.h>
 #include <acpi/reboot.h>
 #include <asm/io.h>
index 0194336b64a4c0ddcf1f8e542e5a01d9b942d78f..17ba613de9a9be00e07d090db36feaf406b5e5be 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/trace_events.h>
 #include <linux/slab.h>
 #include <linux/hashtable.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/psp-sev.h>
 #include <linux/file.h>
 #include <linux/pagemap.h>
index 23b58c28a1c926f461cb87c9ee1f03a310f23e25..ae4ff7c624a4035cfb62574313f5dfcfac087185 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/percpu.h>
 
 #include <asm/debugreg.h>
index 819c185adf09b37a62a05bd75b6368d348c92509..df29fb49b43d28721df27df16fa2c93ece7395b3 100644 (file)
@@ -13,7 +13,6 @@
  *   Yaniv Kamay  <yaniv@qumranet.com>
  */
 
-#include <linux/frame.h>
 #include <linux/highmem.h>
 #include <linux/hrtimer.h>
 #include <linux/kernel.h>
@@ -22,6 +21,7 @@
 #include <linux/moduleparam.h>
 #include <linux/mod_devicetable.h>
 #include <linux/mm.h>
+#include <linux/objtool.h>
 #include <linux/sched.h>
 #include <linux/sched/smt.h>
 #include <linux/slab.h>
index 22e741e0b10c3c5266574b7a35efc68128ebabb0..58382d26f1532c171c8f4a9e16f0c25ae844f45b 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/pci.h>
 #include <linux/gfp.h>
 #include <linux/edd.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 
 #include <xen/xen.h>
 #include <xen/events.h>
index e9f448a5ebb35bc6904a2916e4adee3ae9f77022..15b5bde69324272a8bcfe80a43b18abce1bb5475 100644 (file)
@@ -24,7 +24,7 @@
  *
  */
 
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -599,4 +599,3 @@ out_open:
 
        return -EINVAL;
 }
-
diff --git a/include/linux/frame.h b/include/linux/frame.h
deleted file mode 100644 (file)
index 303cda6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_FRAME_H
-#define _LINUX_FRAME_H
-
-#ifdef CONFIG_STACK_VALIDATION
-/*
- * This macro marks the given function's stack frame as "non-standard", which
- * tells objtool to ignore the function when doing stack metadata validation.
- * It should only be used in special cases where you're 100% sure it won't
- * affect the reliability of frame pointers and kernel stack traces.
- *
- * For more information, see tools/objtool/Documentation/stack-validation.txt.
- */
-#define STACK_FRAME_NON_STANDARD(func) \
-       static void __used __section(.discard.func_stack_frame_non_standard) \
-               *__func_stack_frame_non_standard_##func = func
-
-/*
- * This macro indicates that the following intra-function call is valid.
- * Any non-annotated intra-function call will cause objtool to issue a warning.
- */
-#define ANNOTATE_INTRA_FUNCTION_CALL                           \
-       999:                                                    \
-       .pushsection .discard.intra_function_calls;             \
-       .long 999b;                                             \
-       .popsection;
-
-#else /* !CONFIG_STACK_VALIDATION */
-
-#define STACK_FRAME_NON_STANDARD(func)
-#define ANNOTATE_INTRA_FUNCTION_CALL
-
-#endif /* CONFIG_STACK_VALIDATION */
-
-#endif /* _LINUX_FRAME_H */
diff --git a/include/linux/objtool.h b/include/linux/objtool.h
new file mode 100644 (file)
index 0000000..358175c
--- /dev/null
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_OBJTOOL_H
+#define _LINUX_OBJTOOL_H
+
+#ifdef CONFIG_STACK_VALIDATION
+/*
+ * This macro marks the given function's stack frame as "non-standard", which
+ * tells objtool to ignore the function when doing stack metadata validation.
+ * It should only be used in special cases where you're 100% sure it won't
+ * affect the reliability of frame pointers and kernel stack traces.
+ *
+ * For more information, see tools/objtool/Documentation/stack-validation.txt.
+ */
+#define STACK_FRAME_NON_STANDARD(func) \
+       static void __used __section(.discard.func_stack_frame_non_standard) \
+               *__func_stack_frame_non_standard_##func = func
+
+/*
+ * This macro indicates that the following intra-function call is valid.
+ * Any non-annotated intra-function call will cause objtool to issue a warning.
+ */
+#define ANNOTATE_INTRA_FUNCTION_CALL                           \
+       999:                                                    \
+       .pushsection .discard.intra_function_calls;             \
+       .long 999b;                                             \
+       .popsection;
+
+#else /* !CONFIG_STACK_VALIDATION */
+
+#define STACK_FRAME_NON_STANDARD(func)
+#define ANNOTATE_INTRA_FUNCTION_CALL
+
+#endif /* CONFIG_STACK_VALIDATION */
+
+#endif /* _LINUX_OBJTOOL_H */
index ed0b3578867c083775190cd202cb6d316d236a73..03e28487364475953e9ca069214805d1738aa969 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/moduleloader.h>
 #include <linux/bpf.h>
 #include <linux/btf.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 #include <linux/rbtree_latch.h>
 #include <linux/kallsyms.h>
 #include <linux/rcupdate.h>
index c19c0dad1ebef9def30f749a0a5cb13fac609a3f..c5e5e5a1153544617099aa5ec43b0d1416842045 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/syscore_ops.h>
 #include <linux/compiler.h>
 #include <linux/hugetlb.h>
-#include <linux/frame.h>
+#include <linux/objtool.h>
 
 #include <asm/page.h>
 #include <asm/sections.h>