lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/5] x86/sgx: Use sgx_free_epc_page() in sgx_reclaim_pages()
From
Date
On 3/10/21 7:11 AM, Jarkko Sakkinen wrote:
>>> - section = &sgx_epc_sections[epc_page->section];
>>> - spin_lock(&section->lock);
>>> - list_add_tail(&epc_page->list, &section->page_list);
>>> - section->free_cnt++;
>>> - spin_unlock(&section->lock);
>>> + sgx_free_epc_page(epc_page);
>>> }
>>> }
>> In current upstream (3fb6d0e00e), sgx_free_epc_page() calls __eremove().
>> This code does not call __eremove(). That seems to be changing
>> behavior where none was intended.
> EREMOVE does not matter here, as it doesn't in almost all most of the sites
> where sgx_free_epc_page() is used in the driver. It does nothing to an
> uninitialized pages.
>
> The two patches that I posted originally for Kai's series took EREMOVE out
> of sgx_free_epc_page() and put an explicit EREMOVE where it is actually
> needed, but for reasons unknown to me, that change is gone.
>
> Replacing the ad-hoc code with sgx_free_epc_page() is absolutely the right
> action to take because it follows the pattern how sgx_free_epc_page() is
> used in the driver.

That sounds generally fine. But, this is a functional change. Where
there are functional changes, I always hope to see some mention of the
change in the changelog.

Could you add some of this to the next changelog, please?

\
 
 \ /
  Last update: 2021-03-10 16:57    [W:0.055 / U:4.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site