Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1652013
| From | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head |
| Date | 2017-05-28 02:40 +0200 |
| Message-ID | <tLUpr-2Tm-9@gated-at.bofh.it> (permalink) |
| References | <tLHVg-2Df-13@gated-at.bofh.it> <tLSxj-1HD-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-27 13:20 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Casey Schaufler <casey@schaufler-ca.com> - 2017-05-28 00:40 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-28 02:40 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Kees Cook <keescook@chromium.org> - 2017-05-28 03:10 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-28 03:30 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Casey Schaufler <casey@schaufler-ca.com> - 2017-05-28 20:00 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head James Morris <jmorris@namei.org> - 2017-05-30 12:30 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-30 16:40 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-30 17:30 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head James Morris <jmorris@namei.org> - 2017-05-31 01:10 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-31 12:50 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head James Morris <jmorris@namei.org> - 2017-05-31 13:10 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-31 13:40 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-31 16:50 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-31 17:20 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-31 17:20 +0200
Re: [PATCH] LSM: Convert security_hook_heads into explicit array of struct list_head José Bollo <jobol@nonadev.net> - 2017-05-31 12:00 +0200
[PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-28 22:40 +0200
Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head Kees Cook <keescook@chromium.org> - 2017-05-28 23:20 +0200
Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head Casey Schaufler <casey@schaufler-ca.com> - 2017-05-29 19:40 +0200
Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head James Morris <jmorris@namei.org> - 2017-05-30 12:40 +0200
Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head Igor Stoppa <igor.stoppa@huawei.com> - 2017-05-31 23:00 +0200
Re: [PATCH v2] LSM: Convert security_hook_heads into explicit array of struct list_head James Morris <jmorris@namei.org> - 2017-06-01 01:00 +0200
csiph-web