Skip to content

Commit

Permalink
objtool: Rename "VMLINUX_VALIDATION" -> "NOINSTR_VALIDATION"
Browse files Browse the repository at this point in the history
CONFIG_VMLINUX_VALIDATION is just the validation of the "noinstr" rules.
That name is a misnomer, because now objtool actually does vmlinux
validation for other reasons.

Rename CONFIG_VMLINUX_VALIDATION to CONFIG_NOINSTR_VALIDATION.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lkml.kernel.org/r/173f07e2d6d1afc0874aed975a61783207c6a531.1650300597.git.jpoimboe@redhat.com
  • Loading branch information
Josh Poimboeuf authored and Peter Zijlstra committed Apr 22, 2022
1 parent 22102f4 commit 0f620ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/linux/instrumentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef __LINUX_INSTRUMENTATION_H
#define __LINUX_INSTRUMENTATION_H

#ifdef CONFIG_VMLINUX_VALIDATION
#ifdef CONFIG_NOINSTR_VALIDATION

#include <linux/stringify.h>

Expand Down Expand Up @@ -53,9 +53,9 @@
".popsection\n\t" : : "i" (c)); \
})
#define instrumentation_end() __instrumentation_end(__COUNTER__)
#else /* !CONFIG_VMLINUX_VALIDATION */
#else /* !CONFIG_NOINSTR_VALIDATION */
# define instrumentation_begin() do { } while(0)
# define instrumentation_end() do { } while(0)
#endif /* CONFIG_VMLINUX_VALIDATION */
#endif /* CONFIG_NOINSTR_VALIDATION */

#endif /* __LINUX_INSTRUMENTATION_H */
2 changes: 1 addition & 1 deletion lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ config STACK_VALIDATION
For more information, see
tools/objtool/Documentation/stack-validation.txt.

config VMLINUX_VALIDATION
config NOINSTR_VALIDATION
bool
depends on HAVE_OBJTOOL && DEBUG_ENTRY
select OBJTOOL
Expand Down
2 changes: 1 addition & 1 deletion scripts/link-vmlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ objtool_link()
objtoolopt="${objtoolopt} --lto"
fi

if is_enabled CONFIG_VMLINUX_VALIDATION; then
if is_enabled CONFIG_NOINSTR_VALIDATION; then
objtoolopt="${objtoolopt} --noinstr"
fi

Expand Down

0 comments on commit 0f620ce

Please sign in to comment.