Please pull x86 biarch crashdump support and misc devel
Subsystems (2)
I thought I had x86 biarch crashdump working on x86 but it turns out was wrong. So I have merged crashdump-x86.c and crashdump-x86_64.c to ensure that things will work fine.
There are a few misc cleanups in here to support biarch crashdumps.
There is a kexec bzImage load optimization that allows me to use a 64bit crash kernel in 20M in my setup. Perhaps less. Earlier because of an alighment foulup I needed 32M and the kernel was loaded in the middle of the reserved crashdump region.
There is also a new program vmcore-dmesg. Functionally it is very similar to the makedumpfile's --dmesg mode but it handles all of the crazy multi-arch cases so I only need to keep one binary around to strip the kernel's dmesg out of a core file. Additionally vmcore-dmesg is about half the size of makedumpfile and I can build it against uclibc, which makes it much more usable in my constrained initrd setup.
I would post patches but I know I would fat finger that horribly.
git pull git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-devel.git
---
commit 0320ba301f1e944fde3977df91180a538e99b9aa
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 23:19:35 2010 -0700
x86 bzImage: Optimize the panic kernel memory layout.
Load the setup sectors above the kernel in the panic case, to avoid wasting memory.
Linux kernels frequently have a severe alignment requirment that can be as much as 16M. The start of the reserved crash kernel region is 16M aligned. The setup sectors are tiny 20k? and when we are not running the real mode code they can live anywhere. Move the setup sectors from lower address than the kernel to higher address than the kernel avoids introducing a bad alignment. Allowing the linux kernel to load lower. Loading the linux kernel lower in memory ensures memory is used more efficiently.
commit 8bd3608a761cc7734f1599945f558cdfc8ee94b3
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 15:00:10 2010 -0700
kexec-tools: Add vmcore-dmesg
vmcore-dmesg is a trivial utility to extract the dmesg from a vmcore. This was written in reaction to problems I was having building makedumpfile, and using makedumpfile for extracting dmesg. makedumpfile does a whole lot of things, uses a whole lot of libraries and which make it hard to compile and a little bit clunky to remember the command line switches.
So I have written the trivial vmcore-dmesg program that reads a vmcore either /proc/vmcore or a saved version vmcore and writes the dmesg to stdout.
There is nothing to vmcore-dmesg and all of the arch dependencies are wrapped up in generating the core file. Which means a vmcore-dmesg should work with core files of all architectures without needing a rebuild.
commit 6d4b8e90bc066e79dbc8a1387fb9e32c7d0f9435
Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 10:52:01 2010 -0700
x86_64: Kill now unused crashdump-x86_64.[ch]
Now we use the i386 crashdump-x86 instead we can kill crashdump-x86_64.
commit ff053cdb05c2d95dafbcbfd4ffc079cad3c56cc8
Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 10:12:09 2010 -0700
x86_64: Use the x86 crashdump
With proper biarch support in crashdump-x86, crashdump-x86_64 is now redudant and we can use crashdump-x86 everywhere. Using crashdump-x86 everywhere results in a little unnecessary i386 logic on x86_64 but is otherwise harmless. Removing the unnecessary duplication between i386 and x86_64 should make the code much easier to maintain going forward.
commit aa0418789d8e89478044511c16a32ed4c45fefb3
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 14:11:54 2010 -0700
x86_64: Use the i386 arch_options_t on x86_64
In preparation for having a single crashdump implementation on i386 and x86_64 start sharing arch_options_t between i386 and x86_64, and don't make arch_options static on x86_64.
i386 and x86_64 have been using identitcal defitions of arch_options for a while this change now reflects that practical reality in the code.
commit 773ff64ab0ed27ca6b33c9866f89291226e86574
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 14:10:21 2010 -0700
i386 crashdump: Preserve credits of x86_64 version
commit 9322014fbfa77b5c744d8fabd3e9adf30b751219
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:58:29 2010 -0700
i386 crashdump: Compute page_offset paddr vaddr and size like x86_64.
Make certain we are using the same page_offset, paddr, and vaddr and kernel size that the x86_64 crashdump code is using.
commit 53408ce05fc411a1a5d8aee902ed0172518fc5d8
Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 12:01:14 2010 -0700
kexec elf: Handle 64bit elf executables on 32bit platforms.
- Widen some types. Why did I use unsigned long? I guess this code predates the decision to support biarch.
- Since I have made the types wider fix the statements that print those types out.
commit f79a61460fdb6fda47b3a1b01e1b4771374b7975
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 20:31:03 2010 -0700
kexec elf: Clean up error messages build_mem_phdrs
Don't print uncondintionally print an error message about KCORE_ELF_HEADERS_SIZE being wrong when the elf headers are truncated when build_mem_phdrs fails because there are other reasons we could be truncated (like an actual damaged elf file).
Instead only print an error message when either probe_debug is true or we are skipping the total file size checks for some reason. When we do print an error message limit the message to the fact that we are truncated and how many bytes we have and how many bytes we need. The context of the failure should be able to provide the rest of the information.
For now add a comment in crashdump-x86_64.c to direct people to KCORE_ELF_HEADERS_SIZE so that if someone finds the code things can be adjusted.
commit 4c4ef6506eb29cfad16546f6b8435935432d3251
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:34:43 2010 -0700
i386 crashdump: pass acpi info, and generalize hack
- Pass the acpi memap to the kernel.
- Port the fix from x86_64 to not truncate the elf note segment to 16K, to keep large machines happy.
commit d25f82619565f862e2a6104fac505b9c13c8fe4c
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:23:55 2010 -0700
i386 crashdump: move crashdump debugging code under #ifdef DEBUG
o Put the debug code under #ifdef DEBUG instead of #if 0.
o Do this to match the x86_64 code.
commit 672991ea2208dd478e8c52982f39a87c64a4c8a5
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:12:18 2010 -0700
i386 crashdump: Unify get_crash_memory_ranges.
Build a version of get_crash_memory_ranges that works the same on both x86_64 and x86. Reorder the calls in load_crashdump_segments so we have the architectures low memory limit when we call get_crash_memory_ranges.
commit b73411718dbf452675fa903b2db7ab58c24ef1ba
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:53:11 2010 -0700
i386 crashdump: Rename and include the x86_64 constants.
Unify the 32bit and the 64bit crashdump headers. Rename arch specific defintions to arch specific names to be clear. Update users of the renamed constants.
commit 8f211c7519327124bb18d9e362ac9777bf400c67
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:43:40 2010 -0700
i386 crashdump: Keep elf_info on the stack.
In preparation for merging crashdump-x86 and crashdump-x86_64 move elf_info onto the stack and start filling it out dynamically as appropriate.
Included in this change is only setting lowmem_limit and get_note_info when we are generating a core file for a 32bit kernel.
commit c8e346688c6358427213d9d6fdb83765e365cccd
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:05:40 2010 -0700
crashdump: Move kern_vaddr_start from kexec_info into crash_elf_info
These fields as defined in kexec_info are not biarch safe and beyond that crash_elf_info is the structure for passing this kind of information not kexec_info. So move them in prepartion for properly cleaning up biarch x86 functionality.
commit d9bf000b6260ee4558b2d2eb3af08e09cd1fe794
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:42:39 2010 -0700
kexec: Kill arch_init
The function only had one user, the error checking was wrong, and the functions it performed are best done elsewhere so remove the tempation of a problemenatic hook.
commit 3578b1f1437f8d1b569d1e30f6d4e15edd1cce53
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:37:21 2010 -0700
x86_64 crashdump: Move calculation of the page offset into crashdump-x86_64.c
Don't calculate page_offfset in arch_init. Performing the work there badly messes up biarch support, so move the work into crashdump_x86_64.
commit 3cab31db10dd74aa148ad20aaa3455723bf45138
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:25:30 2010 -0700
kexec: Move kernel_version into the kexec core
I'm not pleased with the hacks that we use kernel_version for but kernel_version itself is reasonable code and might be needed elsewhere, so move kernel_version into the kexec core.
commit ebeb4da62f8b51c63a46349b219a5605ee8d79bd
Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 10:41:56 2010 -0700
i386 elf: Correct the probe error string
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 18 lines · [email protected] (Eric W. Biederman) writes:
I thought I had x86 biarch crashdump working on x86 but it turns out was wrong. So I have merged
crashdump-x86.candcrashdump-x86_64.cto ensure that things will work fine.There are a few misc cleanups in here to support biarch crashdumps.
There is a kexec bzImage load optimization that allows me to use a 64bit crash kernel in 20M in my setup. Perhaps less. Earlier because of an alighment foulup I needed 32M and the kernel was loaded in the middle of the reserved crashdump region.
There is also a new program vmcore-dmesg. Functionally it is very similar to the makedumpfile's --dmesg mode but it handles all of the crazy multi-arch cases so I only need to keep one binary around to strip the kernel's dmesg out of a core file. Additionally vmcore-dmesg is about half the size of makedumpfile and I can build it against uclibc, which makes it much more usable in my constrained initrd setup.
Quoted 4 lines
I would post patches but I know I would fat finger that horribly.
git pull
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-devel.git
And the diffstat
eric@fess:~/projects/kexec/kexec-tools-devel$ git-diff-tree --stat master HEAD Makefile.in | 8 +- kexec/Makefile | 3 +- kexec/arch/i386/crashdump-x86.c | 333 +++++++++++++---- kexec/arch/i386/crashdump-x86.h | 17 +- kexec/arch/i386/kexec-bzImage.c | 4 +- kexec/arch/i386/kexec-elf-x86.c | 2 +- kexec/arch/ia64/crashdump-ia64.c | 6 +- kexec/arch/x86_64/Makefile | 8 +- kexec/arch/x86_64/arch_init.c | 83 ---- kexec/arch/x86_64/crashdump-x86_64.c | 684 ---------------------------------- kexec/arch/x86_64/crashdump-x86_64.h | 28 -- kexec/arch/x86_64/kexec-elf-x86_64.c | 2 +- kexec/arch/x86_64/kexec-x86_64.c | 11 +- kexec/arch_init.c | 4 - kexec/crashdump-elf.c | 14 +- kexec/crashdump.h | 3 + kexec/kernel_version.c | 58 +++ kexec/kexec-elf.c | 14 +- kexec/kexec-elf.h | 44 ++-- kexec/kexec.c | 2 - kexec/kexec.h | 9 +- vmcore-dmesg/Makefile | 29 ++ vmcore-dmesg/vmcore-dmesg.8 | 42 ++ vmcore-dmesg/vmcore-dmesg.c | 504 +++++++++++++++++++++++++ 24 files changed, 972 insertions(+), 940 deletions(-)
Quoted 258 lines
---
commit
0320ba301f1e944fde3977df91180a538e99b9aaAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 23:19:35 2010 -0700x86 bzImage: Optimize the panic kernel memory layout.
Load the setup sectors above the kernel in the panic case, to avoid wasting memory.
Linux kernels frequently have a severe alignment requirment that can be as much as 16M. The start of the reserved crash kernel region is 16M aligned. The setup sectors are tiny 20k? and when we are not running the real mode code they can live anywhere. Move the setup sectors from lower address than the kernel to higher address than the kernel avoids introducing a bad alignment. Allowing the linux kernel to load lower. Loading the linux kernel lower in memory ensures memory is used more efficiently.
Signed-off-by Eric W. Biederman <[email protected]>commit
8bd3608a761cc7734f1599945f558cdfc8ee94b3Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 15:00:10 2010 -0700kexec-tools: Add vmcore-dmesg
vmcore-dmesg is a trivial utility to extract the dmesg from a vmcore. This was written in reaction to problems I was having building makedumpfile, and using makedumpfile for extracting dmesg. makedumpfile does a whole lot of things, uses a whole lot of libraries and which make it hard to compile and a little bit clunky to remember the command line switches.
So I have written the trivial vmcore-dmesg program that reads a vmcore either
/proc/vmcoreor a saved version vmcore and writes the dmesg to stdout.There is nothing to vmcore-dmesg and all of the arch dependencies are wrapped up in generating the core file. Which means a vmcore-dmesg should work with core files of all architectures without needing a rebuild.
Signed-off-by Eric W. Biederman <[email protected]>commit
6d4b8e90bc066e79dbc8a1387fb9e32c7d0f9435Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 10:52:01 2010 -0700
x86_64: Kill now unused crashdump-x86_64.[ch]Now we use the i386 crashdump-x86 instead we can kill crashdump-x86_64.
Signed-off-by Eric W. Biederman <[email protected]>commit
ff053cdb05c2d95dafbcbfd4ffc079cad3c56cc8Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 10:12:09 2010 -0700
x86_64: Use the x86 crashdumpWith proper biarch support in crashdump-x86, crashdump-x86_64 is now redudant and we can use crashdump-x86 everywhere. Using crashdump-x86 everywhere results in a little unnecessary i386 logic on
x86_64but is otherwise harmless. Removing the unnecessary duplication between i386 andx86_64should make the code much easier to maintain going forward.Signed-off-by Eric W. Biederman <[email protected]>commit
aa0418789d8e89478044511c16a32ed4c45fefb3Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 14:11:54 2010 -0700
x86_64: Use the i386arch_options_tonx86_64In preparation for having a single crashdump implementation on i386 and
x86_64start sharingarch_options_tbetween i386 andx86_64, and don't makearch_optionsstatic onx86_64.i386 and
x86_64have been using identitcal defitions ofarch_optionsfor a while this change now reflects that practical reality in the code.Signed-off-by Eric W. Biederman <[email protected]>commit
773ff64ab0ed27ca6b33c9866f89291226e86574Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 14:10:21 2010 -0700i386 crashdump: Preserve credits of
x86_64versionSigned-off-by Eric W. Biederman <[email protected]>commit
9322014fbfa77b5c744d8fabd3e9adf30b751219Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:58:29 2010 -0700i386 crashdump: Compute
page_offsetpaddr vaddr and size likex86_64.Make certain we are using the same
page_offset, paddr, and vaddr and kernel size that thex86_64crashdump code is using.Signed-off-by Eric W. Biederman <[email protected]>commit
53408ce05fc411a1a5d8aee902ed0172518fc5d8Author: Eric W. Biederman <[email protected]> Date: Wed Sep 8 12:01:14 2010 -0700kexec elf: Handle 64bit elf executables on 32bit platforms.
- Widen some types. Why did I use unsigned long? I guess this code predates the decision to support biarch.
- Since I have made the types wider fix the statements that print those types out.Signed-off-by Eric W. Biederman <[email protected]>commit
f79a61460fdb6fda47b3a1b01e1b4771374b7975Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 20:31:03 2010 -0700kexec elf: Clean up error messages
build_mem_phdrsDon't print uncondintionally print an error message about
KCORE_ELF_HEADERS_SIZEbeing wrong when the elf headers are truncated whenbuild_mem_phdrsfails because there are other reasons we could be truncated (like an actual damaged elf file).Instead only print an error message when either
probe_debugis true or we are skipping the total file size checks for some reason. When we do print an error message limit the message to the fact that we are truncated and how many bytes we have and how many bytes we need. The context of the failure should be able to provide the rest of the information.For now add a comment in
crashdump-x86_64.cto direct people toKCORE_ELF_HEADERS_SIZEso that if someone finds the code things can be adjusted.Signed-off-by Eric W. Biederman <[email protected]>commit
4c4ef6506eb29cfad16546f6b8435935432d3251Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:34:43 2010 -0700i386 crashdump: pass acpi info, and generalize hack
- Pass the acpi memap to the kernel.
- Port the fix fromx86_64to not truncate the elf note segment to 16K, to keep large machines happy.Signed-off-by Eric W. Biederman <[email protected]>commit
d25f82619565f862e2a6104fac505b9c13c8fe4cAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:23:55 2010 -0700i386 crashdump: move crashdump debugging code under #ifdef DEBUG
o Put the debug code under #ifdef DEBUG instead of #if 0.
o Do this to match thex86_64code.Signed-off-by Eric W. Biederman <[email protected]>commit
672991ea2208dd478e8c52982f39a87c64a4c8a5Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 13:12:18 2010 -0700i386 crashdump: Unify
get_crash_memory_ranges.Build a version of
get_crash_memory_rangesthat works the same on bothx86_64and x86. Reorder the calls inload_crashdump_segmentsso we have the architectures low memory limit when we callget_crash_memory_ranges.Signed-off-by Eric W. Biederman <[email protected]>commit
b73411718dbf452675fa903b2db7ab58c24ef1baAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:53:11 2010 -0700i386 crashdump: Rename and include the
x86_64constants.Unify the 32bit and the 64bit crashdump headers. Rename arch specific defintions to arch specific names to be clear. Update users of the renamed constants.
Signed-off-by Eric W. Biederman <[email protected]>commit
8f211c7519327124bb18d9e362ac9777bf400c67Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:43:40 2010 -0700i386 crashdump: Keep
elf_infoon the stack.In preparation for merging crashdump-x86 and crashdump-x86_64 move
elf_infoonto the stack and start filling it out dynamically as appropriate.Included in this change is only setting
lowmem_limitandget_note_infowhen we are generating a core file for a 32bit kernel.Signed-off-by Eric W. Biederman <[email protected]>commit
c8e346688c6358427213d9d6fdb83765e365cccdAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:05:40 2010 -0700crashdump: Move
kern_vaddr_startfromkexec_infointocrash_elf_infoThese fields as defined in
kexec_infoare not biarch safe and beyond thatcrash_elf_infois the structure for passing this kind of information notkexec_info. So move them in prepartion for properly cleaning up biarch x86 functionality.Signed-off-by Eric W. Biederman <[email protected]>commit
d9bf000b6260ee4558b2d2eb3af08e09cd1fe794Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:42:39 2010 -0700kexec: Kill
arch_initThe function only had one user, the error checking was wrong, and the functions it performed are best done elsewhere so remove the tempation of a problemenatic hook.
Signed-off-by Eric W. Biederman <[email protected]>commit
3578b1f1437f8d1b569d1e30f6d4e15edd1cce53Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:37:21 2010 -0700
x86_64crashdump: Move calculation of the page offset intocrashdump-x86_64.cDon't calculate
page_offfsetinarch_init. Performing the work there badly messes up biarch support, so move the work intocrashdump_x86_64.Signed-off-by Eric W. Biederman <[email protected]>commit
3cab31db10dd74aa148ad20aaa3455723bf45138Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:25:30 2010 -0700kexec: Move
kernel_versioninto the kexec coreI'm not pleased with the hacks that we use
kernel_versionfor butkernel_versionitself is reasonable code and might be needed elsewhere, so movekernel_versioninto the kexec core.Signed-off-by Eric W. Biederman <[email protected]>
Quoted 7 lines
commit
ebeb4da62f8b51c63a46349b219a5605ee8d79bdAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 10:41:56 2010 -0700i386 elf: Correct the probe error string
Signed-off-by Eric W. Biederman <[email protected]>
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 19 lines · Eric W. Biederman
I thought I had x86 biarch crashdump working on x86 but it turns out was wrong. So I have merged
crashdump-x86.candcrashdump-x86_64.cto ensure that things will work fine.There are a few misc cleanups in here to support biarch crashdumps.
There is a kexec bzImage load optimization that allows me to use a 64bit crash kernel in 20M in my setup. Perhaps less. Earlier because of an alighment foulup I needed 32M and the kernel was loaded in the middle of the reserved crashdump region.
There is also a new program vmcore-dmesg. Functionally it is very similar to the makedumpfile's --dmesg mode but it handles all of the crazy multi-arch cases so I only need to keep one binary around to strip the kernel's dmesg out of a core file. Additionally vmcore-dmesg is about half the size of makedumpfile and I can build it against uclibc, which makes it much more usable in my constrained initrd setup.
Quoted 3 lines
I would post patches but I know I would fat finger that horribly.
git pull
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-devel.git
A git pull request is fine.
Actually, with this many patches, its significantly easier for me too.
Quoted 1 line
---
[ snip ]
Quoted 4 lines
commit
c8e346688c6358427213d9d6fdb83765e365cccdAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:05:40 2010 -0700
Quoted 8 lines
crashdump: Move
kern_vaddr_startfromkexec_infointocrash_elf_infoThese fields as defined in
kexec_infoare not biarch safe and beyond thatcrash_elf_infois the structure for passing this kind of information notkexec_info. So move them in prepartion for properly cleaning up biarch x86 functionality.Signed-off-by Eric W. Biederman <[email protected]>
There appears to be a typo in the following hunk of this patch. I can fix this if you prefer.
kexec/arch/ia64/crashdump-ia64.c +2 -3
@@ -246,11 +246,11 @@ int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr,continue ;if (kernel_code_start >= mstart && kernel_code_start < mend) { - info->kern_vaddr_start = mstart +LOAD_OFFSET ; + elf_info.kern_vaddr_start = mstart +LOAD_OFFSET ;break ; } } - info->kern_size = kernel_code_end - kernel_code_start +1 ; + elf_info->kern_size = kernel_code_end - kernel_code_start +1 ; -------> elf_info->kern_size should be elf_info.kern_size ?
if (crash_create_elf64_headers(info, &elf_info,
crash_memory_range, nr_ranges, &tmp, &sz, EFI_PAGE_SIZE) < 0)
Which results in the following build error:
$ make ia64-unknown-linux-gnu-gcc -Wall -Wextra -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -I/home/horms/local/opt/crosstool/ia64/gcc-3.4.5-glibc-2.3.6/ia64-unknown-linux-gnu/include -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ia64/libfdt -I./kexec/arch/ia64/include -c -MD -o kexec/arch/ia64/crashdump-ia64.o kexec/arch/ia64/crashdump-ia64.c kexec/arch/ia64/crashdump-ia64.c: In function `load_crashdump_segments': kexec/arch/ia64/crashdump-ia64.c:253: error: invalid type argument of `->'
Quoted 5 lines
commit
d9bf000b6260ee4558b2d2eb3af08e09cd1fe794Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:42:39 2010 -0700
Quoted 7 lines
kexec: Kill
arch_initThe function only had one user, the error checking was wrong, and the functions it performed are best done elsewhere so remove the tempation of a problemenatic hook.
Signed-off-by Eric W. Biederman <[email protected]>
[ snip ]
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 20 lines · Simon Horman
Quoted 19 lines · Eric W. Biederman
I thought I had x86 biarch crashdump working on x86 but it turns out was wrong. So I have merged
crashdump-x86.candcrashdump-x86_64.cto ensure that things will work fine.There are a few misc cleanups in here to support biarch crashdumps.
There is a kexec bzImage load optimization that allows me to use a 64bit crash kernel in 20M in my setup. Perhaps less. Earlier because of an alighment foulup I needed 32M and the kernel was loaded in the middle of the reserved crashdump region.
There is also a new program vmcore-dmesg. Functionally it is very similar to the makedumpfile's --dmesg mode but it handles all of the crazy multi-arch cases so I only need to keep one binary around to strip the kernel's dmesg out of a core file. Additionally vmcore-dmesg is about half the size of makedumpfile and I can build it against uclibc, which makes it much more usable in my constrained initrd setup.
Quoted 6 lines
Quoted 3 lines
I would post patches but I know I would fat finger that horribly.
git pull
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-devel.gitA git pull request is fine.
Actually, with this many patches, its significantly easier for me too.
Definitely on a good day I would post the patches for review but still send you a pull request.
Quoted 15 lines
Quoted 1 line
---
[ snip ]
Quoted 11 lines
commit
c8e346688c6358427213d9d6fdb83765e365cccdAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:05:40 2010 -0700crashdump: Move
kern_vaddr_startfromkexec_infointocrash_elf_infoThese fields as defined in
kexec_infoare not biarch safe and beyond thatcrash_elf_infois the structure for passing this kind of information notkexec_info. So move them in prepartion for properly cleaning up biarch x86 functionality.
Quoted 4 lines
Quoted 1 line
Signed-off-by Eric W. Biederman <[email protected]>There appears to be a typo in the following hunk of this patch. I can fix this if you prefer.
If you could add a commit that fixes this that would be great. I have an ia64 compiler around somewhere but not handy :(
Quoted 7 lines
kexec/arch/ia64/crashdump-ia64.c +0
-0@@ -246,11 +246,11 @@ int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr,continue ; if (kernel_code_start >= mstart &&
kexec/arch/ia64/crashdump-ia64.c int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr, · line 255
Quoted 10 lines
kexec/arch/ia64/crashdump-ia64.c +2
-3kernel_code_start < mend) { - info->kern_vaddr_start = mstart +LOAD_OFFSET ; + elf_info.kern_vaddr_start = mstart +LOAD_OFFSET ;break ; } } - info->kern_size = kernel_code_end - kernel_code_start +1 ; + elf_info->kern_size = kernel_code_end - kernel_code_start +1 ; -------> elf_info->kern_size should be elf_info.kern_size ?
Yes.
Quoted 20 lines
kexec/arch/ia64/crashdump-ia64.c +0
-0if (crash_create_elf64_headers (info, &elf_info, crash_memory_range, nr_ranges, &tmp, &sz,EFI_PAGE_SIZE ) <0 )Which results in the following build error:
$ make ia64-unknown-linux-gnu-gcc -Wall -Wextra -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -I/home/horms/local/opt/crosstool/ia64/gcc-3.4.5-glibc-2.3.6/ia64-unknown-linux-gnu/include -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ia64/libfdt -I./kexec/arch/ia64/include -c -MD -o kexec/arch/ia64/crashdump-ia64.o kexec/arch/ia64/crashdump-ia64.c kexec/arch/ia64/crashdump-ia64.c: In function `load_crashdump_segments': kexec/arch/ia64/crashdump-ia64.c:253: error: invalid type argument of `->'Quoted 7 lines
commit
d9bf000b6260ee4558b2d2eb3af08e09cd1fe794Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:42:39 2010 -0700kexec: Kill
arch_init
Quoted 7 lines
Quoted 5 lines
The function only had one user, the error checking was wrong, and the functions it performed are best done elsewhere so remove the tempation of a problemenatic hook.
Signed-off-by Eric W. Biederman <[email protected]>[ snip ]
Thanks,
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 24 lines · Eric W. Biederman
Quoted 22 lines · Simon Horman
Quoted 21 lines · Eric W. Biederman
I thought I had x86 biarch crashdump working on x86 but it turns out was wrong. So I have merged
crashdump-x86.candcrashdump-x86_64.cto ensure that things will work fine.There are a few misc cleanups in here to support biarch crashdumps.
There is a kexec bzImage load optimization that allows me to use a 64bit crash kernel in 20M in my setup. Perhaps less. Earlier because of an alighment foulup I needed 32M and the kernel was loaded in the middle of the reserved crashdump region.
There is also a new program vmcore-dmesg. Functionally it is very similar to the makedumpfile's --dmesg mode but it handles all of the crazy multi-arch cases so I only need to keep one binary around to strip the kernel's dmesg out of a core file. Additionally vmcore-dmesg is about half the size of makedumpfile and I can build it against uclibc, which makes it much more usable in my constrained initrd setup.
I would post patches but I know I would fat finger that horribly.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
git pull
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-devel.gitA git pull request is fine.
Actually, with this many patches, its significantly easier for me too.Definitely on a good day I would post the patches for review but still send you a pull request.
Understood, some days email is against me too!
Quoted 15 lines
Quoted 15 lines
Quoted 1 line
---
[ snip ]
Quoted 11 lines
commit
c8e346688c6358427213d9d6fdb83765e365cccdAuthor: Eric W. Biederman <[email protected]> Date: Tue Sep 7 12:05:40 2010 -0700crashdump: Move
kern_vaddr_startfromkexec_infointocrash_elf_infoThese fields as defined in
kexec_infoare not biarch safe and beyond thatcrash_elf_infois the structure for passing this kind of information notkexec_info. So move them in prepartion for properly cleaning up biarch x86 functionality.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Eric W. Biederman <[email protected]>There appears to be a typo in the following hunk of this patch. I can fix this if you prefer.
If you could add a commit that fixes this that would be great. I have an ia64 compiler around somewhere but not handy :(
I'd rather edit the patch to avoid breaking bisection. Is that ok with you?
Quoted 45 lines
Quoted 9 lines
kexec/arch/ia64/crashdump-ia64.c +0
-0@@ -246,11 +246,11 @@ int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr,continue ; if (kernel_code_start >= mstart &&kexec/arch/ia64/crashdump-ia64.c int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr, · line 255
Quoted 10 lines
kexec/arch/ia64/crashdump-ia64.c +2
-3kernel_code_start < mend) { - info->kern_vaddr_start = mstart +LOAD_OFFSET ; + elf_info.kern_vaddr_start = mstart +LOAD_OFFSET ;break ; } } - info->kern_size = kernel_code_end - kernel_code_start +1 ; + elf_info->kern_size = kernel_code_end - kernel_code_start +1 ; -------> elf_info->kern_size should be elf_info.kern_size ?Yes.
Quoted 24 lines
kexec/arch/ia64/crashdump-ia64.c +0
-0if (crash_create_elf64_headers (info, &elf_info, crash_memory_range, nr_ranges, &tmp, &sz,EFI_PAGE_SIZE ) <0 )Which results in the following build error:
$ make ia64-unknown-linux-gnu-gcc -Wall -Wextra -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -I/home/horms/local/opt/crosstool/ia64/gcc-3.4.5-glibc-2.3.6/ia64-unknown-linux-gnu/include -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ia64/libfdt -I./kexec/arch/ia64/include -c -MD -o kexec/arch/ia64/crashdump-ia64.o kexec/arch/ia64/crashdump-ia64.c kexec/arch/ia64/crashdump-ia64.c: In function `load_crashdump_segments': kexec/arch/ia64/crashdump-ia64.c:253: error: invalid type argument of `->'Quoted 11 lines
commit
d9bf000b6260ee4558b2d2eb3af08e09cd1fe794Author: Eric W. Biederman <[email protected]> Date: Tue Sep 7 11:42:39 2010 -0700kexec: Kill
arch_initThe function only had one user, the error checking was wrong, and the functions it performed are best done elsewhere so remove the tempation of a problemenatic hook.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Eric W. Biederman <[email protected]>[ snip ]
Thanks,
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 2 lines · Simon Horman
I'd rather edit the patch to avoid breaking bisection. Is that ok with you?
No real problem, and my patchset is just intrusive enough someone might care and try and bisect a problem.
In general I wouldn't fix that patch (after I had made it public) and would simply send a correcting patch because it can quickly become confusing, which patch should go where when.
Here I don't think there is any danger of confusion so I don't think that changing history that has only been on my devel branch is worth worrying about.
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 8 lines · Eric W. Biederman
Quoted 2 lines · Simon Horman
I'd rather edit the patch to avoid breaking bisection. Is that ok with you?
No real problem, and my patchset is just intrusive enough someone might care and try and bisect a problem.
Quoted 7 lines
In general I wouldn't fix that patch (after I had made it public) and would simply send a correcting patch because it can quickly become confusing, which patch should go where when.
Here I don't think there is any danger of confusion so I don't think that changing history that has only been on my devel branch is worth worrying about.
Agreed. I've made the change and pushed the result.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec