Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-09-04 Thread Miquel Raynal
Hi Gustavo, "Gustavo A. R. Silva" wrote on Thu, 23 Aug 2018 20:09:38 -0500: > 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: >

Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-09-04 Thread Miquel Raynal
Hi Gustavo, "Gustavo A. R. Silva" wrote on Thu, 23 Aug 2018 20:09:38 -0500: > 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: >

Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-27 Thread Boris Brezillon
Hi Gustavo, On Thu, 23 Aug 2018 20:09:38 -0500 "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 elements for that array. For example: >

Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-27 Thread Boris Brezillon
Hi Gustavo, On Thu, 23 Aug 2018 20:09:38 -0500 "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 elements for that array. For example: >

Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-23 Thread Kees Cook
On Thu, Aug 23, 2018 at 6:09 PM, 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 elements for that array. For example: > > struct foo { >

Re: [PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-23 Thread Kees Cook
On Thu, Aug 23, 2018 at 6:09 PM, 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 elements for that array. For example: > > struct foo { >

[PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-23 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; void *entry[]; }; instance =

[PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-23 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; void *entry[]; }; instance =