linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* LSM module for SGX?
@ 2019-06-27 12:56 Jarkko Sakkinen
  2019-06-27 13:41 ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2019-06-27 12:56 UTC (permalink / raw)
  To: linux-security-module, linux-sgx, x86
  Cc: casey.schaufler, jmorris, luto, sean.j.christopherson

Looking at the SGX-LSM discussions I haven't seen even a single email
that would have any conclusions that the new hooks are the only possible
route to limit the privileges to use SGX.

An obvious alternative to consider might be to have a small-scale LSM
that you could stack. AFAIK Casey's LSM stacking patch set has not yet
landed but I also remember that with some constraints you can still do
it. Casey explained these constraints to me few years ago but I can't
recall them anymore :-)

One example of this is Yama, which limits the use of ptrace(). You can
enable it together with any of the "big" LSMs in the kernel.

A major benefit in this approach would that it is non-intrusive when it
comes to other architectures than x86. New hooks are not only
maintenance burden for those who care about SGX but also for those who
have to deal with LSMs.

/Jarkko


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LSM module for SGX?
  2019-06-27 12:56 LSM module for SGX? Jarkko Sakkinen
@ 2019-06-27 13:41 ` Stephen Smalley
  2019-06-27 19:20   ` Xing, Cedric
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2019-06-27 13:41 UTC (permalink / raw)
  To: Jarkko Sakkinen, linux-security-module, linux-sgx, x86
  Cc: casey.schaufler, jmorris, luto, sean.j.christopherson

On 6/27/19 8:56 AM, Jarkko Sakkinen wrote:
> Looking at the SGX-LSM discussions I haven't seen even a single email
> that would have any conclusions that the new hooks are the only possible
> route to limit the privileges to use SGX.
> 
> An obvious alternative to consider might be to have a small-scale LSM
> that you could stack. AFAIK Casey's LSM stacking patch set has not yet
> landed but I also remember that with some constraints you can still do
> it. Casey explained these constraints to me few years ago but I can't
> recall them anymore :-)
> 
> One example of this is Yama, which limits the use of ptrace(). You can
> enable it together with any of the "big" LSMs in the kernel.
> 
> A major benefit in this approach would that it is non-intrusive when it
> comes to other architectures than x86. New hooks are not only
> maintenance burden for those who care about SGX but also for those who
> have to deal with LSMs.

Regardless of whether or not you or anyone else creates such a 
small-scale LSM, we would still want to be able to control the loading 
of enclaves and the creation of executable enclave mappings via SELinux 
policy, so the hooks would be necessary anyway.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: LSM module for SGX?
  2019-06-27 13:41 ` Stephen Smalley
@ 2019-06-27 19:20   ` Xing, Cedric
  0 siblings, 0 replies; 3+ messages in thread
From: Xing, Cedric @ 2019-06-27 19:20 UTC (permalink / raw)
  To: Stephen Smalley, Jarkko Sakkinen, linux-security-module, linux-sgx, x86
  Cc: Schaufler, Casey, jmorris, luto, Christopherson, Sean J

> From: linux-sgx-owner@vger.kernel.org [mailto:linux-sgx-
> owner@vger.kernel.org] On Behalf Of Stephen Smalley
> Sent: Thursday, June 27, 2019 6:42 AM
> 
> On 6/27/19 8:56 AM, Jarkko Sakkinen wrote:
> > Looking at the SGX-LSM discussions I haven't seen even a single email
> > that would have any conclusions that the new hooks are the only
> possible
> > route to limit the privileges to use SGX.
> >
> > An obvious alternative to consider might be to have a small-scale LSM
> > that you could stack. AFAIK Casey's LSM stacking patch set has not yet
> > landed but I also remember that with some constraints you can still do
> > it. Casey explained these constraints to me few years ago but I can't
> > recall them anymore :-)
> >
> > One example of this is Yama, which limits the use of ptrace(). You can
> > enable it together with any of the "big" LSMs in the kernel.
> >
> > A major benefit in this approach would that it is non-intrusive when
> it
> > comes to other architectures than x86. New hooks are not only
> > maintenance burden for those who care about SGX but also for those who
> > have to deal with LSMs.
> 
> Regardless of whether or not you or anyone else creates such a
> small-scale LSM, we would still want to be able to control the loading
> of enclaves and the creation of executable enclave mappings via SELinux
> policy, so the hooks would be necessary anyway.

Just want to add that, no matter it is incorporated into a big or separated into a small LSM module, hooks are always necessary. The difference is just which LSM module registers for those hooks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-27 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 12:56 LSM module for SGX? Jarkko Sakkinen
2019-06-27 13:41 ` Stephen Smalley
2019-06-27 19:20   ` Xing, Cedric

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).