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: <CALMp9eRhHfoy7cL0x3qUMOHn4DUacHGc_497ac1QMPbiGU9O5g@mail.gmail.com>
Date:   Mon, 05 Feb 2018 22:26:44 +0000
From:   Jim Mattson <jmattson@...gle.com>
To:     KarimAllah Ahmed <karahmed@...zon.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>
Subject: Re: [RFC 03/12] KVM/VMX: Use the new host mapping API for virtual_apic_page

On Mon, Feb 5, 2018 at 10:48 AM KarimAllah Ahmed <karahmed@...zon.de> wrote:

> @@ -5264,9 +5264,8 @@ static void
vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)

>          max_irr = find_last_bit((unsigned long
*)vmx->nested.pi_desc->pir, 256);
>          if (max_irr != 256) {
> -               vapic_page = kmap(vmx->nested.virtual_apic_page);
> +               vapic_page = vmx->nested.virtual_apic_mapping.kaddr;
>                  __kvm_apic_update_irr(vmx->nested.pi_desc->pir,
vapic_page);
> -               kunmap(vmx->nested.virtual_apic_page);

Your kernel mapping now survives exits to userspace. I didn't think that
was kosher, but I'd be happy to hear that I'm wrong.

> @@ -7502,10 +7501,8 @@ static void free_nested(struct vcpu_vmx *vmx)
>          /* Unpin physical memory we referred to in the vmcs02 */
>          if (vmx->nested.apic_access_mapping.pfn)

kvm_release_host_mapping(&vmx->nested.apic_access_mapping, true);
> -       if (vmx->nested.virtual_apic_page) {
> -               kvm_release_page_dirty(vmx->nested.virtual_apic_page);
> -               vmx->nested.virtual_apic_page = NULL;
> -       }
> +       if (vmx->nested.virtual_apic_mapping.pfn)
> +
kvm_release_host_mapping(&vmx->nested.virtual_apic_mapping, true);

Is the host PFN guaranteed to be non-zero?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ