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] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2017 14:13:55 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay



On 29/06/2017 14:05, Wanpeng Li wrote:
> +            /* In case the sw timer triggered in the window */
> +            if (!apic_lvtt_period(apic)) {
> +                if (r || atomic_read(&apic->lapic_timer.pending)) {
> +                    need_cancel = true;
> +                    if (r)
> +                    apic_timer_expired(apic);
> +                }
> +            }

Yes, that's equivalent.  The compiler should thread the jumps as if it were:

	if (r) {
		apic_timer_expired(apic);
		goto cancel_timer;
	}
	if (atomic_read(&apic->lapic_timer.pending))
		goto cancel_timer;

so it produces pretty good code too.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ