Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751059Ab0GKFDY (ORCPT ); Sun, 11 Jul 2010 01:03:24 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:54796 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873Ab0GKFDW (ORCPT ); Sun, 11 Jul 2010 01:03:22 -0400 MIME-Version: 1.0 In-Reply-To: <1278684348.2494.223.camel@moss-terrapins.epoch.ncsc.mil> 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> From: Kyle Moffett Date: Sun, 11 Jul 2010 01:02:59 -0400 Message-ID: Subject: Re: [PATCH 06/10] NFSv4: Add label recommended attribute and NFSv4 flags To: "David P. Quigley" Cc: James Morris , "J. Bruce Fields" , hch@infradead.org, viro@zeniv.linux.org.uk, casey@schaufler-ca.com, sds@tycho.nsa.gov, 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1996 Lines: 42 On Fri, Jul 9, 2010 at 10:05, David P. Quigley wrote: > On Fri, 2010-07-09 at 08:48 +1000, James Morris wrote: >> Yes, but we should not unnecessarily limit the network protocol when >> something is valid and possible in the local implementation (which is ~64k >> under Linux). >> >> A security label include just about anything, e.g. an x509 certificate, or >> a base64 encoded image. >> >> In the Linux implementation, if we can store a local label up to 64k, then >> we should try and ensure that it can be conveyed via NFS. > > If you want that to be the case you need to make your case to Trond > about that. I've already had this conversation before and he seems to > think that a page is sufficient. Bruce also has concerns about not > wanting these labels to require a high order allocation. Under memory > pressure finding 16 contiguous pages for each label might be a problem. I would argue that if somebody wants to stick a base64-encoded image or an x509 certificate in their security labels then shipping the whole thing across the wire every time somebody does an extended "stat" is just stupid. Think about how much overhead there would be if you did an "ls -Z" of a directory with 100 files (64k * 100 == 6.4MB!!!), where that data would previously have fit in no more than 10-20k TOTAL. A better solution would be something along the lines of putting at most a SHA512 sum in the label field and have a separate caching communication protocol (either in-band or out-of-band) to pass the fully-descriptive payload. 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. Cheers, Kyle Moffett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/