From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mack Subject: Re: [RFC 2/8] lsm: smack: Make ipc/kdbus includes visible so smack callbacks could see them Date: Wed, 8 Jul 2015 12:43:53 -0400 Message-ID: <559D5349.50409@zonque.org> References: <1436351110-5902-1-git-send-email-p.osmialowsk@samsung.com> <1436351110-5902-3-git-send-email-p.osmialowsk@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1436351110-5902-3-git-send-email-p.osmialowsk@samsung.com> Sender: linux-kernel-owner@vger.kernel.org To: Paul Osmialowski , Paul Moore , James Morris , Casey Schaufler , "Serge E. Hallyn" , Kees Cook , Tetsuo Handa , Stephen Smalley , Neil Brown , Mark Rustad , Greg Kroah-Hartman , David Herrmann , Djalal Harouni , Shuah Khan , Al Viro , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: Karol Lewandowski , Lukasz Skalski List-Id: linux-api@vger.kernel.org On 07/08/2015 06:25 AM, Paul Osmialowski wrote: > Signed-off-by: Paul Osmialowski > --- > security/smack/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/security/smack/Makefile b/security/smack/Makefile > index ee2ebd5..bd6927c 100644 > --- a/security/smack/Makefile > +++ b/security/smack/Makefile > @@ -6,3 +6,5 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o > > smack-y := smack_lsm.o smack_access.o smackfs.o > smack-$(CONFIG_SECURITY_SMACK_NETFILTER) += smack_netfilter.o > + > +ccflags-y += -Iipc > I would really like to avoid exposing the internal structures of kdbus to LSM modules. This is going to get messy if any internals change in the future. The callbacks for smack currently only use the passed structure to access the opaque 'security' pointer. Can't you just pass that directly (as void**), along with other parameters the LSMs needs to know about? Thanks, Daniel