linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	tim.c.chen@linux.intel.com, pjt@google.com, jikos@kernel.org,
	 gregkh@linux-foundation.org, dave.hansen@intel.com,
	riel@redhat.com,  luto@amacapital.net,
	torvalds@linux-foundation.org, ak@linux.intel.com,
	 keescook@google.com, peterz@infradead.org
Subject: Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()
Date: Tue, 06 Feb 2018 19:44:52 +0000	[thread overview]
Message-ID: <1517946292.3677.22.camel@infradead.org> (raw)
In-Reply-To: <20180126200813.cignvfovk2dhlzbh@pd.tnic>

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote:
> Make it all a function which does the WRMSR instead of having a hairy
> inline asm.

...

> +	alternative_input("",
> +			 "call __ibp_barrier",
> +			 X86_FEATURE_IBPB,
> +			 ASM_NO_INPUT_CLOBBER("eax", "ecx", "edx", "memory"));
>  }

Dammit. I know the best time to comment is *before* I add my own sign-
off to it and before Linus has merged it but... I think this is broken.

If you're calling a C function then you have to mark *all* the call-
clobbered registers as, well, clobbered.

If you really really really want to *call* something out of line, then
it would need to be implemented in asm.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5213 bytes --]

  parent reply	other threads:[~2018-02-06 19:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 12:11 [PATCH 0/4] x86: Some cleanups Borislav Petkov
2018-01-26 12:11 ` [PATCH 1/4] x86/alternative: Print unadorned pointers Borislav Petkov
2018-01-26 15:02   ` [tip:x86/pti] " tip-bot for Borislav Petkov
2018-01-26 12:11 ` [PATCH 2/4] x86/nospec: Fix header guards names Borislav Petkov
2018-01-26 15:03   ` [tip:x86/pti] " tip-bot for Borislav Petkov
2018-01-26 12:11 ` [PATCH 3/4] x86/retpoline: Simplify vmexit_fill_RSB() Borislav Petkov
2018-01-26 12:33   ` David Woodhouse
2018-01-26 13:24     ` Borislav Petkov
2018-01-26 16:24       ` David Woodhouse
2018-01-26 16:47         ` Borislav Petkov
2018-01-26 20:06           ` Borislav Petkov
2018-01-26 20:07             ` [PATCH v2 1/2] " Borislav Petkov
2018-01-27  4:20               ` Konrad Rzeszutek Wilk
2018-01-27  9:01                 ` Borislav Petkov
2018-01-27 14:04                   ` Konrad Rzeszutek Wilk
2018-01-29 17:13               ` Peter Zijlstra
2018-01-26 20:08             ` [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier() Borislav Petkov
2018-01-27 12:32               ` David Woodhouse
2018-01-27 13:21                 ` Borislav Petkov
2018-02-06 19:44               ` David Woodhouse [this message]
2018-02-06 23:25                 ` Josh Poimboeuf
2018-02-06 23:31                   ` David Woodhouse
2018-02-06 23:49                     ` Josh Poimboeuf
2018-01-26 12:11 ` [PATCH 4/4] x86/bugs: Drop one "mitigation" from dmesg Borislav Petkov
2018-01-26 13:35   ` Greg KH
2018-01-26 15:03   ` [tip:x86/pti] " tip-bot for Borislav Petkov

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=1517946292.3677.22.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=gregkh@linux-foundation.org \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=riel@redhat.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    --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;
as well as URLs for NNTP newsgroup(s).