mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size}
A subsequent fix for arm64 will use this parameter to parse the vma
information from the snapshot created by dump_vma_snapshot() rather than
traversing the vma list without the mmap_lock.
Fixes: 6dd8b1a0b6 ("arm64: mte: Dump the MTE tags in the core file")
Cc: <stable@vger.kernel.org> # 5.18.x
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Seth Jenkins <sethjenkins@google.com>
Suggested-by: Seth Jenkins <sethjenkins@google.com>
Cc: Will Deacon <will@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221222181251.1345752-3-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
736eedc974
commit
19e183b545
@@ -105,14 +105,14 @@ int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
|
||||
* Dumping its extra ELF program headers includes all the other information
|
||||
* a debugger needs to easily find how the gate DSO was being used.
|
||||
*/
|
||||
extern Elf_Half elf_core_extra_phdrs(void);
|
||||
extern Elf_Half elf_core_extra_phdrs(struct coredump_params *cprm);
|
||||
extern int
|
||||
elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset);
|
||||
extern int
|
||||
elf_core_write_extra_data(struct coredump_params *cprm);
|
||||
extern size_t elf_core_extra_data_size(void);
|
||||
extern size_t elf_core_extra_data_size(struct coredump_params *cprm);
|
||||
#else
|
||||
static inline Elf_Half elf_core_extra_phdrs(void)
|
||||
static inline Elf_Half elf_core_extra_phdrs(struct coredump_params *cprm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ static inline int elf_core_write_extra_data(struct coredump_params *cprm)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline size_t elf_core_extra_data_size(void)
|
||||
static inline size_t elf_core_extra_data_size(struct coredump_params *cprm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user