diff options
Diffstat (limited to 'kexec/crashdump-elf.c')
-rw-r--r-- | kexec/crashdump-elf.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c index 850087e..dd89180 100644 --- a/kexec/crashdump-elf.c +++ b/kexec/crashdump-elf.c @@ -73,6 +73,17 @@ int FUNC(struct kexec_info *info, sz += sizeof(PHDR); } + /* + * Make sure the ELF core header is aligned to at least 1024. + * We do this because the secondary kernel gets the ELF core + * header address on the kernel command line through the memmap= + * option, and this option requires 1k granularity. + */ + + if (align % ELF_CORE_HEADER_ALIGN) { + return -1; + } + sz += align - 1; sz &= ~(align - 1); |