All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Casey Schaufler <casey@schaufler-ca.com>,
	David Howells <dhowells@redhat.com>,
	Fabian Frederick <fabf@skynet.be>,
	Greg KH <gregkh@linuxfoundation.org>,
	James Morris <james.l.morris@oracle.com>,
	Jeff Layton <jlayton@primarydata.com>,
	Jingoo Han <jg1.han@samsung.com>, Joe Perches <joe@perches.com>,
	John Johansen <john.johansen@canonical.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Kees Cook <keescook@chromium.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Oleg Nesterov <oleg@redhat.com>, Paul Moore <paul@pa>
Subject: Re: [PATCH v2 0/7] Smack namespace
Date: Wed, 27 May 2015 09:33:25 -0400	[thread overview]
Message-ID: <5565C7A5.4060802@tycho.nsa.gov> (raw)
In-Reply-To: <1432719372.1784.4.camel@samsung.com>

On 05/27/2015 05:36 AM, Lukasz Pawelczyk wrote:
> On wto, 2015-05-26 at 10:35 -0400, Stephen Smalley wrote:
>> On 05/25/2015 08:32 AM, Lukasz Pawelczyk wrote:
>>> --- Usage ---
>>>
>>> Smack namespace is written using LSM hooks inside user namespace. That
>>> means it's connected to it.
>>>
>>> To create a new Smack namespace you need to unshare() user namespace
>>> as usual. If that is all you do though, than there is no difference to
>>> what is now. To activate the Smack namespace you need to fill the
>>> labels' map. It is in a file /proc/$PID/smack_map.
>>
>> This should be /proc/$PID/attr/label_map or similar, modeled after the
>> existing /proc/$PID/attr/current and similar nodes.  Then it isn't
>> module-specific and can be reused for other modules.
> 
> To make this generic I'll have to introduce new LSH hooks to handle this
> file (much like /proc/$PID/attr/current).
> I take this is what you had in mind.

We don't have separate hooks for the
/proc/self/attr/{current,exec,fscreate,keycreate,socketcreate,prev}
nodes.  Just one hook that passes the attribute name, and then the
security hook implementation can distinguish on that.



WARNING: multiple messages have this Message-ID (diff)
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Casey Schaufler <casey@schaufler-ca.com>,
	David Howells <dhowells@redhat.com>,
	Fabian Frederick <fabf@skynet.be>,
	Greg KH <gregkh@linuxfoundation.org>,
	James Morris <james.l.morris@oracle.com>,
	Jeff Layton <jlayton@primarydata.com>,
	Jingoo Han <jg1.han@samsung.com>, Joe Perches <joe@perches.com>,
	John Johansen <john.johansen@canonical.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Kees Cook <keescook@chromium.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Oleg Nesterov <oleg@redhat.com>, Paul Moore <paul@paul-moore.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Zefan Li <lizefan@huawei.com>, Rafal Krypa <r.krypa@samsung.com>,
	linux-doc@vger.kernel.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	containers@lists.linux-foundation.org,
	Lukasz Pawelczyk <havner@gmail.com>
Subject: Re: [PATCH v2 0/7] Smack namespace
Date: Wed, 27 May 2015 09:33:25 -0400	[thread overview]
Message-ID: <5565C7A5.4060802@tycho.nsa.gov> (raw)
In-Reply-To: <1432719372.1784.4.camel@samsung.com>

On 05/27/2015 05:36 AM, Lukasz Pawelczyk wrote:
> On wto, 2015-05-26 at 10:35 -0400, Stephen Smalley wrote:
>> On 05/25/2015 08:32 AM, Lukasz Pawelczyk wrote:
>>> --- Usage ---
>>>
>>> Smack namespace is written using LSM hooks inside user namespace. That
>>> means it's connected to it.
>>>
>>> To create a new Smack namespace you need to unshare() user namespace
>>> as usual. If that is all you do though, than there is no difference to
>>> what is now. To activate the Smack namespace you need to fill the
>>> labels' map. It is in a file /proc/$PID/smack_map.
>>
>> This should be /proc/$PID/attr/label_map or similar, modeled after the
>> existing /proc/$PID/attr/current and similar nodes.  Then it isn't
>> module-specific and can be reused for other modules.
> 
> To make this generic I'll have to introduce new LSH hooks to handle this
> file (much like /proc/$PID/attr/current).
> I take this is what you had in mind.

We don't have separate hooks for the
/proc/self/attr/{current,exec,fscreate,keycreate,socketcreate,prev}
nodes.  Just one hook that passes the attribute name, and then the
security hook implementation can distinguish on that.



  parent reply	other threads:[~2015-05-27 13:33 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 11:53 [PATCH 0/8] Smack namespace Lukasz Pawelczyk
2015-05-21 11:53 ` Lukasz Pawelczyk
2015-05-21 11:53 ` [PATCH 1/8] kernel/exit.c: make sure current's nsproxy != NULL while checking caps Lukasz Pawelczyk
     [not found]   ` <1432209222-8479-2-git-send-email-l.pawelczyk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-23 17:49     ` Eric W. Biederman
2015-05-23 17:49       ` Eric W. Biederman
     [not found]       ` <878ucf2nh4.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-05-25 11:33         ` Lukasz Pawelczyk
2015-05-25 11:33           ` Lukasz Pawelczyk
2015-05-23 17:49     ` Eric W. Biederman
2015-05-21 11:53 ` [PATCH 5/8] smack: misc cleanups in preparation for a namespace patch Lukasz Pawelczyk
2015-05-21 11:53 ` [PATCH 6/8] smack: namespace groundwork Lukasz Pawelczyk
2015-05-21 11:53 ` [PATCH 7/8] smack: namespace implementation Lukasz Pawelczyk
     [not found] ` <1432209222-8479-1-git-send-email-l.pawelczyk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-21 11:53   ` [PATCH 1/8] kernel/exit.c: make sure current's nsproxy != NULL while checking caps Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 2/8] user_ns: 3 new hooks for LSM namespace operations Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53     ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 3/8] smack: extend capability functions and fix 2 checks Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53     ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 4/8] smack: abstraction layer for 2 common Smack operations Lukasz Pawelczyk
2015-05-21 11:53     ` Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 5/8] smack: misc cleanups in preparation for a namespace patch Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 6/8] smack: namespace groundwork Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 7/8] smack: namespace implementation Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53   ` [PATCH 8/8] smack: documentation for the Smack namespace Lukasz Pawelczyk
2015-05-21 11:53   ` Lukasz Pawelczyk
2015-05-21 11:53     ` Lukasz Pawelczyk
2015-05-25 12:32   ` [PATCH v2 0/7] " Lukasz Pawelczyk
2015-05-25 12:32   ` Lukasz Pawelczyk
2015-05-25 12:32 ` Lukasz Pawelczyk
2015-05-25 12:32   ` [PATCH v2 3/7] smack: abstraction layer for 2 common Smack operations Lukasz Pawelczyk
2015-05-25 12:32   ` [PATCH v2 4/7] smack: misc cleanups in preparation for a namespace patch Lukasz Pawelczyk
2015-05-26 14:35   ` [PATCH v2 0/7] Smack namespace Stephen Smalley
2015-05-27  9:36     ` Lukasz Pawelczyk
2015-05-27  9:36       ` Lukasz Pawelczyk
     [not found]       ` <1432719372.1784.4.camel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-27 13:33         ` Stephen Smalley
2015-05-27 13:33       ` Stephen Smalley [this message]
2015-05-27 13:33         ` Stephen Smalley
     [not found]     ` <556484BD.2060004-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
2015-05-26 16:27       ` Lukasz Pawelczyk
2015-05-26 16:27         ` Lukasz Pawelczyk
     [not found]         ` <1432657655.1974.21.camel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-26 16:34           ` Stephen Smalley
2015-05-26 16:34         ` Stephen Smalley
2015-05-26 16:34           ` Stephen Smalley
     [not found]           ` <5564A088.4040507-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
2015-05-26 16:42             ` Lukasz Pawelczyk
2015-05-26 16:42               ` Lukasz Pawelczyk
2015-05-27  9:36       ` Lukasz Pawelczyk
2015-05-27  1:04   ` Casey Schaufler
2015-05-27  9:29     ` Lukasz Pawelczyk
2015-05-27  9:29       ` Lukasz Pawelczyk
2015-05-27 13:05       ` Casey Schaufler
2015-05-27 13:05         ` Casey Schaufler
     [not found]       ` <1432718944.1784.1.camel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-27 13:05         ` Casey Schaufler
     [not found]     ` <55651823.10304-iSGtlc1asvQWG2LlvL+J4A@public.gmane.org>
2015-05-27  9:29       ` Lukasz Pawelczyk
     [not found]   ` <1432557162-19123-1-git-send-email-l.pawelczyk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-25 12:32     ` [PATCH v2 1/7] user_ns: 3 new hooks for user namespace operations Lukasz Pawelczyk
2015-05-25 12:32       ` Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 2/7] smack: extend capability functions and fix 2 checks Lukasz Pawelczyk
2015-05-25 12:32       ` Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 3/7] smack: abstraction layer for 2 common Smack operations Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 4/7] smack: misc cleanups in preparation for a namespace patch Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 5/7] smack: namespace groundwork Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32       ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 6/7] smack: namespace implementation Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-25 12:32       ` Lukasz Pawelczyk
2015-05-25 12:32     ` [PATCH v2 7/7] smack: documentation for the Smack namespace Lukasz Pawelczyk
2015-05-25 12:32       ` Lukasz Pawelczyk
2015-05-25 12:32     ` Lukasz Pawelczyk
2015-05-26 14:35     ` [PATCH v2 0/7] " Stephen Smalley
2015-05-26 14:35     ` Stephen Smalley
2015-05-27  1:04     ` Casey Schaufler
2015-05-27  1:04     ` Casey Schaufler
2015-05-27  3:13     ` Eric W. Biederman
2015-05-27  3:13       ` Eric W. Biederman
2015-05-27 10:13       ` Lukasz Pawelczyk
2015-05-27 10:13         ` Lukasz Pawelczyk
     [not found]         ` <1432721610.1784.27.camel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-27 15:12           ` Eric W. Biederman
2015-05-27 15:12         ` Eric W. Biederman
2015-05-27 15:12           ` Eric W. Biederman
     [not found]           ` <87vbfeqcke.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-05-27 17:15             ` Lukasz Pawelczyk
2015-05-27 17:15           ` Lukasz Pawelczyk
2015-05-27 17:15             ` Lukasz Pawelczyk
     [not found]       ` <87h9qyww4h.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-05-27 10:13         ` Lukasz Pawelczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5565C7A5.4060802@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=fabf@skynet.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.l.morris@oracle.com \
    --cc=jg1.han@samsung.com \
    --cc=jlayton@primarydata.com \
    --cc=joe@perches.com \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=kirill@shutemov.name \
    --cc=l.pawelczyk@samsung.com \
    --cc=luto@amacapital.net \
    --cc=mchehab@osg.samsung.com \
    --cc=miklos@szeredi.hu \
    --cc=oleg@redhat.com \
    --cc=paul@pa \
    --cc=serge@hallyn.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.