From: Casey Schaufler <casey@schaufler-ca.com> To: yangshukui <yangshukui@huawei.com>, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org Cc: Lizefan <lizefan@huawei.com>, paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org, james.l.morris@oracle.com, oleg@redhat.com, ebiederm@xmission.com, serge.hallyn@ubuntu.com, Casey Schaufler <casey@schaufler-ca.com> Subject: Re: isolate selinux_enforcing Date: Thu, 9 Mar 2017 08:39:10 -0800 [thread overview] Message-ID: <347f63b5-c274-c7bc-55f7-f6304d31418a@schaufler-ca.com> (raw) In-Reply-To: <58C11A6C.7000408@huawei.com> On 3/9/2017 1:03 AM, yangshukui wrote: > I want to use SELinux in system container and only concern the function in the container. > this system container run in vm and every vm has only one system container. > > How do I use now? > docker run ... system-contaier /sbin/init > after init is running ,the following service is also running: > > #this is the part of service file which will run in container after starting the container. > .. > semodule -R #use the policy in container. > restorecon / #if needed > .. > > this method seem to work if host os and the docker images use the same content for rootfs, but if host use > redhat7 and docker images use centos7, it will deny many normal operations , and this let some host service not work. > > If SELinux is permissive in host and enforcing in container ,it will resolve my problem. Unfortunately, > there is no namespace for SELinux. The LSM infrastructure is essentially a set of lists. These lists are rooted globally, but there's no reason* they couldn't be rooted in a namespace. That would give each namespace the option of using whatever security scheme was deemed appropriate. There are a number of issues, such as namespacing policy, that would have to be addressed, but the mechanism could work fine. I would look at patches. --- * Other than the sheer insanity of making security claims about such a system. I would not expect that minor issue to slow demand or deployment any more than it has in the past. > > Isolate SELinux is difficult and it has a lot of work to do, but is easier to isolate selinux_enforcing. > > What do you think ? > > Think you very much. > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-security-module" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
WARNING: multiple messages have this Message-ID (diff)
From: casey@schaufler-ca.com (Casey Schaufler) To: linux-security-module@vger.kernel.org Subject: isolate selinux_enforcing Date: Thu, 9 Mar 2017 08:39:10 -0800 [thread overview] Message-ID: <347f63b5-c274-c7bc-55f7-f6304d31418a@schaufler-ca.com> (raw) In-Reply-To: <58C11A6C.7000408@huawei.com> On 3/9/2017 1:03 AM, yangshukui wrote: > I want to use SELinux in system container and only concern the function in the container. > this system container run in vm and every vm has only one system container. > > How do I use now? > docker run ... system-contaier /sbin/init > after init is running ,the following service is also running: > > #this is the part of service file which will run in container after starting the container. > .. > semodule -R #use the policy in container. > restorecon / #if needed > .. > > this method seem to work if host os and the docker images use the same content for rootfs, but if host use > redhat7 and docker images use centos7, it will deny many normal operations , and this let some host service not work. > > If SELinux is permissive in host and enforcing in container ,it will resolve my problem. Unfortunately, > there is no namespace for SELinux. The LSM infrastructure is essentially a set of lists. These lists are rooted globally, but there's no reason* they couldn't be rooted in a namespace. That would give each namespace the option of using whatever security scheme was deemed appropriate. There are a number of issues, such as namespacing policy, that would have to be addressed, but the mechanism could work fine. I would look at patches. --- * Other than the sheer insanity of making security claims about such a system. I would not expect that minor issue to slow demand or deployment any more than it has in the past. > > Isolate SELinux is difficult and it has a lot of work to do, but is easier to isolate selinux_enforcing. > > What do you think ? > > Think you very much. > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-security-module" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-03-09 16:39 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <58732BCF.4090908@huawei.com> [not found] ` <58734284.1060504@huawei.com> [not found] ` <b7f75f65-592a-5102-0ac5-4d3aa43f0b55@huawei.com> 2017-01-09 10:51 ` SELinux lead to soft lockup when pid 1 proceess reap child yangshukui 2017-01-09 18:12 ` Oleg Nesterov 2017-01-09 18:29 ` Oleg Nesterov 2017-01-09 18:43 ` Stephen Smalley 2017-01-09 23:49 ` Paul Moore 2017-01-10 0:26 ` Casey Schaufler 2017-03-09 9:03 ` isolate selinux_enforcing yangshukui 2017-03-09 9:03 ` yangshukui 2017-03-09 15:28 ` Stephen Smalley 2017-03-09 15:28 ` Stephen Smalley 2017-03-09 15:39 ` Stephen Smalley 2017-03-09 15:39 ` Stephen Smalley 2017-03-09 16:39 ` Casey Schaufler [this message] 2017-03-09 16:39 ` Casey Schaufler 2017-03-09 20:49 ` Eric W. Biederman 2017-03-09 20:49 ` Eric W. Biederman 2017-03-10 0:05 ` Paul Moore 2017-03-10 0:05 ` Paul Moore 2017-03-13 7:06 ` James Morris 2017-03-13 7:06 ` James Morris 2017-03-13 16:05 ` Casey Schaufler 2017-03-13 16:05 ` Casey Schaufler
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=347f63b5-c274-c7bc-55f7-f6304d31418a@schaufler-ca.com \ --to=casey@schaufler-ca.com \ --cc=ebiederm@xmission.com \ --cc=eparis@parisplace.org \ --cc=james.l.morris@oracle.com \ --cc=linux-security-module@vger.kernel.org \ --cc=lizefan@huawei.com \ --cc=oleg@redhat.com \ --cc=paul@paul-moore.com \ --cc=sds@tycho.nsa.gov \ --cc=selinux@tycho.nsa.gov \ --cc=serge.hallyn@ubuntu.com \ --cc=yangshukui@huawei.com \ /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: linkBe 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.