From: Borislav Petkov <bp@alien8.de>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: mjg59@srcf.ucam.org, jkosina@suse.cz, greg@kroah.com,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
ebiederm@xmission.com, hpa@zytor.com
Subject: Re: [PATCH 07/11] kexec: Create a relocatable object called purgatory
Date: Thu, 27 Feb 2014 16:44:29 +0100 [thread overview]
Message-ID: <20140227154429.GF18191@pd.tnic> (raw)
In-Reply-To: <20140226163256.GD23022@redhat.com>
On Wed, Feb 26, 2014 at 11:32:56AM -0500, Vivek Goyal wrote:
> We have been using sha256 for last 7-8 years in kexec-tools and nobody
> asked for changing hash algorithm so far.
>
> So yes, somebody wanting to use a different algorithm is a possibility
> but I don't think it is likely in near future.
>
> This patchset is already very big. I would rather make it work with
> sha256 and down the line one can make it more generic if they feel
> the need. This is not a user space API/ABI and one should be able to
> change it without breaking any user space applications.
>
> So I really don't feel the need of making it more complicated, pull in
> all the crypto API in purgaotry to support other kind of hash algorithms
> in purgatory.
Ok, makes sense. Right, if someone needs it, someone could add that
support fairly easily.
> No. One can modify purgatory object symbol entry64_regs dynamically from
> outside and purpose of this code is to load values into registers. At
> compile time value of entry64_regs is 0 so it kind of gives the impression
> that we are just trying to zero registers.
>
> At kernel load time, we set values of some of those registers. Stack and
> kernel entry point is one of those. Look at
> arch/x86/kernel/kexec-bzimage.c
>
> regs64.rbx = 0; /* Bootstrap Processor */
> regs64.rsi = bootparam_load_addr;
> regs64.rip = kernel_load_addr + 0x200;
> regs64.rsp = (unsigned long)stack;
> ret = kexec_purgatory_get_set_symbol(image, "entry64_regs", ®s64,
> sizeof(regs64), 0);
Ok, thanks for explaining.
> Kdump kernel runs from reserved region of memory. But we also found on
> x86, that it still needed first 640KB of memory to boot. So before jumping
> to second kernel, we copy first 640KB in reserved region and let second
> kernel use first 640KB. We call this concept as backup region as we are
> backing up an area of memory so that second kernel does not overwrite it.
>
> For more details on backup region have a look at this paper.
>
> http://lse.sourceforge.net/kdump/documentation/ols2oo5-kdump-paper.pdf
That's valuable info, can we put some of it in a comment in the code
somewhere?
> Yep. Right now these patches support 64bit kernel only and I put some
> code for 32bit so that there are no compilation failures.
>
> Though 32bit is becoming less relevant with every passing day, still
> supporting it on 32bit is a good idea. It can happen down the line tough.
Ok.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@alien8.de>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
ebiederm@xmission.com, hpa@zytor.com, mjg59@srcf.ucam.org,
greg@kroah.com, jkosina@suse.cz
Subject: Re: [PATCH 07/11] kexec: Create a relocatable object called purgatory
Date: Thu, 27 Feb 2014 16:44:29 +0100 [thread overview]
Message-ID: <20140227154429.GF18191@pd.tnic> (raw)
In-Reply-To: <20140226163256.GD23022@redhat.com>
On Wed, Feb 26, 2014 at 11:32:56AM -0500, Vivek Goyal wrote:
> We have been using sha256 for last 7-8 years in kexec-tools and nobody
> asked for changing hash algorithm so far.
>
> So yes, somebody wanting to use a different algorithm is a possibility
> but I don't think it is likely in near future.
>
> This patchset is already very big. I would rather make it work with
> sha256 and down the line one can make it more generic if they feel
> the need. This is not a user space API/ABI and one should be able to
> change it without breaking any user space applications.
>
> So I really don't feel the need of making it more complicated, pull in
> all the crypto API in purgaotry to support other kind of hash algorithms
> in purgatory.
Ok, makes sense. Right, if someone needs it, someone could add that
support fairly easily.
> No. One can modify purgatory object symbol entry64_regs dynamically from
> outside and purpose of this code is to load values into registers. At
> compile time value of entry64_regs is 0 so it kind of gives the impression
> that we are just trying to zero registers.
>
> At kernel load time, we set values of some of those registers. Stack and
> kernel entry point is one of those. Look at
> arch/x86/kernel/kexec-bzimage.c
>
> regs64.rbx = 0; /* Bootstrap Processor */
> regs64.rsi = bootparam_load_addr;
> regs64.rip = kernel_load_addr + 0x200;
> regs64.rsp = (unsigned long)stack;
> ret = kexec_purgatory_get_set_symbol(image, "entry64_regs", ®s64,
> sizeof(regs64), 0);
Ok, thanks for explaining.
> Kdump kernel runs from reserved region of memory. But we also found on
> x86, that it still needed first 640KB of memory to boot. So before jumping
> to second kernel, we copy first 640KB in reserved region and let second
> kernel use first 640KB. We call this concept as backup region as we are
> backing up an area of memory so that second kernel does not overwrite it.
>
> For more details on backup region have a look at this paper.
>
> http://lse.sourceforge.net/kdump/documentation/ols2oo5-kdump-paper.pdf
That's valuable info, can we put some of it in a comment in the code
somewhere?
> Yep. Right now these patches support 64bit kernel only and I put some
> code for 32bit so that there are no compilation failures.
>
> Though 32bit is becoming less relevant with every passing day, still
> supporting it on 32bit is a good idea. It can happen down the line tough.
Ok.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2014-02-27 15:45 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 18:57 [RFC PATCH 00/11][V2] kexec: A new system call to allow in kernel loading Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 01/11] kexec: Move segment verification code in a separate function Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 02/11] resource: Provide new functions to walk through resources Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 03/11] bin2c: Move bin2c in scripts/basic Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 21:12 ` Michal Marek
2014-01-27 21:12 ` Michal Marek
2014-01-27 21:18 ` Vivek Goyal
2014-01-27 21:18 ` Vivek Goyal
2014-01-27 21:54 ` Michal Marek
2014-01-27 21:54 ` Michal Marek
2014-01-27 18:57 ` [PATCH 04/11] kernel: Build bin2c based on config option CONFIG_BUILD_BIN2C Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 05/11] kexec: Make kexec_segment user buffer pointer a union Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 06/11] kexec: A new system call, kexec_file_load, for in kernel kexec Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-21 14:59 ` Borislav Petkov
2014-02-21 14:59 ` Borislav Petkov
2014-02-24 16:41 ` Vivek Goyal
2014-02-24 16:41 ` Vivek Goyal
2014-02-25 19:35 ` Petr Tesarik
2014-02-25 19:35 ` Petr Tesarik
2014-02-25 21:47 ` Borislav Petkov
2014-02-25 21:47 ` Borislav Petkov
2014-02-26 15:37 ` Borislav Petkov
2014-02-26 15:37 ` Borislav Petkov
2014-02-26 15:46 ` Vivek Goyal
2014-02-26 15:46 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 07/11] kexec: Create a relocatable object called purgatory Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-24 19:08 ` H. Peter Anvin
2014-02-24 19:08 ` H. Peter Anvin
2014-02-25 16:43 ` Vivek Goyal
2014-02-25 16:43 ` Vivek Goyal
2014-02-25 16:55 ` H. Peter Anvin
2014-02-25 16:55 ` H. Peter Anvin
2014-02-25 18:20 ` Vivek Goyal
2014-02-25 18:20 ` Vivek Goyal
2014-02-25 21:09 ` H. Peter Anvin
2014-02-25 21:09 ` H. Peter Anvin
2014-02-26 14:52 ` Vivek Goyal
2014-02-26 14:52 ` Vivek Goyal
2014-02-26 16:00 ` Borislav Petkov
2014-02-26 16:00 ` Borislav Petkov
2014-02-26 16:32 ` Vivek Goyal
2014-02-26 16:32 ` Vivek Goyal
2014-02-27 15:44 ` Borislav Petkov [this message]
2014-02-27 15:44 ` Borislav Petkov
2014-01-27 18:57 ` [PATCH 08/11] kexec-bzImage: Support for loading bzImage using 64bit entry Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-25 18:38 ` H. Peter Anvin
2014-02-25 18:38 ` H. Peter Anvin
2014-02-25 18:43 ` Vivek Goyal
2014-02-25 18:43 ` Vivek Goyal
2014-02-27 21:36 ` Borislav Petkov
2014-02-27 21:36 ` Borislav Petkov
2014-02-28 16:31 ` Vivek Goyal
2014-02-28 16:31 ` Vivek Goyal
2014-03-05 16:37 ` Borislav Petkov
2014-03-05 16:37 ` Borislav Petkov
2014-03-05 16:40 ` H. Peter Anvin
2014-03-05 16:40 ` H. Peter Anvin
2014-03-05 18:40 ` Vivek Goyal
2014-03-05 18:40 ` Vivek Goyal
2014-03-05 19:47 ` Borislav Petkov
2014-03-05 19:47 ` Borislav Petkov
2014-01-27 18:57 ` [PATCH 09/11] kexec: Provide a function to add a segment at fixed address Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-27 21:52 ` Borislav Petkov
2014-02-27 21:52 ` Borislav Petkov
2014-02-28 16:56 ` Vivek Goyal
2014-02-28 16:56 ` Vivek Goyal
2014-03-10 10:01 ` Borislav Petkov
2014-03-10 10:01 ` Borislav Petkov
2014-03-10 15:35 ` Vivek Goyal
2014-03-10 15:35 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 10/11] kexec: Support for loading ELF x86_64 images Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-28 14:58 ` Borislav Petkov
2014-02-28 14:58 ` Borislav Petkov
2014-02-28 17:11 ` Vivek Goyal
2014-02-28 17:11 ` Vivek Goyal
2014-03-07 17:12 ` Borislav Petkov
2014-03-07 17:12 ` Borislav Petkov
2014-03-07 18:39 ` Borislav Petkov
2014-03-07 18:39 ` Borislav Petkov
2014-03-10 14:42 ` Vivek Goyal
2014-03-10 14:42 ` Vivek Goyal
2014-03-12 16:19 ` Borislav Petkov
2014-03-12 16:19 ` Borislav Petkov
2014-03-12 17:24 ` Vivek Goyal
2014-03-12 17:24 ` Vivek Goyal
2014-01-27 18:57 ` [PATCH 11/11] kexec: Support for Kexec on panic using new system call Vivek Goyal
2014-01-27 18:57 ` Vivek Goyal
2014-02-28 17:28 ` Borislav Petkov
2014-02-28 17:28 ` Borislav Petkov
2014-02-28 21:06 ` Vivek Goyal
2014-02-28 21:06 ` Vivek Goyal
2014-05-26 8:25 ` [RFC PATCH 00/11][V2] kexec: A new system call to allow in kernel loading Borislav Petkov
2014-05-26 8:25 ` Borislav Petkov
2014-05-27 12:34 ` Vivek Goyal
2014-05-27 12:34 ` Vivek Goyal
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=20140227154429.GF18191@pd.tnic \
--to=bp@alien8.de \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=hpa@zytor.com \
--cc=jkosina@suse.cz \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=vgoyal@redhat.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 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.