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:   Thu, 21 Nov 2019 11:32:15 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Yang Weijiang <weijiang.yang@...el.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, jmattson@...gle.com,
        sean.j.christopherson@...el.com
Cc:     yu.c.zhang@...ux.intel.com, alazar@...defender.com,
        edwin.zhai@...el.com
Subject: Re: [PATCH v7 8/9] mmu: spp: Handle SPP protected pages when VM
 memory changes

On 19/11/19 09:49, Yang Weijiang wrote:
> +			/*
> +			 * if it's EPT leaf entry and the physical page is
> +			 * SPP protected, then re-enable SPP protection for
> +			 * the page.
> +			 */
> +			if (kvm->arch.spp_active &&
> +			    level == PT_PAGE_TABLE_LEVEL) {
> +				struct kvm_subpage spp_info = {0};
> +				int i;
> +
> +				spp_info.base_gfn = gfn;
> +				spp_info.npages = 1;
> +				i = kvm_spp_get_permission(kvm, &spp_info);
> +				if (i == 1 &&
> +				    spp_info.access_map[0] != FULL_SPP_ACCESS)
> +					new_spte |= PT_SPP_MASK;
> +			}

This can use gfn_to_subpage_wp_info directly (or is_spp_protected if you
prefer).

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ