[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13a43c8d9e9d103009e652e7e8ff49e6844316d5.camel@kernel.org>
Date: Tue, 05 Apr 2022 21:30:10 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Reinette Chatre <reinette.chatre@...el.com>,
linux-sgx@...r.kernel.rog
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Nathaniel McCallum <nathaniel@...fian.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
"open list:INTEL SGX" <linux-sgx@...r.kernel.org>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] x86/sgx: Simplify struct
sgx_enclave_restrict_permissions
On Tue, 2022-04-05 at 10:21 -0700, Reinette Chatre wrote:
> Hi Jarkko,
>
> On 4/5/2022 8:16 AM, Jarkko Sakkinen wrote:
> > The reasoning to change SECINFO to simply flags is stated in this inline
> > comment:
> >
> > /*
> > * Return valid permission fields from a secinfo structure provided by
> > * user space. The secinfo structure is required to only have bits in
> > * the permission fields set.
> > */
> >
> > It is better to simply change the parameter type than require to use
> > a malformed version of a data structure.
>
> Could you please elaborate what is malformed?
The structure that is accepted by the API. According to SDM permission
changes are done with a structure where PT_REG is set, which gives
-EINVAL. I categorize it as a bug.
BR, Jarkko
Powered by blists - more mailing lists