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, 02 Mar 2021 13:33:22 +1300
From:   Kai Huang <kai.huang@...el.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, x86@...nel.org, linux-sgx@...r.kernel.org,
        linux-kernel@...r.kernel.org, jarkko@...nel.org, luto@...nel.org,
        dave.hansen@...el.com, rick.p.edgecombe@...el.com,
        haitao.huang@...el.com, pbonzini@...hat.com, bp@...en8.de,
        tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH 05/25] x86/sgx: Introduce virtual EPC for use by KVM
 guests

On Mon, 2021-03-01 at 08:21 -0800, Sean Christopherson wrote:
> On Mon, Mar 01, 2021, Kai Huang wrote:
> > +	/*
> > +	 * SECS pages are "pinned" by child pages, an unpinned once all
> 
> s/an/and

Thanks!

> 
> > +	 * children have been EREMOVE'd.  A child page in this instance
> > +	 * may have pinned an SECS page encountered in an earlier release(),
> > +	 * creating a zombie.  Since some children were EREMOVE'd above,
> > +	 * try to EREMOVE all zombies in the hopes that one was unpinned.
> > +	 */
> > +	mutex_lock(&zombie_secs_pages_lock);
> > +	list_for_each_entry_safe(epc_page, tmp, &zombie_secs_pages, list) {
> > +		/*
> > +		 * Speculatively remove the page from the list of zombies,
> > +		 * if the page is successfully EREMOVE it will be added to
> > +		 * the list of free pages.  If EREMOVE fails, throw the page
> > +		 * on the local list, which will be spliced on at the end.
> > +		 */
> > +		list_del(&epc_page->list);
> > +
> > +		if (sgx_vepc_free_page(epc_page))
> > +			list_add_tail(&epc_page->list, &secs_pages);
> > +	}
> > +
> > +	if (!list_empty(&secs_pages))
> > +		list_splice_tail(&secs_pages, &zombie_secs_pages);
> > +	mutex_unlock(&zombie_secs_pages_lock);
> > +
> > +	kfree(vepc);
> > +
> > +	return 0;
> > +}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ