* [PATCH] systemd: mount the EFI variable filesystem
@ 2012-10-27 3:23 Lee, Chun-Yi
[not found] ` <1351308202-14628-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Lee, Chun-Yi @ 2012-10-27 3:23 UTC (permalink / raw)
To: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, Kay Sievers,
Lennart Poettering, Mantas Mikulėnas,
Zbigniew Jędrzejewski-Szmek, Matt Fleming, Jeremy Kerr,
Matthew Garrett
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
filesystem will be mounted when systemd executed.
The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.
Cc: Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>
Cc: Lennart Poettering <lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>
Cc: Mantas MikulÄnas <grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Zbigniew JÄdrzejewski-Szmek <zbyszek-wrcVdnn0TatmR6Xm/wNWPw@public.gmane.org>
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
src/core/kmod-setup.c | 1 +
src/core/mount-setup.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index cc2a2d9..14a4778 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -33,6 +33,7 @@
static const char * const kmod_table[] = {
"autofs4", "/sys/class/misc/autofs",
"ipv6", "/sys/module/ipv6",
+ "efivarfs", "/sys/firmware/efi/efivars",
"unix", "/proc/net/unix"
};
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 0fd112f..8ce4ddc 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -66,6 +66,7 @@ static const MountPoint mount_table[] = {
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true, true },
{ "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true, true },
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
+ { "efivarfs", "/sys/firmware/efi/efivars", "efivarfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
{ "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
{ "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false, true },
{ "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: mount the EFI variable filesystem
[not found] ` <1351308202-14628-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
@ 2012-10-28 13:00 ` Lennart Poettering
[not found] ` <20121028130025.GD7904-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Lennart Poettering @ 2012-10-28 13:00 UTC (permalink / raw)
To: Lee, Chun-Yi
Cc: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, Kay Sievers,
Mantas Mikulėnas, Zbigniew Jędrzejewski-Szmek,
Matt Fleming, Jeremy Kerr, Matthew Garrett
On Sat, 27.10.12 11:23, Lee, Chun-Yi (joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) wrote:
> Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
> filesystem will be mounted when systemd executed.
>
> The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.
I can't really test this, but looks reasonably simple, and I assume this
has been tested, so I merged this.
Thanks!
Lennart
--
Lennart Poettering - Red Hat, Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: mount the EFI variable filesystem
[not found] ` <20121028130025.GD7904-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
@ 2012-10-29 2:21 ` joeyli
2012-10-31 13:04 ` Colin Walters
0 siblings, 1 reply; 8+ messages in thread
From: joeyli @ 2012-10-29 2:21 UTC (permalink / raw)
To: Lennart Poettering
Cc: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-efi-u79uwXL29TY76Z2rM5mHXA, Kay Sievers, Mantas Mikul,
Zbigniew J, Matt Fleming, Jeremy Kerr, Matthew Garrett
於 日,2012-10-28 於 14:00 +0100,Lennart Poettering 提到:
> On Sat, 27.10.12 11:23, Lee, Chun-Yi (joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) wrote:
>
> > Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
> > filesystem will be mounted when systemd executed.
> >
> > The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.
>
> I can't really test this, but looks reasonably simple, and I assume this
> has been tested, so I merged this.
>
> Thanks!
>
> Lennart
>
I tested this patch on my UEFI notebook with latest EFI kernel git tree,
the efivarfs mounted normally after system boot and I can delete/add EFI
variable through /sys/firmware/efi/efivars.
Thanks for your review and merged.
Thanks a lot!
Joey Lee
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] systemd: mount the EFI variable filesystem
2012-10-29 2:21 ` joeyli
@ 2012-10-31 13:04 ` Colin Walters
2012-10-31 13:13 ` [systemd-devel] " Kay Sievers
0 siblings, 1 reply; 8+ messages in thread
From: Colin Walters @ 2012-10-31 13:04 UTC (permalink / raw)
To: joeyli
Cc: Matt Fleming, systemd-devel, Kay Sievers, linux-efi, Jeremy Kerr,
Matthew Garrett
On Mon, 2012-10-29 at 10:21 +0800, joeyli wrote:
> I tested this patch on my UEFI notebook with latest EFI kernel git tree,
> the efivarfs mounted normally after system boot and I can delete/add EFI
> variable through /sys/firmware/efi/efivars.
This causes systemd to output a warning if the kernel doesn't have an
efivars module. I suppose to do this kind of thing "right" we'd
have to conditionalize the module loads on available kernel version they
first appeared in?
(Yes, I frequently I boot bleeding edge systemd from git on older
kernels)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [systemd-devel] [PATCH] systemd: mount the EFI variable filesystem
2012-10-31 13:04 ` Colin Walters
@ 2012-10-31 13:13 ` Kay Sievers
[not found] ` <CAPXgP10j+AGUcyaimtp=osb9mVVpPNJqCvsOdENWhPQEmfYC3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2012-10-31 13:13 UTC (permalink / raw)
To: Colin Walters
Cc: joeyli, Lennart Poettering, linux-efi-u79uwXL29TY76Z2rM5mHXA,
systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Matt Fleming,
Jeremy Kerr, Matthew Garrett
On Wed, Oct 31, 2012 at 2:04 PM, Colin Walters <walters-gPq2gbYjIk8dnm+yROfE0A@public.gmane.org> wrote:
> On Mon, 2012-10-29 at 10:21 +0800, joeyli wrote:
>
>> I tested this patch on my UEFI notebook with latest EFI kernel git tree,
>> the efivarfs mounted normally after system boot and I can delete/add EFI
>> variable through /sys/firmware/efi/efivars.
>
> This causes systemd to output a warning if the kernel doesn't have an
> efivars module. I suppose to do this kind of thing "right" we'd
> have to conditionalize the module loads on available kernel version they
> first appeared in?
We should probably suppress the warning that the module cannot be
loaded. And then maybe make the mount conditional, depending on the
existence of the target directory.
This should make all that only trigger when the kernel module is
available or it is compiled-in (libkmod tells the same), and do
nothing on older kernel, kernels without the filesysystem, or
platforms without EFI.
We generally never want to depend on specific kernel versions, because
people are free to backport stuff to older kernel versions or free to
disable things in the kernel which are not absolutely required.
Kay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [systemd-devel] [PATCH] systemd: mount the EFI variable filesystem
[not found] ` <CAPXgP10j+AGUcyaimtp=osb9mVVpPNJqCvsOdENWhPQEmfYC3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-11-05 20:55 ` Josh Boyer
0 siblings, 0 replies; 8+ messages in thread
From: Josh Boyer @ 2012-11-05 20:55 UTC (permalink / raw)
To: Kay Sievers
Cc: Colin Walters, joeyli, Lennart Poettering,
linux-efi-u79uwXL29TY76Z2rM5mHXA,
systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Matt Fleming,
Jeremy Kerr, Matthew Garrett
On Wed, Oct 31, 2012 at 9:13 AM, Kay Sievers <kay-tD+1rO4QERM@public.gmane.org> wrote:
> On Wed, Oct 31, 2012 at 2:04 PM, Colin Walters <walters-gPq2gbYjIk8dnm+yROfE0A@public.gmane.org> wrote:
>> On Mon, 2012-10-29 at 10:21 +0800, joeyli wrote:
>>
>>> I tested this patch on my UEFI notebook with latest EFI kernel git tree,
>>> the efivarfs mounted normally after system boot and I can delete/add EFI
>>> variable through /sys/firmware/efi/efivars.
>>
>> This causes systemd to output a warning if the kernel doesn't have an
>> efivars module. I suppose to do this kind of thing "right" we'd
>> have to conditionalize the module loads on available kernel version they
>> first appeared in?
>
> We should probably suppress the warning that the module cannot be
> loaded. And then maybe make the mount conditional, depending on the
> existence of the target directory.
>
> This should make all that only trigger when the kernel module is
> available or it is compiled-in (libkmod tells the same), and do
> nothing on older kernel, kernels without the filesysystem, or
> platforms without EFI.
Yes to all of that.
For those wanting a distro kernel to play with that has this support,
we've included efivarfs in Fedora rawhide and soon in F18.
josh
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] systemd: mount the EFI variable filesystem
@ 2012-10-25 8:23 Lee, Chun-Yi
0 siblings, 0 replies; 8+ messages in thread
From: Lee, Chun-Yi @ 2012-10-25 8:23 UTC (permalink / raw)
To: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA, Lee, Chun-Yi, Kay Sievers,
Lennart Poettering, Mantas Mikulėnas,
Zbigniew Jędrzejewski-Szmek, Matt Fleming, Jeremy Kerr,
Matthew Garrett
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
filesystem will be mounted when systemd executed.
The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.
Cc: Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>
Cc: Lennart Poettering <lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>
Cc: Mantas MikulÄnas <grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Zbigniew JÄdrzejewski-Szmek <zbyszek-wrcVdnn0TatmR6Xm/wNWPw@public.gmane.org>
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
src/core/kmod-setup.c | 1 +
src/core/mount-setup.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index cc2a2d9..14a4778 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -33,6 +33,7 @@
static const char * const kmod_table[] = {
"autofs4", "/sys/class/misc/autofs",
"ipv6", "/sys/module/ipv6",
+ "efivarfs", "/sys/firmware/efi/efivars",
"unix", "/proc/net/unix"
};
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 0fd112f..8ce4ddc 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -66,6 +66,7 @@ static const MountPoint mount_table[] = {
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true, true },
{ "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true, true },
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
+ { "efivarfs", "/sys/firmware/efi/efivars", "efivarfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
{ "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
{ "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false, true },
{ "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] systemd: mount the EFI variable filesystem
@ 2012-10-25 8:07 Lee, Chun-Yi
0 siblings, 0 replies; 8+ messages in thread
From: Lee, Chun-Yi @ 2012-10-25 8:07 UTC (permalink / raw)
To: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
filesystem will be mounted when systemd executed.
The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.
Cc: Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>
Cc: Lennart Poettering <lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>
Cc: Mantas MikulÄnas <grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Zbigniew JÄdrzejewski-Szmek <zbyszek-wrcVdnn0TatmR6Xm/wNWPw@public.gmane.org>
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
---
src/core/kmod-setup.c | 1 +
src/core/mount-setup.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index cc2a2d9..14a4778 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -33,6 +33,7 @@
static const char * const kmod_table[] = {
"autofs4", "/sys/class/misc/autofs",
"ipv6", "/sys/module/ipv6",
+ "efivarfs", "/sys/firmware/efi/efivars",
"unix", "/proc/net/unix"
};
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 0fd112f..8ce4ddc 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -66,6 +66,7 @@ static const MountPoint mount_table[] = {
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true, true },
{ "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true, true },
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
+ { "efivarfs", "/sys/firmware/efi/efivars", "efivarfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false },
{ "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
{ "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false, true },
{ "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true },
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-05 20:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 3:23 [PATCH] systemd: mount the EFI variable filesystem Lee, Chun-Yi
[not found] ` <1351308202-14628-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2012-10-28 13:00 ` Lennart Poettering
[not found] ` <20121028130025.GD7904-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
2012-10-29 2:21 ` joeyli
2012-10-31 13:04 ` Colin Walters
2012-10-31 13:13 ` [systemd-devel] " Kay Sievers
[not found] ` <CAPXgP10j+AGUcyaimtp=osb9mVVpPNJqCvsOdENWhPQEmfYC3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-05 20:55 ` Josh Boyer
-- strict thread matches above, loose matches on Subject: below --
2012-10-25 8:23 Lee, Chun-Yi
2012-10-25 8:07 Lee, Chun-Yi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.