File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1050,6 +1050,10 @@ config HAVE_NOINSTR_HACK
10501050config HAVE_NOINSTR_VALIDATION
10511051 bool
10521052
1053+ config HAVE_UACCESS_VALIDATION
1054+ bool
1055+ select OBJTOOL
1056+
10531057config HAVE_STACK_VALIDATION
10541058 bool
10551059 help
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ config X86
258258 select HAVE_PREEMPT_DYNAMIC_CALL
259259 select HAVE_RSEQ
260260 select HAVE_SYSCALL_TRACEPOINTS
261+ select HAVE_UACCESS_VALIDATION if HAVE_OBJTOOL
261262 select HAVE_UNSTABLE_SCHED_CLOCK
262263 select HAVE_USER_RETURN_NOTIFIER
263264 select HAVE_GENERIC_VDSO
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ objtool_args = \
218218 $(if $(CONFIG_SLS), --sls) \
219219 $(if $(CONFIG_STACK_VALIDATION), --stackval) \
220220 $(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \
221- --uaccess \
221+ $(if $(CONFIG_HAVE_UACCESS_VALIDATION), --uaccess) \
222222 $(if $(linked-object), --link) \
223223 $(if $(part-of-module), --module) \
224224 $(if $(CONFIG_GCOV_KERNEL), --no-unreachable)
Original file line number Diff line number Diff line change @@ -134,7 +134,9 @@ objtool_link()
134134 objtoolopt=" ${objtoolopt} --static-call"
135135 fi
136136
137- objtoolopt=" ${objtoolopt} --uaccess"
137+ if is_enabled CONFIG_HAVE_UACCESS_VALIDATION; then
138+ objtoolopt=" ${objtoolopt} --uaccess"
139+ fi
138140 fi
139141
140142 if is_enabled CONFIG_NOINSTR_VALIDATION; then
You can’t perform that action at this time.
0 commit comments