From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755934Ab0GLOhL (ORCPT ); Mon, 12 Jul 2010 10:37:11 -0400 Received: from msux-gh1-uea02.nsa.gov ([63.239.65.40]:42010 "EHLO msux-gh1-uea02.nsa.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755190Ab0GLOhI (ORCPT ); Mon, 12 Jul 2010 10:37:08 -0400 Subject: Re: [PATCH 06/10] NFSv4: Add label recommended attribute and NFSv4 flags From: Stephen Smalley To: Casey Schaufler Cc: Kyle Moffett , "David P. Quigley" , James Morris , "J. Bruce Fields" , hch@infradead.org, viro@zeniv.linux.org.uk, matthew.dodd@sparta.com, trond.myklebust@fys.uio.no, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, linux-nfs@vger.kernel.org In-Reply-To: <4C3952D6.7040608@schaufler-ca.com> References: <1278513086-23964-1-git-send-email-dpquigl@tycho.nsa.gov> <1278513086-23964-7-git-send-email-dpquigl@tycho.nsa.gov> <20100707170058.GD28815@fieldses.org> <1278596363.2494.194.camel@moss-terrapins.epoch.ncsc.mil> <1278684348.2494.223.camel@moss-terrapins.epoch.ncsc.mil> <4C3952D6.7040608@schaufler-ca.com> Content-Type: text/plain; charset="UTF-8" Organization: National Security Agency Date: Mon, 12 Jul 2010 10:36:36 -0400 Message-ID: <1278945396.5221.14.camel@moss-pluto.epoch.ncsc.mil> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2010-07-10 at 22:12 -0700, Casey Schaufler wrote: > Kyle Moffett wrote: > > ... > > Even in local filesystems like ext3 we prefer to turn labels into > > numbers, store the number with each inode, and then keep the labels > > indexed in a separate datastructure. > > > > I don't know what system you're talking about, but that notion > was pretty well dispelled in the late 1980's, after the SystemV/MLS > and SecureWare examples. SELinux did that too before switching to using xattrs for label storage. Persistent security identifier (PSID) associated with each inode (either stored directly in the inode in the original kernel patches or associated through a separate mapping in the LSM-based implementation), with a mapping from PSID to context stored in a mapping within each filesystem. Allowed you to keep the labels with the volume but avoided storing the same label multiple times. The xattr based implementation can sometimes share storage but only when the xattr is stored in the additional block (not when they are stored inline) and only if all of the xattrs on the file are identical. > > Cheers, > > Kyle Moffett > > > > > > -- Stephen Smalley National Security Agency From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [PATCH 06/10] NFSv4: Add label recommended attribute and NFSv4 flags From: Stephen Smalley To: Casey Schaufler Cc: Kyle Moffett , "David P. Quigley" , James Morris , "J. Bruce Fields" , hch@infradead.org, viro@zeniv.linux.org.uk, matthew.dodd@sparta.com, trond.myklebust@fys.uio.no, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, linux-nfs@vger.kernel.org In-Reply-To: <4C3952D6.7040608@schaufler-ca.com> References: <1278513086-23964-1-git-send-email-dpquigl@tycho.nsa.gov> <1278513086-23964-7-git-send-email-dpquigl@tycho.nsa.gov> <20100707170058.GD28815@fieldses.org> <1278596363.2494.194.camel@moss-terrapins.epoch.ncsc.mil> <1278684348.2494.223.camel@moss-terrapins.epoch.ncsc.mil> <4C3952D6.7040608@schaufler-ca.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 12 Jul 2010 10:36:36 -0400 Message-ID: <1278945396.5221.14.camel@moss-pluto.epoch.ncsc.mil> Mime-Version: 1.0 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov On Sat, 2010-07-10 at 22:12 -0700, Casey Schaufler wrote: > Kyle Moffett wrote: > > ... > > Even in local filesystems like ext3 we prefer to turn labels into > > numbers, store the number with each inode, and then keep the labels > > indexed in a separate datastructure. > > > > I don't know what system you're talking about, but that notion > was pretty well dispelled in the late 1980's, after the SystemV/MLS > and SecureWare examples. SELinux did that too before switching to using xattrs for label storage. Persistent security identifier (PSID) associated with each inode (either stored directly in the inode in the original kernel patches or associated through a separate mapping in the LSM-based implementation), with a mapping from PSID to context stored in a mapping within each filesystem. Allowed you to keep the labels with the volume but avoided storing the same label multiple times. The xattr based implementation can sometimes share storage but only when the xattr is stored in the additional block (not when they are stored inline) and only if all of the xattrs on the file are identical. > > Cheers, > > Kyle Moffett > > > > > > -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.