Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1095171yba; Wed, 15 May 2019 15:49:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTAdrvh2z6vCYF+Wu7KK2tBj6CM94XccZ8hOEefa6LsJgRgf4Ecbj/an3qfpfJKTF3Jedf X-Received: by 2002:a62:164f:: with SMTP id 76mr50758517pfw.172.1557960595652; Wed, 15 May 2019 15:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557960595; cv=none; d=google.com; s=arc-20160816; b=D6t9PG+BSOMgXFFiWkJ/MtqEWseSEI/bNLnlys3P9dKPV8p+YPQiuTGgD390frl10w 6R6pRz4FH2ObagjiOJCkDdNzCFIL8agWghvGsVC3gVfvN2a0Sgn1OveXKUHBj+qR+/hQ KE15kfcRALZ4bXaaFeP6UT5SaRehkWGF7XgdlQNG2IQ3LlKGTGCOiVCBRhE2yk+/HFSA dGKQ0Odkm3hLCMUtyGzwz8gqzPmO5AdcCJhl3wEoBgoLOidRRVxoaNTGPWcmfopC4PES RFtjVi+jy2aTkwn7QXyRaR1v4+5wIP4CQ23WT/uxDgWW2zsRXXKbvtZj3grmRnw+cHCe PLtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=FzFDH556nxMe25zgJ8USBCCYND+p7dxqJs7WmCiCYao=; b=saY1fedjojgkTmjtJDav02S8P2XgveTwdeDDdj4RBq7GmRmTffXYJAgRvBn/2xvPAJ +FF/Cp0xbd6PI9u8M+g5p/CLqaZTvjPihrB5g4BexbOS94szHiXF1RxtRAa4liJntj1f XEImAjGR+7J6XR31pNZdLEz6w0siQ8EjcUDWIsNex10no4sS6l7tq3wRjTm2Zq4VJ7o0 jdM8kBH2VvGt+8makWkAhboa9JpN10ys5nz34EfJpoPfbNDWGqSSbBkpJ2r2LMRK2Ipx WrNxqLkDT7q31yzKVvdIzinNYOwQadR8CVCaUOswS6TjhCGVjok+/5hPWBa4EgWU7vH8 Ksxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si3164389pgp.54.2019.05.15.15.49.40; Wed, 15 May 2019 15:49:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbfEOWrJ (ORCPT + 99 others); Wed, 15 May 2019 18:47:09 -0400 Received: from namei.org ([65.99.196.166]:39390 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbfEOWrI (ORCPT ); Wed, 15 May 2019 18:47:08 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x4FMkS7O029404; Wed, 15 May 2019 22:46:28 GMT Date: Thu, 16 May 2019 08:46:28 +1000 (AEST) From: James Morris To: Andy Lutomirski cc: Sean Christopherson , "Serge E. Hallyn" , LSM List , Paul Moore , Stephen Smalley , Eric Paris , selinux@vger.kernel.org, Jarkko Sakkinen , Jethro Beekman , "Xing, Cedric" , "Hansen, Dave" , Thomas Gleixner , "Dr. Greg" , Linus Torvalds , LKML , X86 ML , "linux-sgx@vger.kernel.org" , Andrew Morton , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "Katz-zamir, Shay" , "Huang, Haitao" , Andy Shevchenko , "Svahn, Kai" , Borislav Petkov , Josh Triplett , "Huang, Kai" , David Rientjes Subject: Re: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support) In-Reply-To: Message-ID: References: <8fe520bb-30bd-f246-a3d8-c5443e47a014@intel.com> <358e9b36-230f-eb18-efdb-b472be8438b4@fortanix.com> <960B34DE67B9E140824F1DCDEC400C0F4E886094@ORSMSX116.amr.corp.intel.com> <6da269d8-7ebb-4177-b6a7-50cc5b435cf4@fortanix.com> <20190513102926.GD8743@linux.intel.com> <20190514104323.GA7591@linux.intel.com> <20190514204527.GC1977@linux.intel.com> <20190515013031.GF1977@linux.intel.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 May 2019, Andy Lutomirski wrote: > > Why not just use an xattr, like security.sgx ? > > Wouldn't this make it so that only someone with CAP_MAC_ADMIN could > install an enclave? I think that this decision should be left up the > administrator, and it should be easy to set up a loose policy where > anyone can load whatever enclave they want. That's what would happen > in my proposal if there was no LSM loaded or of the LSM policy didn't > restrict what .sigstruct files were acceptable. > You could try user.sigstruct, which does not require any privs. -- James Morris