diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-11 09:50:30 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-08-08 17:36:35 +0200 |
commit | 477d81a1c47a1b79b9c08fc92b5dea3c5143800b (patch) | |
tree | f4d21b16f921f5dde00e59f6596a4f1ec9235044 /rust/kernel | |
parent | de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed (diff) |
x86/entry: Remove unwanted instrumentation in common_interrupt()
common_interrupt() and related variants call kvm_set_cpu_l1tf_flush_l1d(),
which is neither marked noinstr nor __always_inline.
So compiler puts it out of line and adds instrumentation to it. Since the
call is inside of instrumentation_begin/end(), objtool does not warn about
it.
The manifestation is that KCOV produces spurious coverage in
kvm_set_cpu_l1tf_flush_l1d() in random places because the call happens when
preempt count is not yet updated to say that the kernel is in an interrupt.
Mark kvm_set_cpu_l1tf_flush_l1d() as __always_inline and move it out of the
instrumentation_begin/end() section. It only calls __this_cpu_write()
which is already safe to call in noinstr contexts.
Fixes: 6368558c3710 ("x86/entry: Provide IDTENTRY_SYSVEC")
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexander Potapenko <glider@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/3f9a1de9e415fcb53d07dc9e19fa8481bb021b1b.1718092070.git.dvyukov@google.com
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions