From: Christoph Hellwig <hch@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: ira.weiny@intel.com, Jarkko Sakkinen <jarkko@kernel.org>,
linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org
Subject: Re: [PATCH] x86: Remove unnecessary kmap() from sgx_ioc_enclave_init()
Date: Mon, 1 Feb 2021 08:48:12 +0000 [thread overview]
Message-ID: <20210201084812.GA3229269@infradead.org> (raw)
In-Reply-To: <YBRH2jfPKS8ZofMZ@google.com>
On Fri, Jan 29, 2021 at 09:37:30AM -0800, Sean Christopherson wrote:
> On Thu, Jan 28, 2021, ira.weiny@intel.com wrote:
> > From: Ira Weiny <ira.weiny@intel.com>
> >
> > There is no reason to alloc a page and kmap it to store this temporary
> > data from the user.
>
> Actually, there is, it's just poorly documented. The sigstruct needs to be
> page aligned, and the token needs to be 512-byte aligned. kmcalloc doesn't
> guarantee alignment. IIRC things will work until slub_debug is enabled, at
> which point the natural alignment behavior goes out the window.
Well, there still is absolutely no need for the kmap as you can use
page_address for a GFP_KERNEL allocation.
next prev parent reply other threads:[~2021-02-01 8:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 0:14 [PATCH] x86: Remove unnecessary kmap() from sgx_ioc_enclave_init() ira.weiny
2021-01-29 17:37 ` Sean Christopherson
2021-02-01 8:48 ` Christoph Hellwig [this message]
2021-02-02 17:37 ` Jarkko Sakkinen
2021-02-02 1:37 ira.weiny
2021-02-02 18:55 ` Dave Hansen
2021-02-02 22:43 ` 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=20210201084812.GA3229269@infradead.org \
--to=hch@infradead.org \
--cc=ira.weiny@intel.com \
--cc=jarkko@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=seanjc@google.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).