lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55cd5349e58c44113ae976e04ea4c6dc0cfba66d.camel@kernel.org>
Date:   Wed, 06 Apr 2022 10:32:02 +0300
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Reinette Chatre <reinette.chatre@...el.com>
Cc:     dave.hansen@...ux.intel.com, tglx@...utronix.de, bp@...en8.de,
        luto@...nel.org, mingo@...hat.com, linux-sgx@...r.kernel.org,
        x86@...nel.org, seanjc@...gle.com, kai.huang@...el.com,
        cathy.zhang@...el.com, cedric.xing@...el.com,
        haitao.huang@...el.com, mark.shanahan@...el.com, hpa@...or.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 17/30] x86/sgx: Support modifying SGX page type

On Tue, 2022-04-05 at 11:59 -0700, Reinette Chatre wrote:
> Hi Jarkko,
> 
> On 4/5/2022 11:41 AM, Jarkko Sakkinen wrote:
> > On Tue, 2022-04-05 at 10:05 -0700, Reinette Chatre wrote:
> > > Hi Jarkko,
> > > 
> > > On 4/5/2022 8:34 AM, Jarkko Sakkinen wrote:
> > > > On Tue, 2022-04-05 at 10:06 +0300, Jarkko Sakkinen wrote:
> > > 
> > > > > > 
> > > > > 
> > > > > To be coherent with other names, this should be
> > > > > SGX_IOC_ENCLAVE_MODIFY_TYPES.
> > > 
> > > This is not such a clear change request to me:
> > > 
> > > SGX_IOC_ENCLAVE_ADD_PAGES - add multiple pages
> > > SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS - restrict multiple permissions
> > > SGX_IOC_ENCLAVE_REMOVE_PAGES - remove multiple pages
> > > SGX_IOC_ENCLAVE_MODIFY_TYPE - set a single type
> > > 
> > > Perhaps it should rather be SGX_IOC_ENCLAVE_SET_TYPE to indicate that
> > > there is a single target type as opposed to the possibility
> > > of multiple source types (TCS and regular pages can be trimmed).
> > > 
> > > > 
> 
> What is your opinion about what the ioctl() name should be? I prefer
> to obtain a confirmation from you since you originally [1] requested
> SGX_IOC_ENCLAVE_MODIFY_TYPE.

s/TYPE/TYPES/g i.e. SGX_IOC_ENCLAVE_MODIFY_TYPES is fine.
> 
> > > > This should take only page type given that flags are zeroed:
> > > > 
> > > > EPCM(DS:RCX).R := 0;
> > > > EPCM(DS:RCX).W := 0;
> > > > EPCM(DS:RCX).X := 0; 
> > > > 
> > > 
> > > ok, this was how it was done in V1 [1] and I can go back to that.
> > 
> > I would name the fields as "flags" and "page_type" just to align
> > names with SGX instead of trying to mimim "posix names". Otherwise, 
> > I support that.
> 
> I will move this ioctl() to use "page_type" instead of "secinfo"
> within struct sgx_enclave_modify_type.
> 
> Your guidance of "flags" is not clear to me. I assume that you
> refer to the field for struct sgx_enclave_restrict_permissions
> where I think "permissions" to only contain the new permissions
> would be more appropriate. None of the other values in
> secinfo.flags are relevant.

I'm fine with your permissions field to the restrict ioctl.

> 
> Reinette
> 
> [1] https://lore.kernel.org/linux-sgx/Yav9g4+L8zg48DRf@iki.fi/
> 

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ