All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	Casey Schaufler <casey@schaufler-ca.com>,
	Christoph Hellwig <hch@infradead.org>,
	Igor Stoppa <igor.stoppa@huawei.com>,
	James Morris <james.l.morris@oracle.com>,
	Kees Cook <keescook@chromium.org>,
	Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head
Date: Tue, 30 May 2017 20:32:02 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1705302025110.31018@namei.org> (raw)
In-Reply-To: <1496003387-3184-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Mon, 29 May 2017, Tetsuo Handa wrote:

> Igor proposed a sealable memory allocator, and the LSM hooks
> ("struct security_hook_heads security_hook_heads" and
> "struct security_hook_list ...[]") will benefit from that allocator via
> protection using set_memory_ro()/set_memory_rw(), and that allocator
> will remove CONFIG_SECURITY_WRITABLE_HOOKS config option. Thus, we will
> likely be moving to that direction.
> 
> This means that these structures will be allocated at run time using
> that allocator, and therefore the address of these structures will be
> determined at run time rather than compile time.
> 
> But currently, LSM_HOOK_INIT() macro depends on the address of
> security_hook_heads being known at compile time. If we use an enum
> so that LSM_HOOK_INIT() macro does not need to know absolute address of
> security_hook_heads, it will help us to use that allocator for LSM hooks.
> 

This seems like pointless churn in security-critical code in anticipation 
of features which are still in development and may not be adopted.

Is there a compelling reason to merge this now? (And I don't mean worrying 
about non-existent compliers).



-- 
James Morris
<jmorris@namei.org>

WARNING: multiple messages have this Message-ID (diff)
From: jmorris@namei.org (James Morris)
To: linux-security-module@vger.kernel.org
Subject: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head
Date: Tue, 30 May 2017 20:32:02 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1705302025110.31018@namei.org> (raw)
In-Reply-To: <1496003387-3184-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Mon, 29 May 2017, Tetsuo Handa wrote:

> Igor proposed a sealable memory allocator, and the LSM hooks
> ("struct security_hook_heads security_hook_heads" and
> "struct security_hook_list ...[]") will benefit from that allocator via
> protection using set_memory_ro()/set_memory_rw(), and that allocator
> will remove CONFIG_SECURITY_WRITABLE_HOOKS config option. Thus, we will
> likely be moving to that direction.
> 
> This means that these structures will be allocated at run time using
> that allocator, and therefore the address of these structures will be
> determined at run time rather than compile time.
> 
> But currently, LSM_HOOK_INIT() macro depends on the address of
> security_hook_heads being known at compile time. If we use an enum
> so that LSM_HOOK_INIT() macro does not need to know absolute address of
> security_hook_heads, it will help us to use that allocator for LSM hooks.
> 

This seems like pointless churn in security-critical code in anticipation 
of features which are still in development and may not be adopted.

Is there a compelling reason to merge this now? (And I don't mean worrying 
about non-existent compliers).



-- 
James Morris
<jmorris@namei.org>

--
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

WARNING: multiple messages have this Message-ID (diff)
From: James Morris <jmorris@namei.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	Casey Schaufler <casey@schaufler-ca.com>,
	Christoph Hellwig <hch@infradead.org>,
	Igor Stoppa <igor.stoppa@huawei.com>,
	James Morris <james.l.morris@oracle.com>,
	Kees Cook <keescook@chromium.org>,
	Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: [kernel-hardening] Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head
Date: Tue, 30 May 2017 20:32:02 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1705302025110.31018@namei.org> (raw)
In-Reply-To: <1496003387-3184-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Mon, 29 May 2017, Tetsuo Handa wrote:

> Igor proposed a sealable memory allocator, and the LSM hooks
> ("struct security_hook_heads security_hook_heads" and
> "struct security_hook_list ...[]") will benefit from that allocator via
> protection using set_memory_ro()/set_memory_rw(), and that allocator
> will remove CONFIG_SECURITY_WRITABLE_HOOKS config option. Thus, we will
> likely be moving to that direction.
> 
> This means that these structures will be allocated at run time using
> that allocator, and therefore the address of these structures will be
> determined at run time rather than compile time.
> 
> But currently, LSM_HOOK_INIT() macro depends on the address of
> security_hook_heads being known at compile time. If we use an enum
> so that LSM_HOOK_INIT() macro does not need to know absolute address of
> security_hook_heads, it will help us to use that allocator for LSM hooks.
> 

This seems like pointless churn in security-critical code in anticipation 
of features which are still in development and may not be adopted.

Is there a compelling reason to merge this now? (And I don't mean worrying 
about non-existent compliers).



-- 
James Morris
<jmorris@namei.org>

  parent reply	other threads:[~2017-05-30 10:33 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27 11:17 [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa
2017-05-27 11:17 ` [kernel-hardening] " Tetsuo Handa
2017-05-27 11:17 ` Tetsuo Handa
2017-05-27 22:30 ` Casey Schaufler
2017-05-27 22:30   ` [kernel-hardening] " Casey Schaufler
2017-05-27 22:30   ` Casey Schaufler
2017-05-28  0:38   ` Tetsuo Handa
2017-05-28  0:38     ` [kernel-hardening] " Tetsuo Handa
2017-05-28  0:38     ` Tetsuo Handa
2017-05-28  1:04 ` Kees Cook
2017-05-28  1:04   ` [kernel-hardening] " Kees Cook
2017-05-28  1:04   ` Kees Cook
2017-05-28  1:26   ` Tetsuo Handa
2017-05-28  1:26     ` [kernel-hardening] " Tetsuo Handa
2017-05-28  1:26     ` Tetsuo Handa
2017-05-28 17:57     ` Casey Schaufler
2017-05-28 17:57       ` [kernel-hardening] " Casey Schaufler
2017-05-28 17:57       ` Casey Schaufler
2017-05-30 10:22     ` James Morris
2017-05-30 10:22       ` [kernel-hardening] " James Morris
2017-05-30 10:22       ` James Morris
2017-05-30 14:29       ` Tetsuo Handa
2017-05-30 14:29         ` [kernel-hardening] " Tetsuo Handa
2017-05-30 14:29         ` Tetsuo Handa
2017-05-30 15:25         ` Alan Cox
2017-05-30 15:25           ` [kernel-hardening] " Alan Cox
2017-05-30 15:25           ` Alan Cox
2017-05-30 23:06           ` James Morris
2017-05-30 23:06             ` [kernel-hardening] " James Morris
2017-05-30 23:06             ` James Morris
2017-05-31 10:41             ` Tetsuo Handa
2017-05-31 10:41               ` [kernel-hardening] " Tetsuo Handa
2017-05-31 10:41               ` Tetsuo Handa
2017-05-31 11:04               ` James Morris
2017-05-31 11:04                 ` [kernel-hardening] " James Morris
2017-05-31 11:04                 ` James Morris
2017-05-31 11:31                 ` Tetsuo Handa
2017-05-31 11:31                   ` [kernel-hardening] " Tetsuo Handa
2017-05-31 11:31                   ` Tetsuo Handa
2017-05-31 14:43               ` Alan Cox
2017-05-31 14:43                 ` [kernel-hardening] " Alan Cox
2017-05-31 14:43                 ` Alan Cox
2017-05-31 15:10                 ` Tetsuo Handa
2017-05-31 15:10                   ` [kernel-hardening] " Tetsuo Handa
2017-05-31 15:10                   ` Tetsuo Handa
2017-05-31 15:14                   ` Alan Cox
2017-05-31 15:14                     ` [kernel-hardening] " Alan Cox
2017-05-31 15:14                     ` Alan Cox
2017-05-31  9:44         ` José Bollo
2017-05-31  9:44           ` [kernel-hardening] " José Bollo
2017-05-31  9:44           ` José Bollo
2017-05-28 20:29 ` [PATCH v2] " Tetsuo Handa
2017-05-28 20:29   ` [kernel-hardening] " Tetsuo Handa
2017-05-28 20:29   ` Tetsuo Handa
2017-05-28 21:19   ` Kees Cook
2017-05-28 21:19     ` [kernel-hardening] " Kees Cook
2017-05-28 21:19     ` Kees Cook
2017-05-29 17:32   ` Casey Schaufler
2017-05-29 17:32     ` [kernel-hardening] " Casey Schaufler
2017-05-29 17:32     ` Casey Schaufler
2017-05-30 10:32   ` James Morris [this message]
2017-05-30 10:32     ` [kernel-hardening] " James Morris
2017-05-30 10:32     ` James Morris
2017-05-31 20:49     ` Igor Stoppa
2017-05-31 20:49       ` [kernel-hardening] " Igor Stoppa
2017-05-31 20:49       ` Igor Stoppa
2017-05-31 22:56       ` James Morris
2017-05-31 22:56         ` [kernel-hardening] " James Morris
2017-05-31 22:56         ` James Morris

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=alpine.LRH.2.20.1705302025110.31018@namei.org \
    --to=jmorris@namei.org \
    --cc=casey@schaufler-ca.com \
    --cc=hch@infradead.org \
    --cc=igor.stoppa@huawei.com \
    --cc=james.l.morris@oracle.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=sds@tycho.nsa.gov \
    /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.