[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] EFI: Fix getting EFI variable list on some systems
>>> On 09.03.15 at 17:47, <ross.lagerwall@xxxxxxxxxx> wrote: > Copy the entire output buffer to the guest because it may contain data beyond > the output size that the firmware requires on a subsequent > GetNextVariableName() call (e.g. a NULL character). > > The spec requires that on each call, "the previous results" be passed in. > > Without this change, the following (simplified) sequence would occur: > GetNextVariableName: in \0, out AdminPw\0, size 7 > GetNextVariableName: in AdminPw\0, out UserPw\0, size 6 > GetNextVariableName: in UserPww\0, NOT FOUND As such behavior is outside the specification, please name the system needing this workaround: The runtime services function is documented to update *VariableNameSize only upon EFI_BUFFER_TOO_SMALL. A code comment would also seem to be on order, as otherwise people like me might be tempted to undo this again, as it's sub-optimal code for spec conforming firmware. And to save me from having to do an incremental patch on top, you may want to consider switching to __copy_to_user() at once. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |