From: Jarkko Sakkinen <jarkko@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: linux-sgx@vger.kernel.org,
Haitao Huang <haitao.huang@linux.intel.com>,
Vijay Dhanraj <vijay.dhanraj@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Kai Huang <kai.huang@intel.com>,
stable@vger.kernel.org, Paul Menzel <pmenzel@molgen.mpg.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] x86/sgx: Do not fail on incomplete sanitization on premature stop of ksgxd
Date: Fri, 9 Sep 2022 00:10:48 +0300 [thread overview]
Message-ID: <YxpaWMoeQS2ccwY8@kernel.org> (raw)
In-Reply-To: <c39e5088-b26e-b518-d7ec-3748f6bb76f7@intel.com>
On Thu, Sep 08, 2022 at 12:53:55PM -0700, Reinette Chatre wrote:
>
>
> On 9/5/2022 5:02 PM, Jarkko Sakkinen wrote:
> > Unsanitized pages trigger WARN_ON() unconditionally, which can panic the
> > whole computer, if /proc/sys/kernel/panic_on_warn is set.
> >
> > In sgx_init(), if misc_register() fails or misc_register() succeeds but
> > neither sgx_drv_init() nor sgx_vepc_init() succeeds, then ksgxd will be
> > prematurely stopped. This may leave unsanitized pages, which will result a
> > false warning.
> >
> > Refine __sgx_sanitize_pages() to return:
> >
> > 1. Zero when the sanitization process is complete or ksgxd has been
> > requested to stop.
> > 2. The number of unsanitized pages otherwise.
> >
> > Link: https://lore.kernel.org/linux-sgx/20220825051827.246698-1-jarkko@kernel.org/T/#u
> > Fixes: 51ab30eb2ad4 ("x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list")
> > Cc: stable@vger.kernel.org # v5.13+
> > Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Thanks.
I also split down the long augment test also into pieces now,
as you requested, and I think it is now somewhat clean.
BR, Jarkko
next prev parent reply other threads:[~2022-09-08 21:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 0:02 [PATCH v3 0/2] Critical fixes for v6.0 Jarkko Sakkinen
2022-09-06 0:02 ` [PATCH v3 1/2] x86/sgx: Do not fail on incomplete sanitization on premature stop of ksgxd Jarkko Sakkinen
2022-09-06 10:01 ` Huang, Kai
2022-09-08 19:53 ` Reinette Chatre
2022-09-08 21:10 ` Jarkko Sakkinen [this message]
2022-09-06 0:02 ` [PATCH v3 2/2] x86/sgx: Handle VA page allocation failure for EAUG on PF 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=YxpaWMoeQS2ccwY8@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=haitao.huang@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kai.huang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pmenzel@molgen.mpg.de \
--cc=reinette.chatre@intel.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vijay.dhanraj@intel.com \
--cc=x86@kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).