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: <op.2b73akfkwjvjmi@hhuan26-mobl.amr.corp.intel.com>
Date:   Tue, 03 Oct 2023 00:09:46 -0500
From:   "Haitao Huang" <haitao.huang@...ux.intel.com>
To:     "hpa@...or.com" <hpa@...or.com>,
        "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
        "bp@...en8.de" <bp@...en8.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jarkko@...nel.org" <jarkko@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "Mehta, Sohil" <sohil.mehta@...el.com>,
        "tj@...nel.org" <tj@...nel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "Huang, Kai" <kai.huang@...el.com>
Cc:     "kristen@...ux.intel.com" <kristen@...ux.intel.com>,
        "yangjie@...rosoft.com" <yangjie@...rosoft.com>,
        "Li, Zhiquan1" <zhiquan1.li@...el.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "mikko.ylinen@...ux.intel.com" <mikko.ylinen@...ux.intel.com>,
        "Zhang, Bo" <zhanb@...rosoft.com>,
        "anakrish@...rosoft.com" <anakrish@...rosoft.com>
Subject: Re: [PATCH v5 08/18] x86/sgx: Use a list to track to-be-reclaimed
 pages

On Thu, 28 Sep 2023 04:28:34 -0500, Huang, Kai <kai.huang@...el.com> wrote:

> On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote:
>> @@ -314,18 +313,22 @@ static void sgx_reclaim_pages(void)
>>   		if (kref_get_unless_zero(&encl_page->encl->refcount) != 0) {
>>  			sgx_epc_page_set_state(epc_page, SGX_EPC_PAGE_RECLAIM_IN_PROGRESS);
>> -			chunk[cnt++] = epc_page;
>> +			list_move_tail(&epc_page->list, &iso);
>>  		} else {
>> -			/* The owner is freeing the page. No need to add the
>> -			 * page back to the list of reclaimable pages.
>> +			/* The owner is freeing the page, remove it from the
>> +			 * LRU list
>>  			 */
>
> Please fix comment style.

Sure

>
>>  			sgx_epc_page_reset_state(epc_page);
>> +			list_del_init(&epc_page->list);
>
> Is this still needed?  It seems list_del_init() has been done when the  
> EPC page
> is taken off from the global active list?
>

Good catch. I'll remove it.

Thanks
Haitao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ