lkml.org 
[lkml]   [2020]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v30 12/20] x86/sgx: Add a page reclaimer
On Fri, May 15, 2020 at 03:44:02AM +0300, Jarkko Sakkinen wrote:
> +static void sgx_reclaimer_write(struct sgx_epc_page *epc_page,
> + struct sgx_backing *backing)
> +{
> + struct sgx_encl_page *encl_page = epc_page->owner;
> + struct sgx_encl *encl = encl_page->encl;
> + struct sgx_backing secs_backing;
> + int ret;
> +
> + mutex_lock(&encl->lock);
> +
> + if (atomic_read(&encl->flags) & SGX_ENCL_DEAD) {
> + ret = __eremove(sgx_epc_addr(epc_page));
> + ENCLS_WARN(ret, "EREMOVE returned %d\n");

The " returned %d\n" is unnecessary and leads to a bad message, ENCLS_WARN
handles the message and formatting, i.e. this should simply be:

ENCLS_WARN(ret, "EREMOVE");

> + } else {
> + sgx_encl_ewb(epc_page, backing);
> + }
> +
> + encl_page->epc_page = NULL;
> + encl->secs_child_cnt--;

\
 
 \ /
  Last update: 2020-05-22 09:17    [W:0.449 / U:6.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site