From: Jarkko Sakkinen <jarkko@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: "Dhanraj, Vijay" <vijay.dhanraj@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"linux-sgx@vger.kernel.org" <linux-sgx@vger.kernel.org>,
Shuah Khan <shuah@kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] selftests/sgx: Add SGX selftest augment_via_eaccept_long
Date: Wed, 17 Aug 2022 19:36:07 +0300 [thread overview]
Message-ID: <Yv0Y98oJ0+uPJlk8@kernel.org> (raw)
In-Reply-To: <69a5e350-ded9-30c9-dc41-d08c01dd05dc@intel.com>
On Wed, Aug 17, 2022 at 08:43:57AM -0700, Reinette Chatre wrote:
> Hi Jarkko,
>
> On 8/17/2022 7:53 AM, Jarkko Sakkinen wrote:
> > On Wed, Aug 17, 2022 at 05:44:31PM +0300, Jarkko Sakkinen wrote:
> >> On Tue, Aug 16, 2022 at 09:35:27PM -0700, Reinette Chatre wrote:
> >>>>>> This portion below was also copied from previous test and by only
> >>>>>> testing a write to the first page of the range the purpose is not
> >>>>>> clear. Could you please elaborate if the intention is to only test
> >>>>>> accessibility of the first page and why that is sufficient?
> >>>>>
> >>>>> It is sufficient because the test reproduces the bug. It would have to be
> >>>>> rather elaborated why you would possibly want to do more than that.
> >>>
> >>> That is fair. An accurate comment (currently an inaccurate copy&paste) would
> >>> help to explain this part of the test.
> >>
> >> I would simply add something like:
> >>
> >> /*
> >> * Define memory pool size big enough to trigger the reclaimer in the EAUG
> >> * path of the page reclaimer.
> >> */
> >>
> >> Suggestions/edits obviously welcome for the comment.
>
> The comment seems to better match the code below than the area referred to above:
> static const unsigned long edmm_size = 8589934592; //8G
>
> Even so, I think that raises the point that this is platform specific since
> edmm_size of 8GB would not trigger reclaimer on all platforms.
>
> How about adjusting it to:
> /*
> * Define memory pool size big enough to trigger the reclaimer in the EAUG
> * path of the page reclaimer on some platforms. This constant has been
> * successful in triggering a bug on some platforms (independent of the
> * platforms where the reclaimer is triggered) and thus considered
> * appropriate for general use.
> */
>
>
> Regarding the area referred to above, a comment like below may help:
>
> /*
> * Pool of pages were successfully added to enclave. Perform sanity
> * check on first page of the pool only to ensure data can be written
> * to and read from a dynamically added enclave page.
> */
>
> >
> > I wonder if we could put .bt files somewhere to make them available. In
> > root causing this bug bpftrace scripting was the key so it would nice to
> > have them available along with kselftest.
> >
> > I could imagine that we end up also in future to bugs allocation so
> > it would have the script when you clone the kernel tree, and possibly
> > more scripts in future.
> >
> > E.g. add bt/alloc-error.bt under tools/testing/selftests/sgx.
>
> Thank you very much for helping to debug this issue. I also think
> the scripts you created are very valuable and making them easily
> accessible sounds great.
Yeah, I mean they do no harm there, even if not directly used
by the test program.
Thanks for the valuable feedback. I will incorporate it to the
next version.
BR, Jarkko
next prev parent reply other threads:[~2022-08-17 16:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 23:38 [PATCH 1/2] x86/sgx: Handle VA page allocation failure for EAUG on PF Jarkko Sakkinen
2022-08-15 23:39 ` [PATCH 2/2] selftests/sgx: Add SGX selftest augment_via_eaccept_long Jarkko Sakkinen
2022-08-16 16:26 ` Reinette Chatre
2022-08-16 23:33 ` Jarkko Sakkinen
2022-08-16 23:37 ` Jarkko Sakkinen
2022-08-17 1:27 ` Dhanraj, Vijay
2022-08-17 4:35 ` Reinette Chatre
2022-08-17 14:44 ` Jarkko Sakkinen
2022-08-17 14:53 ` Jarkko Sakkinen
2022-08-17 15:43 ` Reinette Chatre
2022-08-17 16:36 ` Jarkko Sakkinen [this message]
2022-08-17 16:14 ` Dhanraj, Vijay
2022-08-17 14:38 ` Jarkko Sakkinen
2022-08-17 15:39 ` Dhanraj, Vijay
2022-08-25 1:28 ` Jarkko Sakkinen
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=Yv0Y98oJ0+uPJlk8@kernel.org \
--to=jarkko@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
--cc=vijay.dhanraj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).