From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH 07/37] Security: De-embed task security record from task and use refcounting Date: Mon, 11 Feb 2008 17:30:36 +0000 Message-ID: <28534.1202751036@redhat.com> References: <20080208165156.15902.62457.stgit@warthog.procyon.org.uk> <20080208165235.15902.8174.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Trond.Myklebust@netapp.com, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org To: James Morris Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfsv4-bounces@linux-nfs.org Errors-To: nfsv4-bounces@linux-nfs.org List-Id: linux-fsdevel.vger.kernel.org James Morris wrote: > > Remove the temporarily embedded task security record from task_struct. > > Instead it is made to dangle from the task_struct::sec and > > task_struct::act_as pointers with references counted for each. > > ... > > These patches are kind of huge. Yeah, I know. The problem is that each patch must compile and run. They can't be split up without violating that unfortunately. > Why manually copy these fields after a kmemdup? Fair point. Fixed. > What about the task backpointer? (i.e. tsec2->task) The problem is that there can't be one with this patch as the task_security struct and the LSM security data attached to it may outlive the task it points back to. It seems that the backpointer can be dispensed with. Nothing particularly seems to use it. Do you know the reason for its existence? David