From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
tglx@linutronix.de, mingo@redhat.com, ak@linux.intel.com,
kirill.shutemov@linux.intel.com, mhocko@suse.com,
akpm@linux-foundation.org, harish.srinivasappa@intel.com,
lukasz.odzioba@intel.com, grzegorz.andrejczuk@intel.com,
lukasz.daniluk@intel.com
Subject: Re: [PATCH v2] Linux VM workaround for Knights Landing A/D leak
Date: Tue, 14 Jun 2016 13:20:06 -0700 [thread overview]
Message-ID: <4b2c481e-35ae-1cd6-ca58-1535bfef346c@zytor.com> (raw)
In-Reply-To: <20160614191916.GI30015@pd.tnic>
On 06/14/16 12:19, Borislav Petkov wrote:
> On Tue, Jun 14, 2016 at 11:54:24AM -0700, Dave Hansen wrote:
>> Lukasz, Borislav suggested using static_cpu_has_bug(), which will do the
>> alternatives patching. It's definitely the right thing to use here.
>
> Yeah, either that or do an
>
> alternative_call(null_func, fix_pte_peak, X86_BUG_PTE_LEAK, ...)
>
> or so and you'll need a dummy function to call on !X86_BUG_PTE_LEAK
> CPUs.
>
> The static_cpu_has_bug() thing should be most likely a penalty
> of a single JMP (I have to look at the asm) but then since the
> callers are inlined, you'll have to patch all those places where
> *ptep_get_and_clear() get inlined.
>
> Shouldn't be a big deal still but...
>
> "debug-alternative" and a kvm guest should help you there to get a quick
> idea.
>
static_cpu_has_bug() should turn into 5-byte NOP in the common (bugless)
case.
-hpa
next prev parent reply other threads:[~2016-06-14 20:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 15:58 [PATCH] " Lukasz Anaczkowski
2016-06-14 16:31 ` kbuild test robot
2016-06-14 16:47 ` Nadav Amit
2016-06-14 16:54 ` Anaczkowski, Lukasz
2016-06-14 17:01 ` [PATCH v2] " Lukasz Anaczkowski
2016-06-14 17:24 ` Dave Hansen
2016-06-14 18:34 ` One Thousand Gnomes
2016-06-14 18:54 ` Dave Hansen
2016-06-14 19:19 ` Borislav Petkov
2016-06-14 20:20 ` H. Peter Anvin [this message]
2016-06-14 20:47 ` Borislav Petkov
2016-06-14 20:54 ` H. Peter Anvin
2016-06-14 21:02 ` Borislav Petkov
2016-06-14 21:08 ` H. Peter Anvin
2016-06-14 21:13 ` H. Peter Anvin
2016-06-14 18:10 ` Borislav Petkov
2016-06-15 13:12 ` Anaczkowski, Lukasz
2016-06-14 18:38 ` Nadav Amit
2016-06-15 13:12 ` Anaczkowski, Lukasz
2016-06-15 20:04 ` Nadav Amit
2016-06-15 20:10 ` Dave Hansen
2016-06-15 20:26 ` Nadav Amit
2016-06-16 15:14 ` [PATCH v3] " Lukasz Anaczkowski
2016-06-16 16:43 ` Nadav Amit
2016-06-16 20:23 ` Dave Hansen
2016-06-14 17:18 ` [PATCH] " Dave Hansen
2016-06-14 20:16 ` Nadav Amit
2016-06-14 21:37 ` Dave Hansen
2016-06-15 2:20 ` Andy Lutomirski
2016-06-15 2:35 ` Nadav Amit
2016-06-15 2:36 ` Andy Lutomirski
2016-06-15 2:44 ` Nadav Amit
2016-06-15 3:09 ` Andy Lutomirski
2016-06-15 3:20 ` Nadav Amit
2016-06-14 16:58 ` kbuild test robot
2016-06-14 17:19 ` Dave Hansen
2016-06-15 13:06 ` Anaczkowski, Lukasz
2016-06-14 17:47 ` kbuild test robot
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=4b2c481e-35ae-1cd6-ca58-1535bfef346c@zytor.com \
--to=hpa@zytor.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=grzegorz.andrejczuk@intel.com \
--cc=harish.srinivasappa@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukasz.anaczkowski@intel.com \
--cc=lukasz.daniluk@intel.com \
--cc=lukasz.odzioba@intel.com \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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