Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-26 Thread Li Yang
> > moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE > > ; lkml ; > > Gustavo A. R. Silva > > Subject: Re: [PATCH] soc: fsl: qe: Replace one-element array and use > > struct_size() helper > > > > On Wed, May 20, 2020 at 10:24 PM Kees Cook > >

RE: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-24 Thread Qiang Zhao
A. R. Silva > Subject: Re: [PATCH] soc: fsl: qe: Replace one-element array and use > struct_size() helper > > On Wed, May 20, 2020 at 10:24 PM Kees Cook > wrote: > > > > On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > > > On Mon, May 18, 2020 at 5:57 PM Ke

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-22 Thread Li Yang
On Mon, May 18, 2020 at 5:16 PM Gustavo A. R. Silva wrote: > > The current codebase makes use of one-element arrays in the following > form: > > struct something { > int length; > u8 data[1]; > }; > > struct something *instance; > > instance = kmalloc(sizeof(*instance) + size,

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-22 Thread Li Yang
On Wed, May 20, 2020 at 10:24 PM Kees Cook wrote: > > On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > > On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > > Hm, looking at this code, I see a few other things that need to be > > > fixed: > > > > > > 1) drivers/tty/serial/ucc_uart.c

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-20 Thread Kees Cook
On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > Hm, looking at this code, I see a few other things that need to be > > fixed: > > > > 1) drivers/tty/serial/ucc_uart.c does not do a be32_to_cpu() conversion > >on the length test

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-20 Thread Gustavo A. R. Silva
On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > > > On Mon, May 18, 2020 at 05:19:04PM -0500, Gustavo A. R. Silva wrote: > > > The current codebase makes use of one-element arrays in the following > > > form: > > > > > > struct

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-20 Thread Li Yang
On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > On Mon, May 18, 2020 at 05:19:04PM -0500, Gustavo A. R. Silva wrote: > > The current codebase makes use of one-element arrays in the following > > form: > > > > struct something { > > int length; > > u8 data[1]; > > }; > > > > struct

RE: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-18 Thread Qiang Zhao
On 2020/5/19 6:19, Gustavo A. R. Silva wrote: > -Original Message- > From: Gustavo A. R. Silva > Sent: 2020年5月19日 6:19 > To: Qiang Zhao ; Leo Li > Cc: linuxppc-...@lists.ozlabs.org; linux-arm-ker...@lists.infradead.org; > linux-kernel@vger.kernel.org; Gustavo A. R. Silva ; > Kees Cook

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-18 Thread Kees Cook
On Mon, May 18, 2020 at 05:19:04PM -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of one-element arrays in the following > form: > > struct something { > int length; > u8 data[1]; > }; > > struct something *instance; > > instance = kmalloc(sizeof(*instance) + size,