On 06/06/2016:06:00:05 PM, Russell King wrote:
> Rather than using ULONG_MAX to decide whether to use the ELF64 or ELF32
> core dump format, use UINT32_MAX instead - we include stdint.h, so we
> might as well use a constant which is meaningful for the limits of
> the 32-bit ELF format.
>
> Signed-
On 06/06/2016:06:00:16 PM, Russell King wrote:
> Report an error if the crash kernel memory region is outside of the
> boot-view memory range - this can happen with systems such as
> Keystone 2.
>
> Signed-off-by: Russell King
Reviewed-by: Pratyush Anand
> ---
> kexec/arch/arm/crashdump-arm.c
On 06/06/2016:05:59:44 PM, Russell King wrote:
> Add a helper to exclude a region from a set of memory ranges.
>
> Signed-off-by: Russell King
Reviewed-by: Pratyush Anand
> ---
> kexec/mem_regions.c | 71
> +
> kexec/mem_regions.h | 4 +++
>
>Hello,
>
>makedumpfile-1.6.0 was scheduled in May, but still there is a
>unresolved issue so the release will be delayed.
>
>The issue is that the multi-thread feature doesn't work correctly
>on ia64, the generated dump is indefinite.
>The dumps below are generated by the same option (-cd31 + --nu
>If the pgd entry is null, the code below will try to read 0x0.
>This behavior will cause unexpected results, especially if pfn:0 is on
>memory hole.
>I think null pgd (and pud) entries should be skipped, how about you ?
>I would like you to post the bug fix if you have no objection.
For v1.6.0, I
>>+static void
>>+exclude_nodata_pages(struct cycle *cycle)
>>+{
>>+ int i;
>>+ unsigned long long phys_start, phys_end;
>>+ off_t file_size;
>>+
>>+ i = 0;
>>+ while (get_pt_load_extents(i, &phys_start, &phys_end,
>>+NULL, &file_size)) {
>>+
On 06/06/2016:05:59:03 PM, Russell King wrote:
> When kdump tries to map the program header, it fails to take account
> of ehdr->e_phoff being an offset from the start of the ELF "file",
> which causes:
>
> Cannot mmap /dev/mem offset: 64 size: 392: Invalid argument
>
> Ensure that we take accoun
On Fri, Jun 03, 2016 at 06:13:40PM +, Geoff Levand wrote:
> This series adds the core support for kexec re-boot and kdump on ARM64. This
> version of the series combines Takahiro's kdump patches with my kexec patches.
> Please consider all patches for inclusion.
>
> Takahiro has done some ext
The kexec API deals with boot-view addresses, rather than normal system
view addresses. This causes problems for platforms such as Keystone 2,
where the boot view is substantially different from the normal system
view.
This is because Keystone 2 boots from a memory alias in the lower 4GiB,
before
Rather than using ULONG_MAX to decide whether to use the ELF64 or ELF32
core dump format, use UINT32_MAX instead - we include stdint.h, so we
might as well use a constant which is meaningful for the limits of
the 32-bit ELF format.
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c |
crashdump-elf.c passes unsigned long long addresses into phys_to_virt()
so make phys_to_virt() accept such addresses without truncating them.
This is important for ARM LPAE systems.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/phys_to_virt.c | 2 +-
kexec/crashdump
Add a helper to exclude a region from a set of memory ranges.
Signed-off-by: Russell King
---
kexec/mem_regions.c | 71 +
kexec/mem_regions.h | 4 +++
2 files changed, 75 insertions(+)
diff --git a/kexec/mem_regions.c b/kexec/mem_regions.c
in
Return the proper error code (ENOCRASHKERNEL) for a missing crash
kernel region in /proc/iomem, so the error handling in kexec.c can
print the appropriate message.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/kexec-zImage-arm.c | 2 +-
1 file changed, 1 insertion(+
The memory range end is inclusive, not exclusive (see x86). We should
not be adding one to the value parsed from the /proc/iomem resources.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/kexec-arm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kexec/arch/arm/k
When crashdumping, we need the boot memory alias of the crash kernel
region rather than the system view. Arrange to check for the boot
alias of the crash kernel region first, and if found, use it instead
of the main alias.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/
Add a helper to add a memory range to a memory_regions array.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/Makefile | 4
kexec/mem_regions.c | 30 ++
kexec/mem_regions.h | 9 +
3 files changed, 43 insertions(+)
create mode 10
Add debug of the reserved and coredump memory ranges for validation.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
index 25fdbe
Add support for reserving multiple memory regions rather than just a
single region.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 66 --
1 file changed, 25 insertions(+), 41 deletions(-)
diff --git a/kexec/a
Some LPAE systems may have phys_offset above the 4GB mark. Hence, we
need phys_offset to be a 64-bit integer.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 4 ++--
kexec/arch/arm/crashdump-arm.h | 1 -
kexec/arch/arm/phys_to_virt.c | 4 +++-
kexe
Rename crash_reserved_mem to crash_kernel_mem as we want to support
multiple reserved memory ranges.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/kexe
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/Makefile| 2 ++
kexec/arch/arm/crashdump-arm.c | 51 --
2 files changed, 11 insertions(+), 42 deletions(-)
diff --git a/kexec/arch/arm/Makefile b/kexec/arch/arm/Makefile
i
Add support for detecting and using the boot-time crash kernel
resource, which is needed for systems which have special boot-time
memory views, such as Keystone 2.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 13 +++--
1 file changed, 11 i
Add a mem_regions sorting implementation taken from the arm code.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/mem_regions.c | 27 +++
kexec/mem_regions.h | 2 ++
2 files changed, 29 insertions(+)
diff --git a/kexec/mem_regions.c b/kexec/mem_region
Fix get_kernel_stext_sym() so that it closes its file once it's
finsihed with it - there's no need to leak file descriptors.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 23 ---
1 file changed, 16 insertions(+), 7 deletions(-)
kexec/arch/arm/kexec-uImage-arm.c: In function 'uImage_arm_probe':
kexec/arch/arm/kexec-uImage-arm.c:14:2: warning: pointer targets in passing
argument 1 of 'uImage_probe_kernel' differ in signedness [-Wpointer-sign]
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/ke
We parse the crash kernel memory region in several locations in the
kexec tools - once to check that there's a region, another time for
real when we're locating the memory regions to dump, and another
while loading the image.
Move the real parsing step to is_crashkernel_mem_reserved(), which
match
Clean up the physical and page offset debug prints.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
index 2589582..
Report which ELF core format will be used to create the template ELF
core dump in the debug information.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/
When mmap() fails, printing a large decimal number is mostly
meaningless - it's not obvious what it means. Printing a hex number
is more obvious, because we can see whether it's over 32-bit, or not
page aligned.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kdump/kdump.c | 2 +-
We need to use 64-bit file IO when mapping system memory and the core
dump file as we may be running on a LPAE system, otherwise we risk
mapping memory we shouldn't, and causing a kernel oops:
Unhandled fault: asynchronous external abort (0x211) at 0x
pgd = edd2c740
[] *pgd=82ec980
Actually write out the memory rather than writing the notes a second
time.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kdump/kdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdump/kdump.c b/kdump/kdump.c
index 99a1789..1f5b984 100644
--- a/kdump/kdump.
When kdump tries to map the program header, it fails to take account
of ehdr->e_phoff being an offset from the start of the ELF "file",
which causes:
Cannot mmap /dev/mem offset: 64 size: 392: Invalid argument
Ensure that we take account of the start address when mapping this.
This fix has been
Use the generic mem_region sorting implementation.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
inde
generate_new_headers() forgot to increment the program header pointer
after adding each program header from the kexec template. Fix it to
increment it correctly.
Without this, the program headers contain only the last entry, which
means we will be missing most of the kernel image in the dump.
Rev
The man page for mmap() and munmap() says that mmap() and munmap()
only works for page-aligned addresses, sizes and offsets. Arrange
to give these interfaces what they want.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kdump/kdump.c | 19 ---
1 file changed, 16 i
Add the maximum number of memory ranges to the list of usable memory
ranges, so that we don't have to carry this around.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/
Report an error if the crash kernel memory region is outside of the
boot-view memory range - this can happen with systems such as
Keystone 2.
Signed-off-by: Russell King
---
kexec/arch/arm/crashdump-arm.c | 11 +++
kexec/arch/arm/crashdump-arm.h | 1 +
2 files changed, 12 insertions(+)
Add the call to dbgprint_mem_range() into the ARM version of
get_memory_ranges().
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/arch/arm/kexec-arm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kexec/arch/arm/kexec-arm.c b/kexec/arch/arm/kexec-arm.c
index e47fc00..
Many implementations statically allocate the memory range array, which
therefore will have a maximum allowable size. Add this information to
the memory_ranges structure, so we don't have to carry it around.
Reviewed-by: Pratyush Anand
Signed-off-by: Russell King
---
kexec/kexec.h | 1 +
1 file
Fix warnings caused by selecting 64-bit file IO on 32-bit platforms.
kexec/kexec.c:710:2: warning: format '%lx' expects argument of type 'long
unsigned int', but argument 4 has type 'off_t' [-Wformat]
kexec/zlib.c:63:4: warning: format '%ld' expects argument of type 'long int',
but argument 4 ha
Here's the latest set of kexec-tools patches to support Keystone II
platforms, which work in conjunction with the kernel patches which
Andrew Morton has already taken.
Most of the patches have been reviewed, but there are a small number
which do not have Reviewed-by or Acked-by tags; these are due
41 matches
Mail list logo