From: Borislav Petkov <bp@alien8.de>
To: Qian Cai <cai@lca.pw>
Cc: Marco Elver <elver@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
the arch/x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] x86/mm/pat: silence a data race in cpa_4k_install
Date: Tue, 21 Jan 2020 23:18:15 +0100 [thread overview]
Message-ID: <20200121221814.GQ7808@zn.tnic> (raw)
In-Reply-To: <E9162CDC-BBC5-4D69-87FB-C93AB8B3D581@lca.pw>
On Tue, Jan 21, 2020 at 03:21:35PM -0500, Qian Cai wrote:
> Actually "__no_kcsan" does not work because I have
Why, because KCSAN conflicts with inlining? I'm looking at the comment
over __no_kasan_or_inline.
> CONFIG_OPTIMIZE_INLINING=y (GCC 8.3.1) here, so it has to be,
>
> diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
> index 20823392f4f2..fabbf8a33b7f 100644
> --- a/arch/x86/mm/pat/set_memory.c
> +++ b/arch/x86/mm/pat/set_memory.c
> @@ -126,7 +126,7 @@ static inline void cpa_inc_2m_checked(void)
> cpa_2m_checked++;
> }
>
> -static inline void cpa_inc_4k_install(void)
> +static inline void __no_kcsan_or_inline cpa_inc_4k_install(void)
> {
> cpa_4k_install++;
> }
>
> Are you fine with it or data_race() looks better?
This one looks marginally better because the annotation is still outside
of the function, so to speak.
Btw, looking at the other "inc" CPA statistics functions there, does it
mean that for KCSAN they all need to be annotated now too?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2020-01-21 22:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 15:15 Qian Cai
2020-01-21 15:19 ` Marco Elver
2020-01-21 15:28 ` Borislav Petkov
2020-01-21 15:33 ` Qian Cai
2020-01-21 15:36 ` Marco Elver
2020-01-21 15:45 ` Borislav Petkov
2020-01-21 20:21 ` Qian Cai
2020-01-21 22:18 ` Borislav Petkov [this message]
2020-01-21 23:30 ` Marco Elver
2020-01-22 0:34 ` Qian Cai
2020-01-22 8:46 ` Peter Zijlstra
2020-01-23 2:15 ` Qian Cai
2020-01-23 8:16 ` Borislav Petkov
2020-01-21 15:50 Qian Cai
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=20200121221814.GQ7808@zn.tnic \
--to=bp@alien8.de \
--cc=cai@lca.pw \
--cc=dave.hansen@linux.intel.com \
--cc=elver@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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®