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] x86/sgx: Return 0 when !CONFIG_INTEL_SGX_DRIVER
Date: Thu, 22 Aug 2019 04:26:19 +0300 [thread overview]
Message-ID: <20190822012619.jffd4guzjtczmwkr@linux.intel.com> (raw)
In-Reply-To: <20190822002940.hb7xjbrdkxxx4zoe@linux.intel.com>
On Thu, Aug 22, 2019 at 03:29:40AM +0300, Jarkko Sakkinen wrote:
> On Wed, Aug 21, 2019 at 10:24:00AM -0700, Sean Christopherson wrote:
> > How does the current code not align with this approach? The core subsystem
> > should tear itself down if loading the driver fails, which includes failing
> > because it doesn't exist.
>
> I get now the real issue that you are trying to point out (did not
> earlier). Still, I think your approach to fix it needs some
> reconsideration.
>
> Something that *does not exist* can never fail. That should be dead
> obvious.
>
> If the SGX driver does not exit and KVM does not have SGX support
> compiled in, then the only logical conclusion that you can end up with
> is that neither the SGX core should exist in vmlinux in the first place.
>
> This all summarizes to that I have to remove the INTEL_SGX_DRIVER
> kconfig flag. Its existence can only be considered when there >= 2
> in-kernel users for SGX.
The subdirectory for the driver has clearly turned into legacy with only
two source files and one header file in it.
Even if/when we want to add INTEL_SGX_DRIVER back it is easiest use it
in the main makefile.
I prepared snippets to execute these changes.
This is for driver.h, ioctl.c, main.c (rename):
git filter-branch -f --index-filter 'git ls-files -s | \
sed "s/sgx\/driver\/main\.c/sgx\/driver.c/" | \
GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && \
mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' mainline/master..master
This for for Makefile (remove):
git filter-branch -f --index-filter 'git ls-files -s | \
sed "/sgx\/driver\/Makefile/d" | \
GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && \
mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' mainline/master..master
/Jarkko
prev parent reply other threads:[~2019-08-22 1:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-14 14:32 [PATCH] x86/sgx: Return 0 when !CONFIG_INTEL_SGX_DRIVER Jarkko Sakkinen
2019-07-15 9:29 ` Jarkko Sakkinen
2019-07-15 13:59 ` Sean Christopherson
2019-08-01 16:22 ` Jarkko Sakkinen
2019-08-01 16:29 ` Sean Christopherson
2019-08-02 19:33 ` Jarkko Sakkinen
2019-08-13 1:22 ` Sean Christopherson
2019-08-15 21:56 ` Jarkko Sakkinen
2019-08-21 17:24 ` Sean Christopherson
2019-08-22 0:29 ` Jarkko Sakkinen
2019-08-22 0:31 ` Sean Christopherson
2019-08-22 14:42 ` Jarkko Sakkinen
2019-08-22 1:26 ` 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=20190822012619.jffd4guzjtczmwkr@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 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).