[PATCH v6 18/37] cxlflash: Fix AFU version access/storage and add check

Tomas Henzl thenzl at redhat.com
Sat Oct 24 00:40:08 AEDT 2015


On 21.10.2015 22:14, Matthew R. Ochs wrote:
> The AFU version is stored as a non-terminated string of bytes within
> a 64-bit little-endian register. Presently the value is read directly
> (no MMIO accessor) and is stored in a buffer that is not big enough
> to contain a NULL terminator. Additionally the version obtained is not
> evaluated against a known value to prevent usage with unsupported AFUs.
> All of these deficiencies can lead to a variety of problems.
>
> To remedy, use the correct MMIO accessor to read the version value into
> a null-terminated buffer and add a check to prevent an incompatible AFU
> from being used with this driver.
>
> Signed-off-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>
> Signed-off-by: Manoj N. Kumar <manoj at linux.vnet.ibm.com>
> Reviewed-by: Brian King <brking at linux.vnet.ibm.com>
> Reviewed-by: Daniel Axtens <dja at axtens.net>

Reviewed-by: Tomas Henzl <thenzl at redhat.com>

Tomas



More information about the Linuxppc-dev mailing list