From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932422AbWDUQVs (ORCPT ); Fri, 21 Apr 2006 12:21:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932421AbWDUQVs (ORCPT ); Fri, 21 Apr 2006 12:21:48 -0400 Received: from mummy.ncsc.mil ([144.51.88.129]:38094 "EHLO jazzhorn.ncsc.mil") by vger.kernel.org with ESMTP id S932416AbWDUQVr (ORCPT ); Fri, 21 Apr 2006 12:21:47 -0400 Subject: Re: Time to remove LSM (was Re: [RESEND][RFC][PATCH 2/7] implementation of LSM hooks) From: Stephen Smalley To: Jan Engelhardt Cc: Greg KH , Arjan van de Ven , James Morris , Christoph Hellwig , Andrew Morton , T?r?k Edwin , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Wright , Linus Torvalds In-Reply-To: References: <200604142301.10188.edwin@gurde.com> <1145290013.8542.141.camel@moss-spartans.epoch.ncsc.mil> <20060417162345.GA9609@infradead.org> <1145293404.8542.190.camel@moss-spartans.epoch.ncsc.mil> <20060417173319.GA11506@infradead.org> <20060417195146.GA8875@kroah.com> <1145462454.3085.62.camel@laptopd505.fenrus.org> <20060419201154.GB20545@kroah.com> Content-Type: text/plain Organization: National Security Agency Date: Fri, 21 Apr 2006 12:25:55 -0400 Message-Id: <1145636755.21749.165.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2006-04-21 at 15:30 +0200, Jan Engelhardt wrote: > >> >> Well then, have a look at http://alphagate.hopto.org/multiadm/ > >> > > >> >hmm on first sight that seems to be basically an extension to the > >> >existing capability() code... rather than a 'real' LSM module. Am I > >> >missing something here? > >> > >> (So what's the definition for a "real" LSM module?) > > > >No idea, try submitting the patch :) > > > Because it's too big, you only get URLs: > > [01/02] http://alphagate.hopto.org/multiadm/mtadm_hooks-2.6.17-rc2.diff 137KB > [02/02] http://alphagate.hopto.org/multiadm/mtadm_module-2.6.17-rc2.diff 27KB For proper submission, you should split it up, e.g. one patch per new hook you need and then your module. The bulk of the first patch appears to be capable -> capable_x changes. What is the purpose of that? The set_task_ioprio hook looks legitimate; should be submitted separately, modulo CodingStyle issues. What's the rationale for the int->gid_t and int->uid_t changes in sys? Some of the hooks used to exist in LSM patches but didn't have a real user for merging at the time. But it isn't clear whether you actually need separate hooks for each of them or if they are being mapped to the same check in many cases - can it be abstracted to a common hook? Seems like you are duplicating a lot of the base DAC logic in the process; would be nice to encapsulate that in the core kernel, and then just use a common helper in both cases? > Don't mention CodingStyle, I know. This is just a post to respond to the > topic on why noone submitted it earlier. > I already see it coming... -- Stephen Smalley National Security Agency