2021-01-14 16:40:42 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _LINUX_BUILDID_H
|
|
|
|
#define _LINUX_BUILDID_H
|
|
|
|
|
|
|
|
#include <linux/mm_types.h>
|
|
|
|
|
|
|
|
#define BUILD_ID_SIZE_MAX 20
|
|
|
|
|
2021-01-14 16:40:43 +03:00
|
|
|
int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
|
|
|
|
__u32 *size);
|
2021-07-08 04:09:10 +03:00
|
|
|
int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size);
|
2021-01-14 16:40:42 +03:00
|
|
|
|
2021-07-08 04:09:49 +03:00
|
|
|
#if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) || IS_ENABLED(CONFIG_CRASH_CORE)
|
2021-07-08 04:09:13 +03:00
|
|
|
extern unsigned char vmlinux_build_id[BUILD_ID_SIZE_MAX];
|
|
|
|
void init_vmlinux_build_id(void);
|
2021-07-08 04:09:17 +03:00
|
|
|
#else
|
|
|
|
static inline void init_vmlinux_build_id(void) { }
|
|
|
|
#endif
|
2021-07-08 04:09:13 +03:00
|
|
|
|
2021-01-14 16:40:42 +03:00
|
|
|
#endif
|