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]
Message-ID: <a7a5e723-700a-db6f-afd4-1be8e7e9999c@redhat.com>
Date:   Mon, 31 Jul 2017 16:23:55 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Marc Zyngier <marc.zyngier@....com>,
        "Longpeng(Mike)" <longpeng2@...wei.com>, rkrcmar@...hat.com
Cc:     agraf@...e.com, borntraeger@...ibm.com, cohuck@...hat.com,
        christoffer.dall@...aro.org, james.hogan@...tec.com,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        weidong.huang@...wei.com, arei.gonglei@...wei.com,
        wangxinxin.wang@...wei.com, longpeng.mike@...il.com
Subject: Re: [RFC] KVM: optimize the kvm_vcpu_on_spin

On 31/07/2017 15:42, Marc Zyngier wrote:
>> If the vcpu(me) exit due to request a usermode spinlock, then
>> the spinlock-holder may be preempted in usermode or kernmode.
>> But if the vcpu(me) is in kernmode, then the holder must be
>> preempted in kernmode, so we should choose a vcpu in kernmode
>> as the most eligible candidate.
>
> That seems to preclude any form of locking between userspace and kernel
> (which probably wouldn't be Linux). Are you sure that this form of
> construct is not used anywhere? I have the feeling this patch could
> break this scenario...

It's just a heuristic; it would only be broken if you overcommit, and it
would be just as broken as if KVM didn't implement directed yield at all.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ