From: Dave Hansen <dave.hansen@intel.com>
To: Dmitry Vyukov <dvyukov@google.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org
Cc: linux-kernel@vger.kernel.org, syzkaller@googlegroups.com,
elver@google.com, glider@google.com, nogikh@google.com,
tarasmadan@google.com, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/4] x86/entry: Remove unwanted instrumentation in common_interrupt()
Date: Tue, 4 Jun 2024 09:00:59 -0700 [thread overview]
Message-ID: <3f15814c-de9c-4aa6-b56d-82761bb6520a@intel.com> (raw)
In-Reply-To: <1ada3be307bbd076c4ea63530cf445e7fbd0e4e7.1717507310.git.dvyukov@google.com>
On 6/4/24 06:45, Dmitry Vyukov wrote:
> 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 we are in an interrupt.
>
> Mark kvm_set_cpu_l1tf_flush_l1d() as __always_inline and move
> out of instrumentation_begin/end() section.
> It only calls __this_cpu_write() which is already safe to call
> in noinstr contexts.
I've internalized the main rules around noinstr to basically be: Only
call noinstr functions before begin_instrumentation(). Second, try to
minimize the amount of noinstr code.
This patch seems to be adding another rule which is that all code before
preempt_count manipulation needs to be noinstr.
_Is_ that a new rule, or was it something I was missing?
next prev parent reply other threads:[~2024-06-04 16:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1717507310.git.dvyukov@google.com>
2024-06-04 13:45 ` Dmitry Vyukov
2024-06-04 15:04 ` Alexander Potapenko
2024-06-04 16:00 ` Dave Hansen [this message]
2024-06-04 16:07 ` Dmitry Vyukov
2024-06-04 19:38 ` Peter Zijlstra
2024-06-04 13:45 ` [PATCH 2/4] kcov: add interrupt handling self test Dmitry Vyukov
2024-06-04 15:26 ` Alexander Potapenko
2024-06-05 9:09 ` Marco Elver
2024-06-05 9:18 ` Dmitry Vyukov
2024-06-05 9:33 ` Marco Elver
2024-06-11 7:52 ` Dmitry Vyukov
2024-06-04 13:45 ` [PATCH 3/4] module: Fix KCOV-ignored file name Dmitry Vyukov
2024-06-04 15:03 ` Alexander Potapenko
2024-06-04 13:45 ` [PATCH 4/4] x86: Ignore stack unwinding in KCOV Dmitry Vyukov
2024-06-04 15:06 ` Alexander Potapenko
2024-06-05 8:26 ` Marco Elver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f15814c-de9c-4aa6-b56d-82761bb6520a@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nogikh@google.com \
--cc=peterz@infradead.org \
--cc=syzkaller@googlegroups.com \
--cc=tarasmadan@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®