diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-05 09:45:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-05 09:45:27 -0700 |
commit | 44688ffd111af31984237f0cba05f2e201eac530 (patch) | |
tree | 18d58bcd7744b7805d687fe7e7d0a2217b6ebd3f /include | |
parent | b2c9a83d262a8feb022e24e9f9aadb66cb10a7a8 (diff) | |
parent | 2028a255f4df3af9e759f01f958d3237f825f256 (diff) |
Merge tag 'objtool-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fixes from Thomas Gleixner:
- Handle __ubsan_handle_builtin_unreachable() correctly and treat it as
noreturn
- Allow architectures to select uaccess validation
- Use the non-instrumented bit test for test_cpu_has() to prevent
escape from non-instrumentable regions
- Use arch_ prefixed atomics for JUMP_LABEL=n builds to prevent escape
from non-instrumentable regions
- Mark a few tiny inline as __always_inline to prevent GCC from
bringing them out of line and instrumenting them
- Mark the empty stub context_tracking_enabled() as always inline as
GCC brings them out of line and instruments the empty shell
- Annotate ex_handler_msr_mce() as dead end
* tag 'objtool-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/extable: Annotate ex_handler_msr_mce() as a dead end
context_tracking: Always inline empty stubs
x86: Always inline on_thread_stack() and current_top_of_stack()
jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds
x86/cpu: Elide KCSAN for cpu_has() and friends
objtool: Mark __ubsan_handle_builtin_unreachable() as noreturn
objtool: Add CONFIG_HAVE_UACCESS_VALIDATION
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/context_tracking_state.h | 8 | ||||
-rw-r--r-- | include/linux/jump_label.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 65a60d3313b0..ae1e63e26947 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -46,10 +46,10 @@ static __always_inline bool context_tracking_in_user(void) return __this_cpu_read(context_tracking.state) == CONTEXT_USER; } #else -static inline bool context_tracking_in_user(void) { return false; } -static inline bool context_tracking_enabled(void) { return false; } -static inline bool context_tracking_enabled_cpu(int cpu) { return false; } -static inline bool context_tracking_enabled_this_cpu(void) { return false; } +static __always_inline bool context_tracking_in_user(void) { return false; } +static __always_inline bool context_tracking_enabled(void) { return false; } +static __always_inline bool context_tracking_enabled_cpu(int cpu) { return false; } +static __always_inline bool context_tracking_enabled_this_cpu(void) { return false; } #endif /* CONFIG_CONTEXT_TRACKING */ #endif diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 107751cc047b..bf1eef337a07 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -256,9 +256,9 @@ extern void static_key_disable_cpuslocked(struct static_key *key); #include <linux/atomic.h> #include <linux/bug.h> -static inline int static_key_count(struct static_key *key) +static __always_inline int static_key_count(struct static_key *key) { - return atomic_read(&key->enabled); + return arch_atomic_read(&key->enabled); } static __always_inline void jump_label_init(void) |