[Skiboot] [PATCH v2 01/13] core/flash: Allow OPAL flash calls for size equal to flash

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Nov 5 21:32:06 AEDT 2019


On 11/4/19 6:59 PM, Deb McLemore wrote:
> From: Cyril Bur <cyril.bur at au1.ibm.com>
> 
> A bounds checking mistake prevents opal_flash_{read,write,erase} calls
> from having a length equal to the size of the flash. This bug has been
> present since the beginning (e7d1f60e core/flash: Add flash API) of
> these calls.
> 
> Until before d6a5b53f libflash/blocklevel: Add blocklevel_smart_erase()
> 6/4/2017 none of our tools would have performed a single command for the
> full size of the flash. It would still have been possible to persuade
> `dd` to do this by using a block size equal to the size of the flash
> or other mtd related tools.
> 
> Any pflash built with blocklevel_smart_erase() will perform one call to
> Linux and then Skiboot for the size of flash.
> 
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> Acked-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
> Reviewed-By: Alistair Popple <alistair at popple.id.au>
> Signed-off-by: Stewart Smith <stewart at linux.ibm.com>

This is real fix. IMO it should go as independent patch without waiting for 
entire series to ready.


-Vasant



More information about the Skiboot mailing list