Re: [PATCH] vfio/pci: Sanity check IGD OpRegion Size

From: Christoph Hellwig
Date: Mon May 10 2021 - 02:13:07 EST


On Fri, May 07, 2021 at 12:53:17PM -0600, Alex Williamson wrote:
> + /*
> + * The OpRegion size field is specified as size in KB, but there have been
> + * user reports where this field appears to report size in bytes. If we
> + * read 8192, assume this is the case.
> + */

Please avoid pointlesly spilling the comment line over 80 chars.


> + if (size == OPREGION_SIZE)

Shouldn't this be a range tests, i.e. >= ?