Re: [PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-03 Thread Matthew Garrett
On Wed, 2013-04-03 at 18:12 +0100, Matt Fleming wrote: > The solution you're proposing has the same downsides as 3) - we risk > having to tweak things either way. The difference is that in the case of > 3) the tweaking is adding entries to the whitelist, whereas tweaking > your solution has more

Re: [PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-03 Thread Matt Fleming
On 03/04/13 14:48, Matthew Garrett wrote: > On Wed, 2013-04-03 at 14:11 +0100, Matt Fleming wrote: > >> This looks like something that will differ between implementations, and the >> fact that it's appearing in our code is a sure sign that this isn't the way >> to >> go. > > Our choices right

Re: [PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-03 Thread Matthew Garrett
On Wed, 2013-04-03 at 14:11 +0100, Matt Fleming wrote: > This looks like something that will differ between implementations, and the > fact that it's appearing in our code is a sure sign that this isn't the way to > go. Our choices right now are: 1) Break machines that don't garbage collect on

Re: [PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-03 Thread Matt Fleming
On 01/04/13 16:14, Matthew Garrett wrote: > @@ -452,8 +462,33 @@ check_var_size_locked(struct efivars *efivars, u32 > attributes, > if (status != EFI_SUCCESS) > return status; > > - if (!storage_size || size > remaining_size || size > max_size || > -

Re: [PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-03 Thread Matt Fleming
On 01/04/13 16:14, Matthew Garrett wrote: @@ -452,8 +462,33 @@ check_var_size_locked(struct efivars *efivars, u32 attributes, if (status != EFI_SUCCESS) return status; - if (!storage_size || size remaining_size || size max_size || - (remaining_size -

Re: [PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-03 Thread Matthew Garrett
On Wed, 2013-04-03 at 14:11 +0100, Matt Fleming wrote: This looks like something that will differ between implementations, and the fact that it's appearing in our code is a sure sign that this isn't the way to go. Our choices right now are: 1) Break machines that don't garbage collect on

Re: [PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-03 Thread Matt Fleming
On 03/04/13 14:48, Matthew Garrett wrote: On Wed, 2013-04-03 at 14:11 +0100, Matt Fleming wrote: This looks like something that will differ between implementations, and the fact that it's appearing in our code is a sure sign that this isn't the way to go. Our choices right now are:

Re: [PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-03 Thread Matthew Garrett
On Wed, 2013-04-03 at 18:12 +0100, Matt Fleming wrote: The solution you're proposing has the same downsides as 3) - we risk having to tweak things either way. The difference is that in the case of 3) the tweaking is adding entries to the whitelist, whereas tweaking your solution has more

Re: [PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-01 Thread Ben Hutchings
On Mon, 2013-04-01 at 11:14 -0400, Matthew Garrett wrote: > EFI implementations distinguish between space that is actively used by a > variable and space that merely hasn't been garbage collected yet. Space > that hasn't yet been garbage collected isn't available for use and so isn't > counted in

[PATCH 2/2] efi: Distinguish between "remaining space" and actually used space

2013-04-01 Thread Matthew Garrett
EFI implementations distinguish between space that is actively used by a variable and space that merely hasn't been garbage collected yet. Space that hasn't yet been garbage collected isn't available for use and so isn't counted in the remaining_space field returned by QueryVariableInfo().

[PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-01 Thread Matthew Garrett
EFI implementations distinguish between space that is actively used by a variable and space that merely hasn't been garbage collected yet. Space that hasn't yet been garbage collected isn't available for use and so isn't counted in the remaining_space field returned by QueryVariableInfo().

Re: [PATCH 2/2] efi: Distinguish between remaining space and actually used space

2013-04-01 Thread Ben Hutchings
On Mon, 2013-04-01 at 11:14 -0400, Matthew Garrett wrote: EFI implementations distinguish between space that is actively used by a variable and space that merely hasn't been garbage collected yet. Space that hasn't yet been garbage collected isn't available for use and so isn't counted in the