From: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: joeyli <jlee-IBi9RG/b67k@public.gmane.org>
Cc: Matt Fleming
<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] efi: make our variable validation list include the guid (v2)
Date: Wed, 3 Feb 2016 12:55:32 -0500 [thread overview]
Message-ID: <20160203175532.GA19297@redhat.com> (raw)
In-Reply-To: <20160203175128.GP26698-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > ---
> > 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
next prev parent reply other threads:[~2016-02-03 17:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 16:43 [PATCH 1/5] Add ucs2 -> utf8 helper functions Peter Jones
[not found] ` <1454517834-13736-1-git-send-email-pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-03 16:43 ` [PATCH 2/5] efi: use ucs2_as_utf8 in efivarfs instead of open coding a bad version Peter Jones
2016-02-03 16:43 ` [PATCH 3/5] efi: do variable name validation tests in utf8 Peter Jones
2016-02-03 16:43 ` [PATCH 4/5] efi: make our variable validation list include the guid (v2) Peter Jones
[not found] ` <1454517834-13736-4-git-send-email-pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-03 17:51 ` joeyli
[not found] ` <20160203175128.GP26698-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2016-02-03 17:55 ` Peter Jones [this message]
2016-02-03 16:43 ` [PATCH 5/5] efi: Make efivarfs entries immutable by default. (v3) Peter Jones
[not found] ` <1454517834-13736-5-git-send-email-pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-03 18:00 ` joeyli
[not found] ` <20160203180016.GQ26698-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2016-02-03 18:18 ` Peter Jones
[not found] ` <20160203181759.GB19297-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-04 3:40 ` joeyli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160203175532.GA19297@redhat.com \
--to=pjones-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=jlee-IBi9RG/b67k@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).