linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 0/2] make efivarfs files immutable by default (for stable)
Date: Tue, 16 Feb 2016 11:09:41 -0500	[thread overview]
Message-ID: <1455638983-30455-1-git-send-email-pjones@redhat.com> (raw)

Hi Matt,
Here's a version of the immutable efivarfs patch set for stable.  It
keeps most of the unicode problems we've already got, and just changes
our matching so we can match guids correctly, and then adds the
immutability bits and the whitelist.  I went ahead and folded the pstore
bits in to the second patch, as well.

This is against the 'v4.4' tag in git.  I've built all of the touched
.c files in that tree, but not actually built and run a full kernel.

The differences are roughly:
1) none of the unicode cleanup so we've got a couple of open coded
   ucs2->utf8 loops that don't handle half of the UCS-2 codepoints
2) because of that, in this version, for some functions we're passing in
   the variable name in both character sets.
3) if we see something like L"Boot\x0130000" as an EFI variable name in
   the global guidspace, we will treat it exactly like L"Boot0000" in
   terms of validation and the immutable flag.  I don't think this is a
   big risk, but who knows, maybe some firmware bricks itself if you
   delete high-byte-set UCS-2 names.  Note that this property is only
   true in the case where the matching rule is a glob.
   I'm still reasonably sure the bug we're actually seeing is about UEFI
   driver initialization not being able to recreate data in pre-existing
   variables.
4) v4.4 doesn't have inode_lock() and inode_unlock(), so that code is
   using mutex_lock() and mutex_unlock() instead.

Thanks,
Peter

             reply	other threads:[~2016-02-16 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 16:09 Peter Jones [this message]
     [not found] ` <1455638983-30455-1-git-send-email-pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-16 16:09   ` [PATCH 1/2] efi: make our variable validation list include the guid Peter Jones
2016-02-16 16:09   ` [PATCH 2/2] efi: Make efivarfs entries immutable by default Peter Jones
     [not found]     ` <1455638983-30455-3-git-send-email-pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-18 14:56       ` Matt Fleming
     [not found]         ` <20160218145650.GJ2651-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-02-18 19:25           ` Peter Jones
     [not found]             ` <20160218192539.GB1515-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-20 11:54               ` Matt Fleming

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=1455638983-30455-1-git-send-email-pjones@redhat.com \
    --to=pjones-h+wxahxf7alqt0dzr+alfa@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).