Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
Alexey, On 04/09/19 6:53 PM, Alexey Brodkin wrote: > Hi Faiz, > >> -Original Message- >> From: Faiz Abbas >> Sent: Wednesday, September 4, 2019 4:09 PM >> To: Alexey Brodkin >> Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de >> Subject: Re: [PATCH] Revert "part:

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
Hi Tom, Alexey, On 04/09/19 7:19 PM, Tom Rini wrote: > On Wed, Sep 04, 2019 at 01:46:52PM +, Alexey Brodkin wrote: >> Hi Faiz, >> >>> -Original Message- >>> From: Alexey Brodkin >>> Sent: Wednesday, September 4, 2019 4:23 PM >>> To: Faiz Abbas >>> Cc: paule...@forallsecure.com;

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Tom Rini
On Wed, Sep 04, 2019 at 01:46:52PM +, Alexey Brodkin wrote: > Hi Faiz, > > > -Original Message- > > From: Alexey Brodkin > > Sent: Wednesday, September 4, 2019 4:23 PM > > To: Faiz Abbas > > Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de > > Subject: RE:

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Alexey Brodkin
Hi Faiz, > -Original Message- > From: Alexey Brodkin > Sent: Wednesday, September 4, 2019 4:23 PM > To: Faiz Abbas > Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de > Subject: RE: [PATCH] Revert "part: Allocate only one legacy_mbr buffer" > > Hi Faiz, > > >

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Alexey Brodkin
Hi Faiz, > -Original Message- > From: Faiz Abbas > Sent: Wednesday, September 4, 2019 4:09 PM > To: Alexey Brodkin > Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de > Subject: Re: [PATCH] Revert "part: Allocate only one legacy_mbr buffer" > > Hi Alexey, > > On

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
Hi Alexey, On 04/09/19 6:27 PM, Alexey Brodkin wrote: > Hi Faiz, > > [snip] > > I guess what you really want to do is to allocate buffer for "mbr" > dynamically of size which is max(sizeof(legacy_mbr), dev_desc->blksz). > With the assumption that blksz is always greater

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Alexey Brodkin
Hi Faiz, [snip] > >>> I guess what you really want to do is to allocate buffer for "mbr" > >>> dynamically of size which is max(sizeof(legacy_mbr), dev_desc->blksz). > >>> > >> > >> With the assumption that blksz is always greater than > >> sizeof(legacy_mbr), this should work: > >> > >>

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
Hi Alexey, On 04/09/19 5:16 PM, Alexey Brodkin wrote: > Hi Faiz, > >> -Original Message- >> From: Faiz Abbas >> Sent: Wednesday, September 4, 2019 2:44 PM >> To: Alexey Brodkin >> Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de >> Subject: Re: [PATCH] Revert

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Alexey Brodkin
Hi Faiz, > -Original Message- > From: Faiz Abbas > Sent: Wednesday, September 4, 2019 2:44 PM > To: Alexey Brodkin > Cc: paule...@forallsecure.com; tr...@konsulko.com; u-boot@lists.denx.de > Subject: Re: [PATCH] Revert "part: Allocate only one legacy_mbr buffer" > > Hi Alexey, > > On

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
Hi Alexey, On 04/09/19 3:42 PM, Alexey Brodkin wrote: > Hi Faiz, > >> -Original Message- >> From: Faiz Abbas >> Sent: Wednesday, September 4, 2019 12:22 PM >> To: u-boot@lists.denx.de >> Cc: paule...@forallsecure.com; faiz_ab...@ti.com; Alexey Brodkin >> ; >> tr...@konsulko.com >>

Re: [U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Alexey Brodkin
Hi Faiz, > -Original Message- > From: Faiz Abbas > Sent: Wednesday, September 4, 2019 12:22 PM > To: u-boot@lists.denx.de > Cc: paule...@forallsecure.com; faiz_ab...@ti.com; Alexey Brodkin > ; > tr...@konsulko.com > Subject: [PATCH] Revert "part: Allocate only one legacy_mbr buffer" >

[U-Boot] [PATCH] Revert "part: Allocate only one legacy_mbr buffer"

2019-09-04 Thread Faiz Abbas
This reverts commit 8639e34d2c5e12cc2e45c95b1a2e97c22bf6a711. The blk_dread() call following the allocation will read one block from the device. This will lead to overflow if the blocksize is greater than the size of legacy_mbr. Fix this by allocating one block size. Signed-off-by: Faiz Abbas