lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 12/20] sgi-xp: Use designated initializers
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.

\
 
 \ /
  Last update: 2017-05-27 10:44    [W:0.390 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site