[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 7/7] xenalyze: handle more potential exit reason values from vmx.h





On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering <olaf@xxxxxxxxx> wrote:
Copy and use more constants from vmx.h, to turn numbers into strings.
Adjust the REASON_MAX value accordingly.
Remove the size constraint from string array, the compiler will grow it
as needed.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

Thanks for doing this.

Everything looks good (including adding the missing strings), except for the removal of the fixed array size.  Call me paranoid, but if we define it as REASON_MAX length, then there will never be any way that a value less than REASON_MAX causes a segfault (and if we assign a value higher than REASON_MAX, the compiler will complain); whereas if we make it variable, we leave open the possibility that someone won't update REASON_MAX properly, resulting in either segfaults (if REASON_MAX is too high) or missing strings (if REASON_MAX is too low).

 -George
 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.