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:   Tue, 09 Aug 2022 15:36:13 +0100
From:   David Woodhouse <dwmw2@...radead.org>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>
Cc:     Coleman Dietsch <dietschc@....edu>, kvm@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H . Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
        skhan@...uxfoundation.org, Pavel Skripkin <paskripkin@...il.com>,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        stable@...r.kernel.org,
        syzbot+e54f930ed78eb0f85281@...kaller.appspotmail.com,
        metikaya <metikaya@...zon.co.uk>
Subject: Re: [PATCH v3 2/2] KVM: x86/xen: Stop Xen timer before changing IRQ

On Tue, 2022-08-09 at 16:31 +0200, Paolo Bonzini wrote:
> On 8/9/22 16:16, David Woodhouse wrote:
> > I find the new version a bit harder to follow, with its init-then-stop-
> > then-start logic:
> > 
> > 	case KVM_XEN_VCPU_ATTR_TYPE_TIMER:
> > 		if (data->u.timer.port &&
> > 		    data->u.timer.priority != KVM_IRQ_ROUTING_XEN_EVTCHN_PRIO_2LEVEL) {
> > 			r = -EINVAL;
> > 			break;
> >                  }
> > 
> > 		if (!vcpu->arch.xen.timer.function)
> > 			kvm_xen_init_timer(vcpu);
> > 
> > 		/* Stop the timer (if it's running) before changing the vector */
> > 		kvm_xen_stop_timer(vcpu);
> > 		vcpu->arch.xen.timer_virq = data->u.timer.port;
> 
> 
> I think this is fine, if anything the kvm_xen_stop_timer() call could be 
> placed in an "else" but I'm leaning towards applying this version of the 
> patch.

Fair enough. It should definitely work, and is functionally identical
in all interesting cases. In that case, for both of the patches from
this v3 series:

Acked-by: David Woodhouse <dwmw@...zon.co.uk>

Thanks.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ