Re: [PATCH 4/5] efi: make our variable validation list include the guid (v2)

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

 



On Thu, Feb 04, 2016 at 01:51:28AM +0800, joeyli wrote:
> Hi Peter, 
> 
> On Wed, Feb 03, 2016 at 11:43:53AM -0500, Peter Jones wrote:
> > v2 correctly checks the guid for validation *as well as* attribute
> > whitelisting.
> > 
> > Signed-off-by: Peter Jones <pjones@xxxxxxxxxx>
> > ---
> >  drivers/firmware/efi/efivars.c |  5 +++--
> >  drivers/firmware/efi/vars.c    | 43 +++++++++++++++++++++++-------------------
> >  include/linux/efi.h            |  3 ++-
> >  3 files changed, 29 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
> > index eef6331..707b0fd 100644
> > --- a/drivers/firmware/efi/efivars.c
> > +++ b/drivers/firmware/efi/efivars.c
> > @@ -221,7 +221,7 @@ sanity_check(struct efi_variable *var, efi_char16_t *name, efi_guid_t vendor,
> >  	}
> >  
> >  	if ((attributes & ~EFI_VARIABLE_MASK) != 0 ||
> > -	    efivar_validate(name, data, size) == false) {
> > +	    efivar_validate(vendor, name, data, size) == false) {
> >  		printk(KERN_ERR "efivars: Malformed variable content\n");
> >  		return -EINVAL;
> >  	}
> > @@ -447,7 +447,8 @@ static ssize_t efivar_create(struct file *filp, struct kobject *kobj,
> >  	}
> >  
> >  	if ((attributes & ~EFI_VARIABLE_MASK) != 0 ||
> > -	    efivar_validate(name, data, size) == false) {
> > +	    efivar_validate(new_var->var.VendorGuid, name, data,
> > +			    size) == false) {
> 
> I just built fail here:
> 
>   CC      drivers/firmware/efi/efivars.o
> drivers/firmware/efi/efivars.c: In function ‘efivar_create’:
> drivers/firmware/efi/efivars.c:450:29: error: ‘struct efi_variable’ has no member named ‘var’
>   efivar_validate(new_var->var.VendorGuid, name, data,
>                          ^
> scripts/Makefile.build:258: recipe for target 'drivers/firmware/efi/efivars.o' failed

Thanks for this - I've got a couple more fixes mfleming wanted and then
I'll send out a new version once I've built and tested the whole
patchset again.

-- 
        Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux