From: Matt Fleming <matt@console-pimps.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
Tim Gardner <rtg.canonical@gmail.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Olof Johansson <olof@lixom.net>, Tony Luck <tony.luck@intel.com>,
Steve Langasek <steve.langasek@canonical.com>,
Colin Ian King <colin.king@canonical.com>,
David Airlie <airlied@linux.ie>,
Corentin Chary <corentincj@iksaif.net>,
Dave Jiang <dave.jiang@intel.com>,
Peter Jones <pjones@redhat.com>,
Konrad Rzeszutek Wilk <konrad@kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] efi: Make 'efi_enabled' a function to query EFI facilities
Date: Fri, 25 Jan 2013 23:53:44 +0000 [thread overview]
Message-ID: <1359158024.2496.157.camel@mfleming-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <1358947052.2976.1.camel@deadeye.wl.decadent.org.uk>
On Wed, 2013-01-23 at 13:17 +0000, Ben Hutchings wrote:
> On Wed, 2013-01-23 at 07:52 +0000, Matt Fleming wrote:
> > On Wed, 2013-01-23 at 04:16 +0000, Ben Hutchings wrote:
> > > On Mon, 2013-01-21 at 21:12 +0000, Matt Fleming wrote:
> > > [...]
> > > > From 92e73f936e40a8c6562e47425d434a4e62d2b8e2 Mon Sep 17 00:00:00 2001
> > > > From: Matt Fleming <matt.fleming@intel.com>
> > > > Date: Wed, 14 Nov 2012 09:42:35 +0000
> > > > Subject: [PATCH] efi: Make 'efi_enabled' a function to query EFI facilities
> > > >
> > > > Originally 'efi_enabled' indicated whether a kernel was booted from
> > > > EFI firmware. Over time its semantics have changed, and it now
> > > > indicates whether or not we are booted on an EFI machine with
> > > > bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.
> > > >
> > > > The immediate motivation for this patch is the bug report at,
> > > >
> > > > https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557
> > > >
> > > > which details how running a platform driver on an EFI machine that is
> > > > designed to run under BIOS can cause the machine to become
> > > > bricked. Also, the following report,
> > > >
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=47121
> > > >
> > > > details how running said driver can also cause Machine Check
> > > > Exceptions. Drivers need a new means of detecting whether they're
> > > > running on an EFI machine, as sadly the expression,
> > > >
> > > > if (!efi_enabled)
> > > >
> > > > hasn't been a sufficient condition for quite some time.
> > > [...]
> > >
> > > This patch maps the old efi_enabled flag to efi_enabled(EFI_BOOT). Your
> > > second patch adds a test for efi_enabled(EFI_BOOT) to the samsung-laptop
> > > driver. So the samsung-laptop driver could be fixed by adding a check
> > > for the old flag; it doesn't depend on the addition of new flags at all.
> > > The changes elsewhere may well be important, but the cited motivation
> > > here just doesn't make sense.
> >
> > If we instead check for the old flag then the samsung-laptop driver
> > would run if booting a 32-bit kernel with 64-bit EFI firmware, or vice
> > versa, because efi_enabled == 0 in that case.
> >
> > It's not sufficient to just check the old flag, the samsung-laptop
> > driver really can't be allowed to run at all if booting from EFI, and
> > the old flag doesn't provide us with that guarantee.
>
> OK, yes, I misread this. Sorry to waste your time.
Not at all.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-01-25 23:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 20:40 [PATCH 0/2] " Matt Fleming
2013-01-21 20:40 ` [PATCH 1/2] efi: Make 'efi_enabled' a function to query " Matt Fleming
2013-01-21 20:42 ` H. Peter Anvin
2013-01-21 21:12 ` Matt Fleming
2013-01-23 4:16 ` Ben Hutchings
2013-01-23 7:52 ` Matt Fleming
2013-01-23 13:17 ` Ben Hutchings
2013-01-25 23:53 ` Matt Fleming [this message]
2013-01-21 20:54 ` Dave Jiang
2013-01-21 20:56 ` Matthew Garrett
2013-01-30 18:35 ` [tip:x86/urgent] " tip-bot for Matt Fleming
2013-01-21 20:40 ` [PATCH 2/2] samsung-laptop: Disable on EFI hardware Matt Fleming
2013-01-30 18:36 ` [tip:x86/urgent] " tip-bot for 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=1359158024.2496.157.camel@mfleming-mobl1.ger.corp.intel.com \
--to=matt@console-pimps.org \
--cc=airlied@linux.ie \
--cc=ben@decadent.org.uk \
--cc=colin.king@canonical.com \
--cc=corentincj@iksaif.net \
--cc=dave.jiang@intel.com \
--cc=hpa@zytor.com \
--cc=konrad@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=olof@lixom.net \
--cc=pjones@redhat.com \
--cc=rjw@sisk.pl \
--cc=rtg.canonical@gmail.com \
--cc=stable@vger.kernel.org \
--cc=steve.langasek@canonical.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
Powered by JetHome