* Re: [GIT PULL] x86/kaslr for v3.14 [not found] ` <52F503FD.8080607@linux.intel.com> @ 2014-02-07 16:24 ` Vivek Goyal 2014-02-07 23:16 ` Dave Young 0 siblings, 1 reply; 5+ messages in thread From: Vivek Goyal @ 2014-02-07 16:24 UTC (permalink / raw) To: H. Peter Anvin Cc: Kees Cook, Cong Ding, Richard Weinberger, Dave Young, Kexec Mailing List, Linux Kernel Mailing List, Mathias Krause, Michael Davidson, Wei Yongjun, Thomas Gleixner, H. Peter Anvin, Yinghai Lu, Ingo Molnar, Linus Torvalds, Ingo Molnar On Fri, Feb 07, 2014 at 08:04:13AM -0800, H. Peter Anvin wrote: > On 02/07/2014 06:49 AM, Vivek Goyal wrote: > > > > Hi Kees, > > > > Dave Young is testing kdump with kaslr enabled. He is facing some issues. > > > > One issue he mentioned is that when second kernel boots, it might be > > placed in an area which is outside the reserved area for second kernel. > > > > We reserve a certain memory for second kernel. And modify memory map of > > second kernel using memmap=exactmap parameter. Looks like kernel placement > > is happening before memmap=exactmap takes effect. And that seems to be > > the reason that second kernel can be placed outside the reserved memory. > > > > IOW, memmap=exactmap and kaslr don't work together. Is it possible to > > first let memmap=exactmap take affect and then kaslr does its job. Or it > > is too late by the time memmap=exactmap is parsed. > > > > As a workaround, Dave is currently using "nokaslr" command line parameter > > for second kernel. He is still facing issues where makedumpfile segment > > faults. He is looking into it further. > > > > I thought I will atleast bring up with issue of memmap=exactmap and kaslr > > being incompatible. > > > > Yes, because memmap=exactmap gets parsed too late; kaslr assumes that > the e820 information passed to it is actually correct. > > Yet another cause of breakage caused by the decision on the part of > kdump to rely on command-line options. [CC kexec mailing list] Ok, I think this is high time we change kexec-tools to not use memmap=exactmap and start passing modified memory map in bootparams. I think only concern with that change was backward compatibility of kexec-tools with older kernels. IIUC, only thing which will be impacted by this change is users of saved_max_pfn which determine the highest accessible pfn in first kernel. Some calgary IOMMU code seems to be the only user of it now. So may be we can create a new command line option say --pass-memmap-cmdline to kexec-tools which forces old behavior and by default we pass memmap in bootparams. Or create --do-not-pass-memmap-cmdline and new users will use it. Default will be old behavior. Thansk Vivek _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] x86/kaslr for v3.14 2014-02-07 16:24 ` [GIT PULL] x86/kaslr for v3.14 Vivek Goyal @ 2014-02-07 23:16 ` Dave Young 2014-02-07 23:20 ` H. Peter Anvin 0 siblings, 1 reply; 5+ messages in thread From: Dave Young @ 2014-02-07 23:16 UTC (permalink / raw) To: Vivek Goyal Cc: Kees Cook, Cong Ding, Richard Weinberger, Linus Torvalds, Ingo Molnar, Kexec Mailing List, Linux Kernel Mailing List, Ingo Molnar, Michael Davidson, Wei Yongjun, H. Peter Anvin, Thomas Gleixner, H. Peter Anvin, Yinghai Lu, Mathias Krause On 02/07/14 at 11:24am, Vivek Goyal wrote: > On Fri, Feb 07, 2014 at 08:04:13AM -0800, H. Peter Anvin wrote: > > On 02/07/2014 06:49 AM, Vivek Goyal wrote: > > > > > > Hi Kees, > > > > > > Dave Young is testing kdump with kaslr enabled. He is facing some issues. > > > > > > One issue he mentioned is that when second kernel boots, it might be > > > placed in an area which is outside the reserved area for second kernel. > > > > > > We reserve a certain memory for second kernel. And modify memory map of > > > second kernel using memmap=exactmap parameter. Looks like kernel placement > > > is happening before memmap=exactmap takes effect. And that seems to be > > > the reason that second kernel can be placed outside the reserved memory. > > > > > > IOW, memmap=exactmap and kaslr don't work together. Is it possible to > > > first let memmap=exactmap take affect and then kaslr does its job. Or it > > > is too late by the time memmap=exactmap is parsed. > > > > > > As a workaround, Dave is currently using "nokaslr" command line parameter > > > for second kernel. He is still facing issues where makedumpfile segment > > > faults. He is looking into it further. > > > > > > I thought I will atleast bring up with issue of memmap=exactmap and kaslr > > > being incompatible. > > > > > > > Yes, because memmap=exactmap gets parsed too late; kaslr assumes that > > the e820 information passed to it is actually correct. > > > > Yet another cause of breakage caused by the decision on the part of > > kdump to rely on command-line options. > > [CC kexec mailing list] > > Ok, I think this is high time we change kexec-tools to not use > memmap=exactmap and start passing modified memory map in bootparams. I > think only concern with that change was backward compatibility of > kexec-tools with older kernels. > > IIUC, only thing which will be impacted by this change is users of > saved_max_pfn which determine the highest accessible pfn in first > kernel. Some calgary IOMMU code seems to be the only user of it now. > > So may be we can create a new command line option say --pass-memmap-cmdline > to kexec-tools which forces old behavior and by default we pass memmap > in bootparams. > > Or create --do-not-pass-memmap-cmdline and new users will use it. Default > will be old behavior. Hi Vivek, Chaowang <chaowang@redhat.com> is looking into passing setup_data SETUP_E820_EXT instead of using exactmap. Previously Thomas Renninger tried passing them in e820. I did not find the old thread, but I remember it's not enough because of the 128 entries limitation. In case for kaslr, I agree that it do not make sense for kdump kernel. IMHO it's better to disable it automaticlly for kdump kernel but we can use the nokaslr as workaround for now. Thanks Dave _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] x86/kaslr for v3.14 2014-02-07 23:16 ` Dave Young @ 2014-02-07 23:20 ` H. Peter Anvin 2014-02-07 23:28 ` Dave Young 0 siblings, 1 reply; 5+ messages in thread From: H. Peter Anvin @ 2014-02-07 23:20 UTC (permalink / raw) To: Dave Young, Vivek Goyal Cc: Kees Cook, Cong Ding, Richard Weinberger, Linus Torvalds, Ingo Molnar, Kexec Mailing List, Linux Kernel Mailing List, Ingo Molnar, Michael Davidson, Wei Yongjun, Thomas Gleixner, H. Peter Anvin, Yinghai Lu, Mathias Krause On 02/07/2014 03:16 PM, Dave Young wrote: > > Hi Vivek, > > Chaowang <chaowang@redhat.com> is looking into passing setup_data SETUP_E820_EXT > instead of using exactmap. Previously Thomas Renninger tried passing them in e820. > I did not find the old thread, but I remember it's not enough because of the > 128 entries limitation. > THERE IS NO SUCH LIMITATION. Only 128 slots fit in struct boot_params, but additional entries can be added to the setup_data linked list. -hpa _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] x86/kaslr for v3.14 2014-02-07 23:20 ` H. Peter Anvin @ 2014-02-07 23:28 ` Dave Young 0 siblings, 0 replies; 5+ messages in thread From: Dave Young @ 2014-02-07 23:28 UTC (permalink / raw) To: H. Peter Anvin Cc: Kees Cook, Cong Ding, Richard Weinberger, Linus Torvalds, Ingo Molnar, Kexec Mailing List, Linux Kernel Mailing List, Ingo Molnar, Michael Davidson, Wei Yongjun, Thomas Gleixner, H. Peter Anvin, Yinghai Lu, Mathias Krause, Vivek Goyal On 02/07/14 at 03:20pm, H. Peter Anvin wrote: > On 02/07/2014 03:16 PM, Dave Young wrote: > > > > Hi Vivek, > > > > Chaowang <chaowang@redhat.com> is looking into passing setup_data SETUP_E820_EXT > > instead of using exactmap. Previously Thomas Renninger tried passing them in e820. > > I did not find the old thread, but I remember it's not enough because of the > > 128 entries limitation. > > > > THERE IS NO SUCH LIMITATION. > > Only 128 slots fit in struct boot_params, but additional entries can be > added to the setup_data linked list. Ok, I did not describe it right, I actually means the space limit. Thanks for clarifying. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <52F52EDA.4080007@linux.intel.com>]
* Re: [GIT PULL] x86/kaslr for v3.14 [not found] ` <52F52EDA.4080007@linux.intel.com> @ 2014-02-07 19:44 ` Kees Cook 0 siblings, 0 replies; 5+ messages in thread From: Kees Cook @ 2014-02-07 19:44 UTC (permalink / raw) To: H. Peter Anvin Cc: Cong Ding, Richard Weinberger, Dave Young, Kexec Mailing List, Linux Kernel Mailing List, Mathias Krause, Michael Davidson, Wei Yongjun, Thomas Gleixner, H. Peter Anvin, Ingo Molnar, Linus Torvalds, Ingo Molnar, Vivek Goyal On Fri, Feb 7, 2014 at 11:07 AM, H. Peter Anvin <hpa@linux.intel.com> wrote: > On 02/07/2014 06:49 AM, Vivek Goyal wrote: >> >> As a workaround, Dave is currently using "nokaslr" command line parameter >> for second kernel. He is still facing issues where makedumpfile segment >> faults. He is looking into it further. >> > > Now, let's state this: kaslr for kdump is almost certainly useless (the > amount of reserved memory is not enough to provide any meaningful > randomization, so any randomization needs to happen during the memory > reservation phase.) So disabling kaslr in the kdump kernel is entirely > appropriate. Peter covered everything already, but yeah, kaslr and kdump may not make a lot of sense together, but regardless, yes, it only examines e820 for memory space. It has to do all this work before the kernel decompresses, so it's very early. -Kees -- Kees Cook Chrome OS Security _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-07 23:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201401201647.s0KGlZdh004167@tazenda.hos.anvin.org>
[not found] ` <CAFLxGvxO1MPDDjEh3FU5Gv2-eb6zBJxYtTnKdABDTTpbMxxYAw@mail.gmail.com>
[not found] ` <52E5EFAF.3060609@linux.intel.com>
[not found] ` <CAFLxGvxJ0A6hZ52RWffkg_zXXScyPn10P4HcKvdAXfE43h32Eg@mail.gmail.com>
[not found] ` <52E601DA.7010605@zytor.com>
[not found] ` <20140130220708.GP9951@redhat.com>
[not found] ` <CAGXu5jKp0j71ucE7uOWRa+gQM1Wzp=_KdByJK4XnACTwiCW4ow@mail.gmail.com>
[not found] ` <20140207144914.GA5949@redhat.com>
[not found] ` <52F503FD.8080607@linux.intel.com>
2014-02-07 16:24 ` [GIT PULL] x86/kaslr for v3.14 Vivek Goyal
2014-02-07 23:16 ` Dave Young
2014-02-07 23:20 ` H. Peter Anvin
2014-02-07 23:28 ` Dave Young
[not found] ` <52F52EDA.4080007@linux.intel.com>
2014-02-07 19:44 ` Kees Cook
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox