[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04040fa2-02c6-9aa6-15fe-609ad21b3426@oracle.com>
Date: Thu, 1 Nov 2018 10:02:14 +0800
From: Zhenzhong Duan <zhenzhong.duan@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linux-Kernel <linux-kernel@...r.kernel.org>, mingo@...hat.com,
konrad.wilk@...cle.com, dwmw@...zon.co.uk, tglx@...utronix.de,
Srinivas REDDY Eeda <srinivas.eeda@...cle.com>, bp@...e.de,
hpa@...or.com
Subject: Re: [PATCH 3/3] kprobes/x86: Simplify indirect-jump check in
retpoline
On 2018/10/31 22:00, Peter Zijlstra wrote:
> On Wed, Oct 31, 2018 at 02:53:20PM +0100, Peter Zijlstra wrote:
>> On Wed, Oct 31, 2018 at 02:01:20PM +0800, Zhenzhong Duan wrote:
>>> On 2018/10/30 16:36, Peter Zijlstra wrote:
>>>> On Mon, Oct 29, 2018 at 11:55:06PM -0700, Zhenzhong Duan wrote:
>>>>> Since CONFIG_RETPOLINE hard depends on compiler support now, so
>>>>> replacing indirect-jump check with the range check is safe in that case.
>>>>
>>>> Can we put kprobes on module init text before we run alternatives on it?
>>>
>>> Forgive me I doesn't understand your question. Do you mean this patch impact
>>> kprobes on module init text?
>>
>> In that case we would still see the indirect paravirt calls for example,
>> and we'd still need that cascade you took out.
Understood.
In another case when loading a non-retpoline module, we suffer the same.
>>
>> Now, I'm not at all sure we're able to use kprobes at those times, so it
>> might be a non-issue.
Not sure, but if it's possible then alternative patching may cover the
kprobes, it looks like a bug.
>
> Hmm, what about the case where we have RETPOLINE runtime disabled? Then
> the CALL_NOSPEC alternative patches in an indirect call again, and the
> retpolines are gone.
Is RETPOLINE runtime toggle supported in upstream? I don't see such code.
>
> Does that not need the __insn_is_indirect_jump() thing?
Yes it's needed if RETPOLINE runtime disabled.
Based on all above reasons, I'd like to drop this patch.
Thanks
Zhenzhong
Powered by blists - more mailing lists