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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a2626528-1819-07f2-24f2-ded6437cca5d@de.ibm.com>
Date:   Thu, 19 Jul 2018 12:23:34 +0200
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     David Woodhouse <dwmw2@...radead.org>, paulmck@...ux.vnet.ibm.com
Cc:     Peter Zijlstra <peterz@...radead.org>, mhillenb@...zon.de,
        linux-kernel <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [RFC] Make need_resched() return true when rcu_urgent_qs
 requested



On 07/19/2018 09:20 AM, David Woodhouse wrote:
> On Thu, 2018-07-19 at 08:45 +0200, Christian Borntraeger wrote:
>>
>>> My thought would be something like this:
>>>  
>>>        if (context_tracking_cpu_is_enabled())
>>>                rcu_kvm_enter();
>>>        else
>>>                rcu_virt_note_context_switch(smp_processor_id());
>>
>> In the past we needed that (when we introduced that). At least with every
>> host interrupt we called this making an rcu event at least every HZ.
>> Will the changes in need_resched make this part unnecessary?
> 
> Yes, the change in need_resched() should make this part unnecessary.
> Unless your architecture's version of the vcpu_run() loop just loops
> forever even when TIF_NEED_RESCHED is set? :)

Very early versions did that. The SIE instruction is interruptible
so you can continue to run the guest by simply returning from an host
interrupt. All sane versions of KVM on s390 now make sure to make a
short trip into C after a host interrupt. There we check for
need_resched signals and machine checks so we are good.

> 
> I'm not sure about the context tracking condition in the code snippet
> cited above, though. I think that's what caused my problem in the first
> place — I have CONTEXT_TRACKING_FORCE && !NO_HZ_FULL. So in 4.15, that
> means rcu_user_enter() did nothing and rcu_virt_note_context_switch()
> wasn't called. Hence the observed stalls.
> 
> Should rcu_user_enter() itself be conditional on CONTEXT_TRACKING not
> NO_HZ_FULL? 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ