Re: [U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-22 Thread Marek Vasut
On 4/22/19 3:20 AM, Ley Foon Tan wrote: > On Sun, Apr 21, 2019 at 4:30 PM Marek Vasut wrote: >> >> On 4/19/19 10:52 PM, Simon Goldschmidt wrote: >>> >>> >>> Marek Vasut mailto:ma...@denx.de>> schrieb am Fr., 19. >>> Apr. 2019, 11:29: >>> >>> On 4/19/19 8:17 AM, Ley Foon Tan wrote: >>> > A

Re: [U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-21 Thread Ley Foon Tan
On Sun, Apr 21, 2019 at 4:30 PM Marek Vasut wrote: > > On 4/19/19 10:52 PM, Simon Goldschmidt wrote: > > > > > > Marek Vasut mailto:ma...@denx.de>> schrieb am Fr., 19. > > Apr. 2019, 11:29: > > > > On 4/19/19 8:17 AM, Ley Foon Tan wrote: > > > A mailbox command contains 1-DWORD header + ar

Re: [U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-21 Thread Marek Vasut
On 4/19/19 10:52 PM, Simon Goldschmidt wrote: > > > Marek Vasut mailto:ma...@denx.de>> schrieb am Fr., 19. > Apr. 2019, 11:29: > > On 4/19/19 8:17 AM, Ley Foon Tan wrote: > > A mailbox command contains 1-DWORD header + arguments. The "len" > variable > > only contains the length

Re: [U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-19 Thread Simon Goldschmidt
Marek Vasut schrieb am Fr., 19. Apr. 2019, 11:29: > On 4/19/19 8:17 AM, Ley Foon Tan wrote: > > A mailbox command contains 1-DWORD header + arguments. The "len" variable > > only contains the length of the arguments, but not the 1-DWORD header. > > Include the length of header when checking the r

Re: [U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-19 Thread Marek Vasut
On 4/19/19 8:17 AM, Ley Foon Tan wrote: > A mailbox command contains 1-DWORD header + arguments. The "len" variable > only contains the length of the arguments, but not the 1-DWORD header. > Include the length of header when checking the ring buffer space to > prevent off-by-one error. How long is

[U-Boot] [PATCH v3] arm: socfpga: mailbox: Fix off-by-one error on command length checking

2019-04-18 Thread Ley Foon Tan
A mailbox command contains 1-DWORD header + arguments. The "len" variable only contains the length of the arguments, but not the 1-DWORD header. Include the length of header when checking the ring buffer space to prevent off-by-one error. Signed-off-by: Ley Foon Tan Signed-off-by: Chee Hong Ang