linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Stefan Berger <stefanb@linux.ibm.com>, linux-integrity@vger.kernel.org
Cc: serge@hallyn.com, christian.brauner@ubuntu.com,
	containers@lists.linux.dev, dmitry.kasatkin@gmail.com,
	ebiederm@xmission.com, krzysztof.struczynski@huawei.com,
	roberto.sassu@huawei.com, mpeters@redhat.com, lhinds@redhat.com,
	lsturman@redhat.com, puiterwi@redhat.com, jejb@linux.ibm.com,
	jamjoom@us.ibm.com, linux-kernel@vger.kernel.org,
	paul@paul-moore.com, rgb@redhat.com,
	linux-security-module@vger.kernel.org, jmorris@namei.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v6 01/17] ima: Add IMA namespace support
Date: Wed, 15 Dec 2021 14:41:21 -0500	[thread overview]
Message-ID: <1de0d8ba760edb7dd18b24bdd39d5424a8c14679.camel@linux.ibm.com> (raw)
In-Reply-To: <b4249c5d-da3d-4306-8d9b-10f06ec80cba@linux.ibm.com>

On Mon, 2021-12-13 at 16:11 -0500, Stefan Berger wrote:
> On 12/10/21 14:47, Stefan Berger wrote:
> > Implement an IMA namespace data structure that gets created alongside a
> > user namespace with CLONE_NEWUSER. This lays down the foundation for
> > namespacing the different aspects of IMA (eg. IMA-audit, IMA-measurement,
> > IMA-appraisal).
> >
> > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > Suggested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> > ---
> >   include/linux/ima.h                      | 37 +++++++++++++
> >   include/linux/user_namespace.h           |  4 ++
> >   init/Kconfig                             | 10 ++++
> >   kernel/user.c                            |  7 +++
> >   kernel/user_namespace.c                  |  8 +++
> >   security/integrity/ima/Makefile          |  3 +-
> >   security/integrity/ima/ima.h             |  4 ++
> >   security/integrity/ima/ima_init.c        |  4 ++
> >   security/integrity/ima/ima_init_ima_ns.c | 32 +++++++++++
> >   security/integrity/ima/ima_ns.c          | 69 ++++++++++++++++++++++++
> >   10 files changed, 177 insertions(+), 1 deletion(-)
> >   create mode 100644 security/integrity/ima/ima_init_ima_ns.c
> >   create mode 100644 security/integrity/ima/ima_ns.c
> >
> > diff --git a/include/linux/ima.h b/include/linux/ima.h
> > index b6ab66a546ae..f282e40c316c 100644
> > --- a/include/linux/ima.h
> > +++ b/include/linux/ima.h
> > @@ -11,6 +11,7 @@
> >   #include <linux/fs.h>
> >   #include <linux/security.h>
> >   #include <linux/kexec.h>
> > +#include <linux/user_namespace.h>
> >   #include <crypto/hash_info.h>
> >   struct linux_binprm;
> >   
> > @@ -210,6 +211,42 @@ static inline int ima_inode_removexattr(struct dentry *dentry,
> >   }
> >   #endif /* CONFIG_IMA_APPRAISE */
> >   
> > +struct ima_namespace {
> > +	int avoid_zero_size;
> > +};
> 
> 
> I moved the structure to security/integrity/ima/ima.h for v7 and added 
> __randomize_layout to it.

Much better than being in the public ima.h.

thanks!

Mimi


  reply	other threads:[~2021-12-15 19:41 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 19:47 [PATCH v6 00/17] ima: Namespace IMA with audit support in IMA-ns Stefan Berger
2021-12-10 19:47 ` [PATCH v6 01/17] ima: Add IMA namespace support Stefan Berger
2021-12-13 21:11   ` Stefan Berger
2021-12-15 19:41     ` Mimi Zohar [this message]
2021-12-15 21:10   ` Mimi Zohar
2021-12-16  2:34     ` Stefan Berger
2021-12-10 19:47 ` [PATCH v6 02/17] ima: Define ns_status for storing namespaced iint data Stefan Berger
2021-12-15 21:12   ` Mimi Zohar
2021-12-16  2:37     ` Stefan Berger
2021-12-16  3:53       ` Mimi Zohar
2021-12-16  4:00         ` Stefan Berger
2021-12-10 19:47 ` [PATCH v6 03/17] ima: Namespace audit status flags Stefan Berger
2021-12-15 21:15   ` Mimi Zohar
2021-12-16  2:38     ` Stefan Berger
2021-12-16  3:54       ` Mimi Zohar
2021-12-10 19:47 ` [PATCH v6 04/17] ima: Move delayed work queue and variables into ima_namespace Stefan Berger
2021-12-10 19:47 ` [PATCH v6 05/17] ima: Move IMA's keys queue related " Stefan Berger
2021-12-10 19:47 ` [PATCH v6 06/17] ima: Move policy " Stefan Berger
2021-12-13 21:15   ` Stefan Berger
2021-12-10 19:47 ` [PATCH v6 07/17] ima: Move ima_htable " Stefan Berger
2021-12-10 19:47 ` [PATCH v6 08/17] ima: Move measurement list related variables " Stefan Berger
2021-12-10 19:47 ` [PATCH v6 09/17] ima: Only accept AUDIT rules for IMA non-init_ima_ns namespaces for now Stefan Berger
2021-12-10 19:47 ` [PATCH v6 10/17] ima: Implement hierarchical processing of file accesses Stefan Berger
2021-12-10 19:47 ` [PATCH v6 11/17] securityfs: Only use simple_pin_fs/simple_release_fs for init_user_ns Stefan Berger
2021-12-10 19:47 ` [PATCH v6 12/17] securityfs: Extend securityfs with namespacing support Stefan Berger
2021-12-11 10:50   ` Christian Brauner
2021-12-11 22:31     ` Stefan Berger
2021-12-10 19:47 ` [PATCH v6 13/17] ima: Move some IMA policy and filesystem related variables into ima_namespace Stefan Berger
2021-12-10 19:47 ` [PATCH v6 14/17] ima: Tie opened SecurityFS files to the IMA namespace it belongs to Stefan Berger
2021-12-11 11:00   ` Christian Brauner
2021-12-11 22:33     ` Stefan Berger
2021-12-10 19:47 ` [PATCH v6 15/17] ima: Use mac_admin_ns_capable() to check corresponding capability Stefan Berger
2021-12-11 15:29   ` Serge E. Hallyn
2021-12-11 16:05     ` James Bottomley
2021-12-11 19:22       ` Serge E. Hallyn
2021-12-11 20:12         ` James Bottomley
2021-12-10 19:47 ` [PATCH v6 16/17] ima: Move dentry into ima_namespace and others onto stack Stefan Berger
2021-12-10 19:47 ` [PATCH v6 17/17] ima: Setup securityfs for IMA namespace Stefan Berger
2021-12-15 21:31   ` Mimi Zohar
2021-12-16  2:41     ` Stefan Berger

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=1de0d8ba760edb7dd18b24bdd39d5424a8c14679.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=containers@lists.linux.dev \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=jamjoom@us.ibm.com \
    --cc=jejb@linux.ibm.com \
    --cc=jmorris@namei.org \
    --cc=krzysztof.struczynski@huawei.com \
    --cc=lhinds@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lsturman@redhat.com \
    --cc=mpeters@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=puiterwi@redhat.com \
    --cc=rgb@redhat.com \
    --cc=roberto.sassu@huawei.com \
    --cc=serge@hallyn.com \
    --cc=stefanb@linux.ibm.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).