summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2022-04-19 09:05:09 -0700
committerPeter Zijlstra <peterz@infradead.org>2022-05-27 12:34:43 +0200
commit5f3da8c08508df82823566c32f753071c8ad36af (patch)
treeb2f63ac85502f74ba1f9774c22f5b90292d1947c /scripts
parent7e284070abe53d448517b80493863595af4ab5f0 (diff)
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: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/d393d5e2fe73aec6e8e41d5c24f4b6fe8583f2d8.1650384225.git.jpoimboe@redhat.com
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build2
-rwxr-xr-xscripts/link-vmlinux.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 06400504150b..6a663b27b286 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -218,7 +218,7 @@ objtool_args = \
$(if $(CONFIG_SLS), --sls) \
$(if $(CONFIG_STACK_VALIDATION), --stackval) \
$(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \
- --uaccess \
+ $(if $(CONFIG_HAVE_UACCESS_VALIDATION), --uaccess) \
$(if $(linked-object), --link) \
$(if $(part-of-module), --module) \
$(if $(CONFIG_GCOV_KERNEL), --no-unreachable)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index a7f6196c7e41..fd578c380919 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -134,7 +134,9 @@ objtool_link()
objtoolopt="${objtoolopt} --static-call"
fi
- objtoolopt="${objtoolopt} --uaccess"
+ if is_enabled CONFIG_HAVE_UACCESS_VALIDATION; then
+ objtoolopt="${objtoolopt} --uaccess"
+ fi
fi
if is_enabled CONFIG_NOINSTR_VALIDATION; then