From: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
To: Borislav Petkov <bp@alien8.de>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
x86@kernel.org, linux-sgx@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/sgx: Initialize "ret" in sgx_ioc_enclave_add_pages()
Date: Thu, 3 Dec 2020 20:24:54 +0200 [thread overview]
Message-ID: <20201203182454.GA123023@kapsi.fi> (raw)
In-Reply-To: <20201202173829.GG2951@zn.tnic>
On Wed, Dec 02, 2020 at 06:38:29PM +0100, Borislav Petkov wrote:
> On Wed, Dec 02, 2020 at 06:22:00PM +0200, Jarkko Sakkinen wrote:
> > Initialize "ret" to zero as otherwise a zero length address range will
> > leave it uninitialized.
>
> That length is:
>
> * @length: length of the data (multiple of the page size)
>
> I think we wanna fail this even earlier when it wants to add data of
> length 0 because that sounds nonsensical to me. Or is there some use
> case for zero-length data?
>
> Btw, pls CC lkml on patch submissions.
Yeah, makes sense to fail right after copying the parameter struct
with -EINVAL.
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
>
/Jarkko
prev parent reply other threads:[~2020-12-03 18:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 16:22 [PATCH] x86/sgx: Initialize "ret" in sgx_ioc_enclave_add_pages() Jarkko Sakkinen
2020-12-02 17:38 ` Borislav Petkov
2020-12-03 18:24 ` 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=20201203182454.GA123023@kapsi.fi \
--to=jarkko.sakkinen@iki.fi \
--cc=bp@alien8.de \
--cc=dan.carpenter@oracle.com \
--cc=dave.hansen@linux.intel.com \
--cc=jarkko@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--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