From: Dave Young <dyoung@redhat.com>
To: Greg KH <greg@kroah.com>
Cc: mjg59@srcf.ucam.org, linux-efi@vger.kernel.org,
Toshi Kani <toshi.kani@hp.com>,
x86@kernel.org, kexec@lists.infradead.org,
James.Bottomley@HansenPartnership.com, horms@verge.net.au,
bp@alien8.de, ebiederm@xmission.com,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
vgoyal@redhat.com
Subject: Re: [patch 1/3 v2] Add function get_bootparam
Date: Tue, 12 Nov 2013 16:08:54 +0800 [thread overview]
Message-ID: <20131112080854.GD6999@dhcp-16-126.nay.redhat.com> (raw)
In-Reply-To: <20131112075831.GA6213@kroah.com>
On 11/11/13 at 11:58pm, Greg KH wrote:
> On Mon, Nov 11, 2013 at 07:20:17PM -0800, H. Peter Anvin wrote:
> > On 11/11/2013 05:27 PM, Toshi Kani wrote:
> > > On Tue, 2013-11-05 at 16:29 +0800, dyoung@redhat.com wrote:
> > >> Not only setup_subarch will get data from debugfs file
> > >> boot_params/data, later code for adding efi_info will
> > >> also need do same thing. Thus add a common function here
> > >> for later use.
> > >
> > > get_bootparam() calls find_mnt_by_fsname("debugfs"), which assumes that
> > > debugfs is mounted with device name "debugfs". This function fails
> > > when:
> > > - debugfs is not mounted, or
> > > - debugfs is mounted with a different device name, such as nodev [1].
> > >
> > > This issue is not introduced by this patch. But the original code,
> > > which sets hardware_subarch, seems to work even if it failed to access
> > > debugfs (which is ignored) since hardware_subarch is zero most of the
> > > cases anyway. With this change, however, this failure now makes the 2nd
> > > kernel unbootable. So, it needs to be addressed to make this code path
> > > work reliably (or kexec should fail at least).
> > >
> >
> > Greg, Ingo,
> >
> > Since there is now a legitimate user of this stuff, can we actually
> > export this in sysfs (or something else other than sploit^Wdebugfs)?
>
> Hey, after Tejun is done with the kernelfs work, I'll be porting debugfs
> to it so you can't call it sploitfs anymore :)
Good news.
>
> > kexec-tools can have a fallback to debugfs if we really need it, but
> > making people mount debugfs to have some essential piece of
> > functionality scares the heck out of me.
>
> I agree, that would not be good.
>
> I'm not sure what exactly the sysfs file is wanting to look like? The
> efi section variable sysfs file isn't ok (multiple lines with multiple
> values.) What is this going to look like?
The current structure in debugfs is like below, export every field of setup
header as one file will be too much IMHO:
[root@darkstar debug]# tree boot_params
boot_params
├── data /* binary data of setup header */
├── setup_data /* setup_data link list nodes */
│ ├── 0
│ │ ├── data /* binary data of setup data */
│ │ └── type /* type of setup data */
│ └── 1
│ ├── data
│ └── type
└── version /* boot protocol version */
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-11-12 8:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 8:29 [patch 0/3 v2] kexec-tools: efi runtime support dyoung
2013-11-05 8:29 ` [patch 1/3 v2] Add function get_bootparam dyoung
2013-11-12 1:27 ` Toshi Kani
2013-11-12 2:14 ` Dave Young
2013-11-12 3:20 ` H. Peter Anvin
2013-11-12 3:53 ` Ingo Molnar
[not found] ` <aa0ccca4-b27b-41b6-8adb-3c969eb29bf7@email.android.com>
2013-11-12 14:26 ` Vivek Goyal
2013-11-12 7:58 ` Greg KH
2013-11-12 8:08 ` Dave Young [this message]
2013-11-12 8:30 ` Greg KH
2013-11-12 8:50 ` Dave Young
2013-11-12 9:37 ` H. Peter Anvin
2013-11-12 9:51 ` Greg KH
2013-11-13 0:50 ` Dave Young
2013-11-18 2:22 ` Dave Young
2013-11-18 3:29 ` H. Peter Anvin
2013-11-18 5:29 ` Dave Young
2013-11-18 5:36 ` H. Peter Anvin
2013-11-05 8:29 ` [patch 2/3 v2] Add efi_info in x86 setup header dyoung
2013-11-05 8:29 ` [patch 3/3 v2] Passing efi related data via setup_data dyoung
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=20131112080854.GD6999@dhcp-16-126.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bp@alien8.de \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=horms@verge.net.au \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=toshi.kani@hp.com \
--cc=vgoyal@redhat.com \
--cc=x86@kernel.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