Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Kees Cook
On Tue, Dec 20, 2016 at 11:07 AM, Dan Carpenter wrote: > On Tue, Dec 20, 2016 at 02:57:17PM +, Hammond, John wrote: >> "{ NULL }" is valid ISO C, but unfortunately "{}" is not. > > In the kernel we don't care. We use lots of GCC extensions. We depend on the compiler to do "incomplete zero-in

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Dan Carpenter
On Tue, Dec 20, 2016 at 02:57:17PM +, Hammond, John wrote: > "{ NULL }" is valid ISO C, but unfortunately "{}" is not. In the kernel we don't care. We use lots of GCC extensions. regards, dan carpenter ___ devel mailing list de...@linuxdriverproje

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Dan Carpenter
On Tue, Dec 20, 2016 at 08:47:51AM -0800, Bruce Korb wrote: > > > > "{ NULL }" is valid ISO C, but unfortunately "{}" is not. > > Just make the thing "static const" and don't use an initializer. That also works, of course. regards, dan carpenter ___ de

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Bruce Korb
> > "{ NULL }" is valid ISO C, but unfortunately "{}" is not. Just make the thing "static const" and don't use an initializer. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

RE: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Hammond, John
> On Mon, Dec 19, 2016 at 08:47:50AM -0800, Bruce Korb wrote: > > On Mon, Dec 19, 2016 at 8:22 AM, James Simmons > > >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > > >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > > >> @@ -143,7 +143,7 @@ static int ldlm_process_flock_lock(st

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-20 Thread Dan Carpenter
On Mon, Dec 19, 2016 at 04:22:58PM +, James Simmons 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 > >

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-19 Thread Dan Carpenter
On Mon, Dec 19, 2016 at 08:47:50AM -0800, Bruce Korb wrote: > On Mon, Dec 19, 2016 at 8:22 AM, James Simmons > >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > >> @@ -143,7 +143,7 @@ static int ldlm_process_flock_lock(struct ldlm_

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-19 Thread James Simmons
> On Mon, Dec 19, 2016 at 8:22 AM, James Simmons > >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > >> @@ -143,7 +143,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock > >> *req, __u64 *flags, > >> int added = (mode

Re: [lustre-devel] [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-19 Thread James Simmons
016 10:22:58 AM > To: Kees Cook > Cc: de...@driverdev.osuosl.org; Greg Kroah-Hartman; > linux-ker...@vger.kernel.org; Oleg Drokin; Vitaly > Fertman; Bruce Korb; Emoly Liu; lustre-de...@lists.lustre.org > Subject: Re: [lustre-devel] [PATCH] staging: lustre: ldlm: use designated >

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-19 Thread Bruce Korb
On Mon, Dec 19, 2016 at 8:22 AM, James Simmons >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c >> @@ -143,7 +143,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock >> *req, __u64 *flags, >> int added = (mode == LCK_NL);

Re: [PATCH] staging: lustre: ldlm: use designated initializers

2016-12-19 Thread James Simmons
> 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. > > Signed-off-by: Kees Cook > --- > driver

[PATCH] staging: lustre: ldlm: use designated initializers

2016-12-16 Thread Kees Cook
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. Signed-off-by: Kees Cook --- drivers/staging/lustre/