linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	konrad.wilk@oracle.com, x86@kernel.org, dwmw@amazon.co.uk,
	tglx@linutronix.de,
	Srinivas REDDY Eeda <srinivas.eeda@oracle.com>,
	bp@suse.de, hpa@zytor.com, dhaval.giani@oracle.com
Subject: Re: [PATCH] x86/speculation: Use AMD specific retpoline for inline asm on AMD
Date: Tue, 18 Sep 2018 22:41:10 +0800	[thread overview]
Message-ID: <9074a680-ad3d-e222-5b19-eb13fd1d4e28@oracle.com> (raw)
In-Reply-To: <20180918130058.GM24106@hirez.programming.kicks-ass.net>

On 2018/9/18 21:00, Peter Zijlstra wrote:
> On Tue, Sep 18, 2018 at 08:04:44PM +0800, Zhenzhong Duan wrote:
>> On 2018/9/18 18:59, Peter Zijlstra wrote:
>>> On Tue, Sep 18, 2018 at 06:31:07PM +0800, Zhenzhong Duan wrote:
>>>> On 2018/9/18 17:50, Peter Zijlstra wrote:
>>>>> On Mon, Sep 17, 2018 at 10:17:30PM -0700, Zhenzhong Duan wrote:
>>>>>> -#elif defined(CONFIG_X86_32) && defined(CONFIG_RETPOLINE)
>>>>>> +#elif defined(CONFIG_RETPOLINE)
>>>>> This doesn't make any sense..
>>>> This change is used for x86_64 to have minimal Retpoline support when
>>>> CONFIG_RETPOLINE is defined but RETPOLINE isn't defined, or I missed
>>>> something?
>>> No it doesn't.
>>>
>>> #if defined(X86_64) && defined(RETPOLINE)
>>>
>>>    /* x86_64 retpoline goes here */
>>>
>>> #elif defined(RETPOLINE)
>>>
>>>    /* !x86_64 retpoline goes here */
>>>
>>> #else
>>>
>>>    /* !retpoline goes here
>>>
>>> #endif
>> Sorry, but I am confused.
>> So where is 'if defined(x86_64) && !defined(RETPOLINE) &&
>> defined(CONFIG_RETPOLINE)' go?
> Argh, CONFIG_RETPOLINE vs RETPOLINE :/
> 
> The thing is, the one you modify has a comment on that explains why it
> is i386 only. CET and retpolines don't like one another much.
> 
> And the x86_64 version uses %V which requires new GCC.
> 
> So I'm all for fixing the RETPOLINE_AMD thing, but at this point nobody
> should use the minimal stuff, that's just delusional.
> 

Clear, thanks for your explanation.

Zhenzhong

      parent reply	other threads:[~2018-09-18 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  5:17 [PATCH] x86/speculation: Use AMD specific retpoline for inline asm on AMD Zhenzhong Duan
2018-09-18  9:50 ` Peter Zijlstra
2018-09-18 10:31   ` Zhenzhong Duan
2018-09-18 10:59     ` Peter Zijlstra
2018-09-18 12:04       ` Zhenzhong Duan
2018-09-18 13:00         ` Peter Zijlstra
2018-09-18 13:03           ` Peter Zijlstra
2018-09-18 13:32             ` David Woodhouse
2018-09-18 14:41           ` Zhenzhong Duan [this message]

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=9074a680-ad3d-e222-5b19-eb13fd1d4e28@oracle.com \
    --to=zhenzhong.duan@oracle.com \
    --cc=bp@suse.de \
    --cc=dhaval.giani@oracle.com \
    --cc=dwmw@amazon.co.uk \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=srinivas.eeda@oracle.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;
as well as URLs for NNTP newsgroup(s).