Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-05-05 Thread Tom Rini
On Sun, May 05, 2019 at 07:55:10PM +0200, Simon Goldschmidt wrote: > Am 05.05.2019 um 13:38 schrieb Tom Rini: > >On Sat, May 04, 2019 at 08:16:38PM +0200, Simon Goldschmidt wrote: > >>Tom, > >> > >>Am 26.04.2019 um 13:00 schrieb Marek Vasut: > >>>On 4/26/19 12:19 PM, Simon Goldschmidt wrote: >

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-05-05 Thread Simon Goldschmidt
Am 05.05.2019 um 13:38 schrieb Tom Rini: On Sat, May 04, 2019 at 08:16:38PM +0200, Simon Goldschmidt wrote: Tom, Am 26.04.2019 um 13:00 schrieb Marek Vasut: On 4/26/19 12:19 PM, Simon Goldschmidt wrote: On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: On 4/26/19 11:36 AM, Simon

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-05-05 Thread Tom Rini
On Sat, May 04, 2019 at 08:16:38PM +0200, Simon Goldschmidt wrote: > Tom, > > Am 26.04.2019 um 13:00 schrieb Marek Vasut: > >On 4/26/19 12:19 PM, Simon Goldschmidt wrote: > >>On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: > >>> > >>>On 4/26/19 11:36 AM, Simon Goldschmidt wrote: > On

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-05-04 Thread Simon Goldschmidt
Tom, Am 26.04.2019 um 13:00 schrieb Marek Vasut: On 4/26/19 12:19 PM, Simon Goldschmidt wrote: On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: On 4/26/19 11:36 AM, Simon Goldschmidt wrote: On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: On 4/26/19 8:19 AM, Simon Goldschmidt

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Marek Vasut
On 4/26/19 12:19 PM, Simon Goldschmidt wrote: > On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: >> >> On 4/26/19 11:36 AM, Simon Goldschmidt wrote: >>> On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: On 4/26/19 8:19 AM, Simon Goldschmidt wrote: > Marek Vasut schrieb am

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Simon Goldschmidt
On Fri, Apr 26, 2019 at 11:56 AM Marek Vasut wrote: > > On 4/26/19 11:36 AM, Simon Goldschmidt wrote: > > On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: > >> > >> On 4/26/19 8:19 AM, Simon Goldschmidt wrote: > >>> Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: > >>> > On 4/25/19

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Marek Vasut
On 4/26/19 11:36 AM, Simon Goldschmidt wrote: > On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: >> >> On 4/26/19 8:19 AM, Simon Goldschmidt wrote: >>> Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: >>> On 4/25/19 9:22 PM, Simon Goldschmidt wrote: > If the malloc range passed to

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Simon Goldschmidt
On Fri, Apr 26, 2019 at 11:32 AM Marek Vasut wrote: > > On 4/26/19 8:19 AM, Simon Goldschmidt wrote: > > Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: > > > >> On 4/25/19 9:22 PM, Simon Goldschmidt wrote: > >>> If the malloc range passed to mem_malloc_init() is at the end of address > >>>

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Marek Vasut
On 4/26/19 8:19 AM, Simon Goldschmidt wrote: > Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: > >> On 4/25/19 9:22 PM, Simon Goldschmidt wrote: >>> If the malloc range passed to mem_malloc_init() is at the end of address >>> range and 'start + size' overflows to 0, following allocations fail

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-26 Thread Simon Goldschmidt
Marek Vasut schrieb am Fr., 26. Apr. 2019, 00:22: > On 4/25/19 9:22 PM, Simon Goldschmidt wrote: > > If the malloc range passed to mem_malloc_init() is at the end of address > > range and 'start + size' overflows to 0, following allocations fail as > > mem_malloc_end is zero (which looks like

Re: [U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-25 Thread Marek Vasut
On 4/25/19 9:22 PM, Simon Goldschmidt wrote: > If the malloc range passed to mem_malloc_init() is at the end of address > range and 'start + size' overflows to 0, following allocations fail as > mem_malloc_end is zero (which looks like uninitialized). > > Fix this by subtracting 1 of 'start +

[U-Boot] [PATCH v5 2/2] dlmalloc: fix malloc range at end of ram

2019-04-25 Thread Simon Goldschmidt
If the malloc range passed to mem_malloc_init() is at the end of address range and 'start + size' overflows to 0, following allocations fail as mem_malloc_end is zero (which looks like uninitialized). Fix this by subtracting 1 of 'start + size' overflows to zero. Signed-off-by: Simon Goldschmidt