Commit 5f3da8c0 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Peter Zijlstra

objtool: Add CONFIG_HAVE_UACCESS_VALIDATION

Allow an arch specify that it has objtool uaccess validation with
CONFIG_HAVE_UACCESS_VALIDATION.  For now, doing so unconditionally
selects CONFIG_OBJTOOL.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/d393d5e2fe73aec6e8e41d5c24f4b6fe8583f2d8.1650384225.git.jpoimboe@redhat.com
parent 7e284070
...@@ -1050,6 +1050,10 @@ config HAVE_NOINSTR_HACK ...@@ -1050,6 +1050,10 @@ config HAVE_NOINSTR_HACK
config HAVE_NOINSTR_VALIDATION config HAVE_NOINSTR_VALIDATION
bool bool
config HAVE_UACCESS_VALIDATION
bool
select OBJTOOL
config HAVE_STACK_VALIDATION config HAVE_STACK_VALIDATION
bool bool
help help
......
...@@ -258,6 +258,7 @@ config X86 ...@@ -258,6 +258,7 @@ config X86
select HAVE_PREEMPT_DYNAMIC_CALL select HAVE_PREEMPT_DYNAMIC_CALL
select HAVE_RSEQ select HAVE_RSEQ
select HAVE_SYSCALL_TRACEPOINTS select HAVE_SYSCALL_TRACEPOINTS
select HAVE_UACCESS_VALIDATION if HAVE_OBJTOOL
select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_UNSTABLE_SCHED_CLOCK
select HAVE_USER_RETURN_NOTIFIER select HAVE_USER_RETURN_NOTIFIER
select HAVE_GENERIC_VDSO select HAVE_GENERIC_VDSO
......
...@@ -218,7 +218,7 @@ objtool_args = \ ...@@ -218,7 +218,7 @@ objtool_args = \
$(if $(CONFIG_SLS), --sls) \ $(if $(CONFIG_SLS), --sls) \
$(if $(CONFIG_STACK_VALIDATION), --stackval) \ $(if $(CONFIG_STACK_VALIDATION), --stackval) \
$(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \ $(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \
--uaccess \ $(if $(CONFIG_HAVE_UACCESS_VALIDATION), --uaccess) \
$(if $(linked-object), --link) \ $(if $(linked-object), --link) \
$(if $(part-of-module), --module) \ $(if $(part-of-module), --module) \
$(if $(CONFIG_GCOV_KERNEL), --no-unreachable) $(if $(CONFIG_GCOV_KERNEL), --no-unreachable)
......
...@@ -134,7 +134,9 @@ objtool_link() ...@@ -134,7 +134,9 @@ objtool_link()
objtoolopt="${objtoolopt} --static-call" objtoolopt="${objtoolopt} --static-call"
fi fi
objtoolopt="${objtoolopt} --uaccess" if is_enabled CONFIG_HAVE_UACCESS_VALIDATION; then
objtoolopt="${objtoolopt} --uaccess"
fi
fi fi
if is_enabled CONFIG_NOINSTR_VALIDATION; then if is_enabled CONFIG_NOINSTR_VALIDATION; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment