Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651810
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 12/20] sgi-xp: Use designated initializers |
| Date | 2017-05-27 10:50 +0200 |
| Message-ID | <tLFA6-QN-7@gated-at.bofh.it> (permalink) |
| References | <tLyyB-4R7-3@gated-at.bofh.it> <tLzbj-55K-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, May 26, 2017 at 01:17:16PM -0700, Kees Cook wrote:
> Prepare to mark sensitive kernel structures for randomization by making
> sure they're using designated initializers. These were identified during
> allyesconfig builds of x86, arm, and arm64, with most initializer fixes
> extracted from grsecurity.
>
> To avoid casting, this implements dummy functions with full function
> prototypes.
Can we get this in ASAP?
> +static void xpc_notloaded_connect(int ch_number)
> +{ }
> +
> +static void xpc_notloaded_disconnect(int ch_number)
> +{ }
Also it might be a good idea to just check in the caller if the
methods are defined instead of having all these dummys. A branch
is usually cheaper than an indirect call, AND it leads to less code,
AND is is less fragile.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/20] Introduce struct layout randomization plugin Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
[PATCH v2 06/20] randstruct: Whitelist UNIXCB cast Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
Re: [PATCH v2 06/20] randstruct: Whitelist UNIXCB cast Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
Re: [PATCH v2 06/20] randstruct: Whitelist UNIXCB cast Christoph Hellwig <hch@infradead.org> - 2017-05-28 10:00 +0200
[PATCH v2 13/20] drm/amdgpu: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
[PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
Re: [PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:50 +0200
Re: [PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast Kees Cook <keescook@chromium.org> - 2017-05-27 22:20 +0200
Re: [PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-28 00:10 +0200
Re: [kernel-hardening] Re: [PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast Kees Cook <keescook@chromium.org> - 2017-05-28 02:50 +0200
Re: [PATCH v2 05/20] randstruct: Whitelist struct security_hook_heads cast James Morris <jmorris@namei.org> - 2017-05-30 12:40 +0200
[PATCH v2 02/20] gcc-plugins: Detail c-common.h location for GCC 4.6 Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
[PATCH v2 11/20] randstruct: Disable randomization of ACPICA structs Kees Cook <keescook@chromium.org> - 2017-05-27 03:20 +0200
Re: [PATCH v2 11/20] randstruct: Disable randomization of ACPICA structs Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:50 +0200
Re: [PATCH v2 11/20] randstruct: Disable randomization of ACPICA structs Kees Cook <keescook@chromium.org> - 2017-05-27 22:10 +0200
Re: [PATCH v2 11/20] randstruct: Disable randomization of ACPICA structs Christoph Hellwig <hch@infradead.org> - 2017-05-28 07:00 +0200
Re: [PATCH v2 19/20] [RFC] task_struct: Allow randomized layout Kees Cook <keescook@chromium.org> - 2017-05-27 03:30 +0200
Re: [PATCH v2 19/20] [RFC] task_struct: Allow randomized layout Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-27 03:30 +0200
[PATCH v2 15/20] mtk-vcodec: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
[PATCH v2 14/20] drm/amd/powerplay: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
Re: [PATCH v2 14/20] drm/amd/powerplay: Use designated initializers Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:50 +0200
Re: [PATCH v2 14/20] drm/amd/powerplay: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 22:20 +0200
[PATCH v2 20/20] ACPICA: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
Re: [PATCH v2 20/20] ACPICA: Use designated initializers Christoph Hellwig <hch@infradead.org> - 2017-05-28 09:50 +0200
[PATCH v2 18/20] randstruct: Enable function pointer struct detection Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
[PATCH v2 16/20] ntfs: Use ERR_CAST() to avoid cross-structure cast Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
[PATCH v2 17/20] ocfs2: Use ERR_CAST() to avoid cross-structure cast Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
[PATCH v2 19/20] [RFC] task_struct: Allow randomized layout Kees Cook <keescook@chromium.org> - 2017-05-27 03:50 +0200
[PATCH v2 10/20] randstruct: opt-out externally exposed function pointer structs Kees Cook <keescook@chromium.org> - 2017-05-27 04:00 +0200
[PATCH v2 12/20] sgi-xp: Use designated initializers Kees Cook <keescook@chromium.org> - 2017-05-27 04:00 +0200
Re: [PATCH v2 12/20] sgi-xp: Use designated initializers Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:50 +0200
[PATCH v2 01/20] NFS: Avoid cross-structure casting Kees Cook <keescook@chromium.org> - 2017-05-27 04:00 +0200
Re: [PATCH v2 01/20] NFS: Avoid cross-structure casting Christoph Hellwig <hch@infradead.org> - 2017-05-28 10:00 +0200
Re: [PATCH v2 01/20] NFS: Avoid cross-structure casting Kees Cook <keescook@chromium.org> - 2017-05-28 19:00 +0200
[PATCH v2 03/20] compiler: Add __designated_init annotation Kees Cook <keescook@chromium.org> - 2017-05-27 04:00 +0200
[PATCH v2 08/20] randstruct: Whitelist NIU struct page overloading Kees Cook <keescook@chromium.org> - 2017-05-27 04:00 +0200
Re: [PATCH v2 08/20] randstruct: Whitelist NIU struct page overloading Christoph Hellwig <hch@infradead.org> - 2017-05-28 10:20 +0200
Re: [PATCH v2 08/20] randstruct: Whitelist NIU struct page overloading Kees Cook <keescook@chromium.org> - 2017-05-28 19:40 +0200
Re: [PATCH v2 08/20] randstruct: Whitelist NIU struct page overloading Kees Cook <keescook@chromium.org> - 2017-05-28 19:40 +0200
csiph-web