* [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 3:20 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 3:20 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w, bp-Gina5bIWoIWzQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA
For ioremapped efi memory aka old_map the virt addresses are not persistant
across kexec reboot. kexec-tools will read the runtime maps from sysfs then
pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
kexec boot failure.
To address this issue do not export runtime maps in case efi old_map so
userspace can use no efi boot instead.
Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/x86/platform/efi/efi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 3781dd3..4d36932 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
void *tmp, *p, *q = NULL;
int count = 0;
+ if (efi_enabled(EFI_OLD_MEMMAP))
+ return;
+
for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
md = p;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 3:20 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 3:20 UTC (permalink / raw)
To: matt.fleming, bp, linux-kernel, linux-efi, vgoyal
For ioremapped efi memory aka old_map the virt addresses are not persistant
across kexec reboot. kexec-tools will read the runtime maps from sysfs then
pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
kexec boot failure.
To address this issue do not export runtime maps in case efi old_map so
userspace can use no efi boot instead.
Signed-off-by: Dave Young <dyoung@redhat.com>
---
arch/x86/platform/efi/efi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 3781dd3..4d36932 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
void *tmp, *p, *q = NULL;
int count = 0;
+ if (efi_enabled(EFI_OLD_MEMMAP))
+ return;
+
for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
md = p;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 3:20 ` Dave Young
@ 2014-05-30 5:54 ` Dave Young
-1 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 5:54 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w, bp-Gina5bIWoIWzQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA,
horms-/R6kz+dDXgpPR4JQBCEnsQ
Ccing Simon.
Simon, appologize for not ccing you about this kernel patch. I see you have
applied the userspace patch for checking sysfs runtime existance.
The userspace patch depends on this patch but it is not harmful even without
this kernel patch. So applying the userspace patch before this one is still
safe.
On 05/30/14 at 11:20am, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> arch/x86/platform/efi/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 3781dd3..4d36932 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> void *tmp, *p, *q = NULL;
> int count = 0;
>
> + if (efi_enabled(EFI_OLD_MEMMAP))
> + return;
> +
> for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> md = p;
>
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 5:54 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 5:54 UTC (permalink / raw)
To: matt.fleming, bp, linux-kernel, linux-efi, vgoyal, horms
Ccing Simon.
Simon, appologize for not ccing you about this kernel patch. I see you have
applied the userspace patch for checking sysfs runtime existance.
The userspace patch depends on this patch but it is not harmful even without
this kernel patch. So applying the userspace patch before this one is still
safe.
On 05/30/14 at 11:20am, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> arch/x86/platform/efi/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 3781dd3..4d36932 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> void *tmp, *p, *q = NULL;
> int count = 0;
>
> + if (efi_enabled(EFI_OLD_MEMMAP))
> + return;
> +
> for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> md = p;
>
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 5:54 ` Dave Young
@ 2014-05-30 6:08 ` Simon Horman
-1 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-05-30 6:08 UTC (permalink / raw)
To: Dave Young
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w, bp-Gina5bIWoIWzQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On Fri, May 30, 2014 at 01:54:47PM +0800, Dave Young wrote:
> Ccing Simon.
>
> Simon, appologize for not ccing you about this kernel patch. I see you have
> applied the userspace patch for checking sysfs runtime existance.
>
> The userspace patch depends on this patch but it is not harmful even without
> this kernel patch. So applying the userspace patch before this one is still
> safe.
Thanks, I understand.
If the kernel side ends up being rejected or modified please
send an update for kexec-tools accordingly.
>
> On 05/30/14 at 11:20am, Dave Young wrote:
> >
> > For ioremapped efi memory aka old_map the virt addresses are not persistant
> > across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> > pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> > kexec boot failure.
> >
> > To address this issue do not export runtime maps in case efi old_map so
> > userspace can use no efi boot instead.
> >
> > Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > ---
> > arch/x86/platform/efi/efi.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> > index 3781dd3..4d36932 100644
> > --- a/arch/x86/platform/efi/efi.c
> > +++ b/arch/x86/platform/efi/efi.c
> > @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> > void *tmp, *p, *q = NULL;
> > int count = 0;
> >
> > + if (efi_enabled(EFI_OLD_MEMMAP))
> > + return;
> > +
> > for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> > md = p;
> >
> > --
> > 1.8.3.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 6:08 ` Simon Horman
0 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-05-30 6:08 UTC (permalink / raw)
To: Dave Young; +Cc: matt.fleming, bp, linux-kernel, linux-efi, vgoyal
On Fri, May 30, 2014 at 01:54:47PM +0800, Dave Young wrote:
> Ccing Simon.
>
> Simon, appologize for not ccing you about this kernel patch. I see you have
> applied the userspace patch for checking sysfs runtime existance.
>
> The userspace patch depends on this patch but it is not harmful even without
> this kernel patch. So applying the userspace patch before this one is still
> safe.
Thanks, I understand.
If the kernel side ends up being rejected or modified please
send an update for kexec-tools accordingly.
>
> On 05/30/14 at 11:20am, Dave Young wrote:
> >
> > For ioremapped efi memory aka old_map the virt addresses are not persistant
> > across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> > pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> > kexec boot failure.
> >
> > To address this issue do not export runtime maps in case efi old_map so
> > userspace can use no efi boot instead.
> >
> > Signed-off-by: Dave Young <dyoung@redhat.com>
> > ---
> > arch/x86/platform/efi/efi.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> > index 3781dd3..4d36932 100644
> > --- a/arch/x86/platform/efi/efi.c
> > +++ b/arch/x86/platform/efi/efi.c
> > @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> > void *tmp, *p, *q = NULL;
> > int count = 0;
> >
> > + if (efi_enabled(EFI_OLD_MEMMAP))
> > + return;
> > +
> > for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> > md = p;
> >
> > --
> > 1.8.3.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 6:08 ` Simon Horman
@ 2014-05-30 6:17 ` Dave Young
-1 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 6:17 UTC (permalink / raw)
To: Simon Horman
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w, bp-Gina5bIWoIWzQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On 05/30/14 at 03:08pm, Simon Horman wrote:
> On Fri, May 30, 2014 at 01:54:47PM +0800, Dave Young wrote:
> > Ccing Simon.
> >
> > Simon, appologize for not ccing you about this kernel patch. I see you have
> > applied the userspace patch for checking sysfs runtime existance.
> >
> > The userspace patch depends on this patch but it is not harmful even without
> > this kernel patch. So applying the userspace patch before this one is still
> > safe.
>
> Thanks, I understand.
>
> If the kernel side ends up being rejected or modified please
> send an update for kexec-tools accordingly.
Sure, will do
Thanks
Dave
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 6:17 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-05-30 6:17 UTC (permalink / raw)
To: Simon Horman; +Cc: matt.fleming, bp, linux-kernel, linux-efi, vgoyal
On 05/30/14 at 03:08pm, Simon Horman wrote:
> On Fri, May 30, 2014 at 01:54:47PM +0800, Dave Young wrote:
> > Ccing Simon.
> >
> > Simon, appologize for not ccing you about this kernel patch. I see you have
> > applied the userspace patch for checking sysfs runtime existance.
> >
> > The userspace patch depends on this patch but it is not harmful even without
> > this kernel patch. So applying the userspace patch before this one is still
> > safe.
>
> Thanks, I understand.
>
> If the kernel side ends up being rejected or modified please
> send an update for kexec-tools accordingly.
Sure, will do
Thanks
Dave
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 3:20 ` Dave Young
@ 2014-05-30 7:52 ` Borislav Petkov
-1 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2014-05-30 7:52 UTC (permalink / raw)
To: Dave Young
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On Fri, May 30, 2014 at 11:20:10AM +0800, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Acked-by: Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 7:52 ` Borislav Petkov
0 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2014-05-30 7:52 UTC (permalink / raw)
To: Dave Young; +Cc: matt.fleming, linux-kernel, linux-efi, vgoyal
On Fri, May 30, 2014 at 11:20:10AM +0800, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 3:20 ` Dave Young
@ 2014-05-30 12:59 ` Vivek Goyal
-1 siblings, 0 replies; 13+ messages in thread
From: Vivek Goyal @ 2014-05-30 12:59 UTC (permalink / raw)
To: Dave Young
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w, bp-Gina5bIWoIWzQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA
On Fri, May 30, 2014 at 11:20:10AM +0800, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Vivek
> ---
> arch/x86/platform/efi/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 3781dd3..4d36932 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> void *tmp, *p, *q = NULL;
> int count = 0;
>
> + if (efi_enabled(EFI_OLD_MEMMAP))
> + return;
> +
> for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> md = p;
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
@ 2014-05-30 12:59 ` Vivek Goyal
0 siblings, 0 replies; 13+ messages in thread
From: Vivek Goyal @ 2014-05-30 12:59 UTC (permalink / raw)
To: Dave Young; +Cc: matt.fleming, bp, linux-kernel, linux-efi
On Fri, May 30, 2014 at 11:20:10AM +0800, Dave Young wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Vivek
> ---
> arch/x86/platform/efi/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 3781dd3..4d36932 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -919,6 +919,9 @@ static void __init save_runtime_map(void)
> void *tmp, *p, *q = NULL;
> int count = 0;
>
> + if (efi_enabled(EFI_OLD_MEMMAP))
> + return;
> +
> for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> md = p;
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH]x86 efi: do not export efi runtime map in case old map
2014-05-30 3:20 ` Dave Young
(?)
(?)
@ 2014-06-02 11:23 ` Matt Fleming
-1 siblings, 0 replies; 13+ messages in thread
From: Matt Fleming @ 2014-06-02 11:23 UTC (permalink / raw)
To: Dave Young; +Cc: matt.fleming, bp, linux-kernel, linux-efi, vgoyal
On 30 May 2014 04:20, Dave Young <dyoung@redhat.com> wrote:
>
> For ioremapped efi memory aka old_map the virt addresses are not persistant
> across kexec reboot. kexec-tools will read the runtime maps from sysfs then
> pass them to 2nd kernel and assuming kexec efi boot is ok. This will cause
> kexec boot failure.
>
> To address this issue do not export runtime maps in case efi old_map so
> userspace can use no efi boot instead.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> arch/x86/platform/efi/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
Thanks Dave, applied with acks.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-06-02 11:23 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 3:20 [PATCH]x86 efi: do not export efi runtime map in case old map Dave Young
2014-05-30 3:20 ` Dave Young
[not found] ` <20140530032010.GA29906-je1gSBvt1Tc/CGXRbJeUwh/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-05-30 5:54 ` Dave Young
2014-05-30 5:54 ` Dave Young
[not found] ` <20140530055447.GB2187-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2014-05-30 6:08 ` Simon Horman
2014-05-30 6:08 ` Simon Horman
[not found] ` <20140530060810.GA31868-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2014-05-30 6:17 ` Dave Young
2014-05-30 6:17 ` Dave Young
2014-05-30 7:52 ` Borislav Petkov
2014-05-30 7:52 ` Borislav Petkov
2014-05-30 12:59 ` Vivek Goyal
2014-05-30 12:59 ` Vivek Goyal
2014-06-02 11:23 ` Matt Fleming
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.