From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: casey@schaufler-ca.com, linux-security-module@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com, hch@infradead.org,
igor.stoppa@huawei.com, james.l.morris@oracle.com,
keescook@chromium.org, paul@paul-moore.com, sds@tycho.nsa.gov
Subject: Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head
Date: Sun, 28 May 2017 09:38:13 +0900 [thread overview]
Message-ID: <201705280938.IAH43233.OJLHOSOFFMFQtV@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <42691278-5b9a-16f1-0636-e766c6d648fb@schaufler-ca.com>
Casey Schaufler wrote:
> > 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.
> >
> > As a result of introducing an enum, security_hook_heads becomes a local
> > variable, making it easier to allocate security_hook_heads at run time.
>
> You loose the type checking in security.c. This is the same
> objection I had before to this approach. It's why I objected
> to 3dfc9b02864b19f4 and why I didn't adopt the array approach
> in the first place. If it's so important that randstruct not
> complain about the unnatural cast, revert the patch that
> introduced it. I see no net benefit in hiding the symbol over
> loosing the typing. You trade a list of typed function
> pointers for an enumerated list of values. It doesn't even
> make the code look smaller!
I still cannot understand what you are referring by "type checking".
Please explain me what the type checking in security/security.c is.
next prev parent reply other threads:[~2017-05-28 0:39 UTC|newest]
Thread overview: 23+ 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 22:30 ` Casey Schaufler
2017-05-28 0:38 ` Tetsuo Handa [this message]
2017-05-28 1:04 ` Kees Cook
2017-05-28 1:26 ` Tetsuo Handa
2017-05-28 17:57 ` Casey Schaufler
2017-05-30 10:22 ` James Morris
2017-05-30 14:29 ` Tetsuo Handa
2017-05-30 15:25 ` Alan Cox
2017-05-30 23:06 ` James Morris
2017-05-31 10:41 ` Tetsuo Handa
2017-05-31 11:04 ` James Morris
2017-05-31 11:31 ` Tetsuo Handa
2017-05-31 14:43 ` Alan Cox
2017-05-31 15:10 ` Tetsuo Handa
2017-05-31 15:14 ` Alan Cox
2017-05-31 9:44 ` José Bollo
2017-05-28 20:29 ` [PATCH v2] " Tetsuo Handa
2017-05-28 21:19 ` Kees Cook
2017-05-29 17:32 ` Casey Schaufler
2017-05-30 10:32 ` James Morris
2017-05-31 20:49 ` Igor Stoppa
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=201705280938.IAH43233.OJLHOSOFFMFQtV@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--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=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 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).