From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756157AbbFRQv3 (ORCPT ); Thu, 18 Jun 2015 12:51:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59113 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbbFRQvW (ORCPT ); Thu, 18 Jun 2015 12:51:22 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <5582D953.2030209@tycho.nsa.gov> References: <5582D953.2030209@tycho.nsa.gov> <20150618133215.12722.70352.stgit@warthog.procyon.org.uk> <20150618133254.12722.33339.stgit@warthog.procyon.org.uk> To: Stephen Smalley Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Moore , SELinux Subject: Re: [PATCH 5/8] SELinux: Stub in copy-up handling MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2212.1434646275.1@warthog.procyon.org.uk> Date: Thu, 18 Jun 2015 17:51:15 +0100 Message-ID: <2213.1434646275@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stephen Smalley wrote: > I'm not sure we never want to copy up the SELinux attribute. See my > other email about ecryptfs and supporting per-file labeling and > consistent access control over the upper and lower inodes. Yes. That's why there are two operations. inode_copy_up() should set the label appropriately and inode_copy_up_xattr() should prevent the label set by inode_copy_up() from being clobbered. Note that inode_copy_up() has access to the lower file label and can perform some sort of incantation to transmute it before applying it. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells In-Reply-To: <5582D953.2030209@tycho.nsa.gov> References: <5582D953.2030209@tycho.nsa.gov> <20150618133215.12722.70352.stgit@warthog.procyon.org.uk> <20150618133254.12722.33339.stgit@warthog.procyon.org.uk> To: Stephen Smalley Subject: Re: [PATCH 5/8] SELinux: Stub in copy-up handling MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 18 Jun 2015 17:51:15 +0100 Message-ID: <2213.1434646275@warthog.procyon.org.uk> Cc: miklos@szeredi.hu, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, viro@zeniv.linux.org.uk, SELinux , linux-fsdevel@vger.kernel.org List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Stephen Smalley wrote: > I'm not sure we never want to copy up the SELinux attribute. See my > other email about ecryptfs and supporting per-file labeling and > consistent access control over the upper and lower inodes. Yes. That's why there are two operations. inode_copy_up() should set the label appropriately and inode_copy_up_xattr() should prevent the label set by inode_copy_up() from being clobbered. Note that inode_copy_up() has access to the lower file label and can perform some sort of incantation to transmute it before applying it. David