linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Mike Waychison <mikew@google.com>
Cc: tony.luck@intel.com, linux-kernel@vger.kernel.org, Matt_Domsch@dell.com
Subject: Re: [PATCH 3/3] efi: Add support for using efivars as a pstore backend
Date: Tue, 21 Jun 2011 21:22:53 +0100	[thread overview]
Message-ID: <20110621202253.GA14828@srcf.ucam.org> (raw)
In-Reply-To: <BANLkTi=qmS090MK=sx=xMN95zD5AtNkuLG_g092oVXJezoRCYA@mail.gmail.com>

On Tue, Jun 21, 2011 at 01:16:29PM -0700, Mike Waychison wrote:
> On Tue, Jun 21, 2011 at 8:10 AM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > You don't. I'll be posting a patch for pstore that lets you choose the
> > backend - that can be used to disable this functionality at boot time.
> 
> Hmm.  Okay.
> 
> > In theory, but I don't really understand the benefit. You can't have
> > more than one efivars implementation on a system.
> 
> It's just cleaner and keeps the state of things in a single place,
> rather than in globals.  I just cleaned all this global state up, and
> would like to keep it clean.

Ok, I'll do that.

> > The variable name is fundamentally meaningless. Just think of it as a
> > binary representation of the data. Formatting it as a signed integer
> > would break the parsing.
> 
> What do you mean it would break the parsing?

Actually, thinking about it, it'd be ok - but I'll take Tony's 
suggestion of just switching it to an unsigned.

> > The idea is to check for prefixes. If efi_name[i] is non-zero but
> > VariableName[i] is zero then we'll break due to them not matching, which
> > is the desired behaviour.
> 
> That's fine, but it's not what the code does.  It's also a lot clearer
> to the reader if this isn't open coded.  We should also be checking
> that this variable is ours with a guid check.  I'd be happier with a
> utf16_strncmp here.  Will follow up with patches that stack on top of
> yours.

Ok.

> > Userspace really ought to depend on efivars being available on EFI
> > systems. I don't think losing the ability to unload it is a big loss.
> 
> I don't know of any such dependencies.  Am I missing something?

Having a situation where efivars can appear and disappear while 
efibootmgr (for instance) is using it is kind of awkward. In the long 
run we'll probably need to interface with more EFI variables to play 
nice with the platform firmware (Apple have some expectations about this 
kind of thing), so we'll want to be able to guarantee it's there at boot 
time and shut down. And, as Tony says, the pstore use case does pretty 
much expect backends to be there.

> I'll follow up with more patches that apply on top of yours.  I'm not
> happy with the string operations in the driver as it is, and I've
> cleaned some of this up.  Feel free to collapse whatever is needed
> from them into your series or pick them up as is.

Gladly. Thanks!

-- 
Matthew Garrett | mjg59@srcf.ucam.org

      parent reply	other threads:[~2011-06-21 20:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 19:38 [PATCH 1/3] pstore: Extend API Matthew Garrett
2011-06-06 19:38 ` [PATCH 2/3] pstore: Add extra context for writes and erases Matthew Garrett
     [not found]   ` <BANLkTinHYQ14A7vzTxA1c2frxUVE6HWNQg@mail.gmail.com>
2011-06-06 21:43     ` Tony Luck
2011-06-06 21:47       ` Matthew Garrett
2011-06-10  4:00         ` Matt Domsch
2011-06-10  7:12           ` Mike Waychison
2011-06-20 22:27             ` Tony Luck
2011-06-20 22:29               ` Mike Waychison
2011-06-06 19:38 ` [PATCH 3/3] efi: Add support for using efivars as a pstore backend Matthew Garrett
2011-06-06 23:11   ` Tony Luck
2011-06-07 15:47   ` Seiji Aguchi
2011-06-07 15:58     ` Matthew Garrett
2011-06-07 18:04   ` Randy Dunlap
2011-06-21  0:56   ` Mike Waychison
2011-06-21 15:10     ` Matthew Garrett
2011-06-21 17:12       ` Tony Luck
2011-06-21 20:16       ` Mike Waychison
2011-06-21 20:18         ` [PATCH 1/4] efivars: String functions Mike Waychison
2011-06-21 20:18         ` [PATCH 2/4] efivars: introduce utf16_strncmp Mike Waychison
2011-06-21 20:18         ` [PATCH 3/4] efivars: Use string functions in pstore_write Mike Waychison
2011-06-21 20:18         ` [PATCH 4/4] efivars: Introduce PSTORE_EFI_ATTRIBUTES Mike Waychison
2011-06-21 20:22         ` Matthew Garrett [this message]

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=20110621202253.GA14828@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=Matt_Domsch@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=tony.luck@intel.com \
    /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).