Re: [RFC,PATCH v2] efi: Add support for a UEFI variable filesystem

From: Matt Fleming
Date: Thu Sep 06 2012 - 10:31:02 EST


(Cc'ing Peter Jones who wrote a auth deletion patch for efivars)

On Thu, 2012-09-06 at 22:23 +0800, Jeremy Kerr wrote:
> Hi Matt,
>
> > Am I correct in thinking that this filesystem doesn't handle deletion of
> > authenticated variables?
>
> Unless I'm missing something, this should work fine; we just pass the
> EFI_VARIABLE_AUTHENTICATION_2 descriptor (with the usual attribute
> header), but no data following the descriptor.

I think this is the problematic chunk of code,

static int efivars_unlink(struct inode *dir, struct dentry *dentry)
{
struct efivar_entry *var = dentry->d_inode->i_private;
struct efivars *efivars = var->efivars;
efi_status_t status;

spin_lock(&efivars->lock);

status = efivars->ops->set_variable(var->var.VariableName,
&var->var.VendorGuid,
0, 0, NULL);

For deleting authenticated variables Attributes, DataSize and Data need
to be non-zero. I think DataSize == AuthInfo descriptor. Peter?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/