lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Nov 2019 18:57:44 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Xiaoyao Li <xiaoyao.li@...el.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        "Luck, Tony" <tony.luck@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        H Peter Anvin <hpa@...or.com>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter


> On Nov 21, 2019, at 6:39 PM, Xiaoyao Li <xiaoyao.li@...el.com> wrote:
> 
> On 11/22/2019 10:21 AM, Andy Lutomirski wrote:
>>>> On Nov 21, 2019, at 5:52 PM, Sean Christopherson <sean.j.christopherson@...el.com> wrote:
>>> 
>>> On Thu, Nov 21, 2019 at 03:53:29PM -0800, Fenghua Yu wrote:
>>>>> On Thu, Nov 21, 2019 at 03:18:46PM -0800, Andy Lutomirski wrote:
>>>>> 
>>>>>> On Nov 21, 2019, at 2:29 PM, Luck, Tony <tony.luck@...el.com> wrote:
>>>>>> 
>>>>>>> It would be really, really nice if we could pass this feature through to a VM. Can we?
>>>>>> 
>>>>>> It's hard because the MSR is core scoped rather than thread scoped.  So on an HT
>>>>>> enabled system a pair of logical processors gets enabled/disabled together.
>>>>>> 
>>>>> 
>>>>> Well that sucks.
>>>>> 
>>>>> Could we pass it through if the host has no HT?  Debugging is *so* much
>>>>> easier in a VM.  And HT is a bit dubious these days anyway.
>>>> 
>>>> I think it's doable to pass it through to KVM. The difficulty is to disable
>>>> split lock detection in KVM because that will disable split lock on the whole
>>>> core including threads for the host. Without disabling split lock in KVM,
>>>> it's doable to debug split lock in KVM.
>>>> 
>>>> Sean and Xiaoyao are working on split lock for KVM (in separate patch set).
>>>> They may have insight on how to do this.
>>> 
>>> Yes, with SMT off KVM could allow the guest to enable split lock #AC, but
>>> for the initial implementation we'd want to allow it if and only if split
>>> lock #AC is disabled in the host kernel.  Otherwise we have to pull in the
>>> logic to control whether or not a guest can disable split lock #AC, what
>>> to do if a split lock #AC happens when it's enabled by the host but
>>> disabled by the guest, etc...
>> What’s the actual issue?  There’s a window around entry and exit when a split lock in the host might not give #AC, but as long as no user code is run, this doesn’t seem like a big problem.
> The problem is that guest can trigger split locked memory access just by disabling split lock #AC even when host has it enabled. In this situation, there is bus lock held on the hardware without #AC triggered, which is conflict with the purpose that host enables split lock #AC

Fair enough. You need some way to get this enabled in guests eventually, though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ