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: <f5e08c03f6815945588f3eaf47dcee9ff166800e.camel@infradead.org>
Date:   Wed, 04 Oct 2023 18:19:55 +0100
From:   David Woodhouse <dwmw2@...radead.org>
To:     Paul Durrant <paul@....org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Paul Durrant <pdurrant@...zon.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH] KVM: xen: ignore the VCPU_SSHOTTMR_future flag

On Wed, 2023-10-04 at 17:11 +0000, Paul Durrant wrote:
> From: Paul Durrant <pdurrant@...zon.com>
> 
> Upstream Xen now ignores this flag [1], since the only guest kernel ever to
> use it was buggy. By ignoring the flag the guest will always get a callback
> if it sets a negative timeout which upstream Xen has determined not to
> cause problems for any guest setting the flag.
> 
> [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909
> 
> Signed-off-by: Paul Durrant <pdurrant@...zon.com>

nit: I think the commit title should probably be 'KVM: x86:' and then
mention Xen somewhere in the rest of the line?

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

> ---
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Sean Christopherson <seanjc@...gle.com>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: x86@...nel.org
> ---
>  arch/x86/kvm/xen.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
> index 40edf4d1974c..8f1d46df0f3b 100644
> --- a/arch/x86/kvm/xen.c
> +++ b/arch/x86/kvm/xen.c
> @@ -1374,12 +1374,8 @@ static bool kvm_xen_hcall_vcpu_op(struct kvm_vcpu *vcpu, bool longmode, int cmd,
>                         return true;
>                 }
>  
> +               /* A delta <= 0 results in an immediate callback, which is what we want */
>                 delta = oneshot.timeout_abs_ns - get_kvmclock_ns(vcpu->kvm);
> -               if ((oneshot.flags & VCPU_SSHOTTMR_future) && delta < 0) {
> -                       *r = -ETIME;
> -                       return true;
> -               }
> -
>                 kvm_xen_start_timer(vcpu, oneshot.timeout_abs_ns, delta);
>                 *r = 0;
>                 return true;


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