Re: [PATCH] ima: use struct_size() in kzalloc()

2019-08-29 Thread Gustavo A. R. Silva
Hi Mimi, On 8/28/19 10:45 PM, Mimi Zohar wrote: > > The same usage exists in ima_api.c: ima_alloc_init_template().  Did > you want to make the change there as well? > Yep. I'll write a patch for that one too. Thanks -- Gustavo

Re: [PATCH] ima: use struct_size() in kzalloc()

2019-08-28 Thread Mimi Zohar
Hi Gustavo, On Wed, 2019-08-28 at 13:29 -0500, Gustavo A. R. Silva wrote: > On 5/29/19 11:53 AM, Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is finding > > the size of a structure that has a zero-sized array at the end, along > > with memory for

Re: [PATCH] ima: use struct_size() in kzalloc()

2019-08-28 Thread Gustavo A. R. Silva
Hi all, Friendly ping: Who can take this, please? Thanks -- Gustavo On 5/29/19 11:53 AM, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of

Re: [PATCH] ima: use struct_size() in kzalloc()

2019-08-28 Thread Gustavo A. R. Silva
On 8/28/19 1:46 PM, Mimi Zohar wrote: > On Wed, 2019-08-28 at 13:29 -0500, Gustavo A. R. Silva wrote: >> Hi all, >> >> Friendly ping: >> >> Who can take this, please? > > Thank you for the reminder. I'm just getting back from LSS and a very > short vacation.  I'll look at it shortly. >

Re: [PATCH] ima: use struct_size() in kzalloc()

2019-08-28 Thread Mimi Zohar
On Wed, 2019-08-28 at 13:29 -0500, Gustavo A. R. Silva wrote: > Hi all, > > Friendly ping: > > Who can take this, please? Thank you for the reminder. I'm just getting back from LSS and a very short vacation.  I'll look at it shortly. Mimi

[PATCH] ima: use struct_size() in kzalloc()

2019-05-29 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struct