All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-sgx@vger.kernel.org
Subject: Re: [PATCH for_v29] selftest/sgx: Remove printing of segments during enclave load
Date: Mon, 30 Mar 2020 23:46:53 +0300	[thread overview]
Message-ID: <20200330204653.GG1384380@linux.intel.com> (raw)
In-Reply-To: <20200330173220.28572-1-sean.j.christopherson@intel.com>

On Mon, Mar 30, 2020 at 10:32:20AM -0700, Sean Christopherson wrote:
> Don't print the enclave's segment information during load.  Most
> failures are unlikely to be related to the loader/protections, and
> without context, e.g. printing what the numbers mean, the output is
> unhelpful and distracting.
> 
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  tools/testing/selftests/sgx/load.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/sgx/load.c b/tools/testing/selftests/sgx/load.c
> index 35a2d7a47dd5..1a10b92adfa0 100644
> --- a/tools/testing/selftests/sgx/load.c
> +++ b/tools/testing/selftests/sgx/load.c
> @@ -204,9 +204,6 @@ bool encl_load(const char *path, struct encl *encl)
>  		seg->offset = (phdr->p_offset & PAGE_MASK) - src_offset;
>  		seg->size = (phdr->p_filesz + PAGE_SIZE - 1) & PAGE_MASK;
>  
> -		printf("0x%016lx 0x%016lx 0x%02x\n", seg->offset, seg->size,
> -		       seg->prot);
> -

It is really useful to have this always there since it reveals
immediately bunch of regressions when touching the loader. It has shown
already useful at least a dozen of times. Thus, I don't seriously want
to remove it.

I suggest that you add something like "--print-layout" to the test
program. I'm cool with *optionally* having the print. You appreciate
to have it there when something goes wrong.

/Jarkko

      reply	other threads:[~2020-03-30 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 17:32 [PATCH for_v29] selftest/sgx: Remove printing of segments during enclave load Sean Christopherson
2020-03-30 20:46 ` Jarkko Sakkinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200330204653.GG1384380@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=linux-sgx@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.