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,  2 Feb 2023 00:40:33 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Sean Christopherson <seanjc@...gle.com>, kvm@...r.kernel.org,
        Emanuele Giuseppe Esposito <eesposit@...hat.com>
Cc:     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>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, Shuah Khan <shuah@...nel.org>,
        Gautam Menghani <gautammenghani201@...il.com>,
        Zeng Guang <guang.zeng@...el.com>,
        Krish Sadhukhan <krish.sadhukhan@...cle.com>,
        Jim Mattson <jmattson@...gle.com>,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [RFC PATCH 0/2] xapic: make sure x2APIC -> xapic transition correctly

On Mon, 09 Jan 2023 08:06:03 -0500, Emanuele Giuseppe Esposito wrote:
> The root cause is kvm_lapic_set_base() failing to handle x2APIC -> xapic ID
> switch, which is addressed by patch 1.
> Patch 2 provides a selftest to verify this behavior.
> 
> This serie is an RFC because I think that commit ef40757743b47 already tries to
> fix one such effect of the error made in kvm_lapic_set_base, but I am not sure
> how such error described in the commit message is triggered, nor how to
> reproduce it using a selftest. I don't think one can enable/disable x2APIC using
> KVM_SET_LAPIC, and kvm_lapic_set_base() in kvm_apic_set_state() just takes care
> of updating apic->base_address, since value == old_value.
> The test in patch 2 fails with the fix in ef40757743b47.
> 
> [...]

Applied to kvm-x86 apic, with the tweak of only stuffing the APIC_ID if the
APIC is enabled.  I also heavily reworked the testcase (see feedback on that
patch).

Thanks!

[1/2] KVM: x86: Reinitialize xAPIC ID when userspace forces x2APIC => xAPIC
      https://github.com/kvm-x86/linux/commit/052c3b99cbc8
[2/2] KVM: selftests: Verify APIC_ID is set when forcing x2APIC=>xAPIC transition
      https://github.com/kvm-x86/linux/commit/eb9819257631

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ