2021-01-14 14:40:42 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
#ifndef _LINUX_BUILDID_H
|
|
|
|
|
#define _LINUX_BUILDID_H
|
|
|
|
|
|
2023-10-17 16:33:58 +02:00
|
|
|
#include <linux/types.h>
|
2021-01-14 14:40:42 +01:00
|
|
|
|
|
|
|
|
#define BUILD_ID_SIZE_MAX 20
|
|
|
|
|
|
2023-10-17 16:33:58 +02:00
|
|
|
struct vm_area_struct;
|
2024-08-29 10:42:27 -07:00
|
|
|
int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size);
|
|
|
|
|
int build_id_parse_nofault(struct vm_area_struct *vma, unsigned char *build_id, __u32 *size);
|
2021-07-07 18:09:10 -07:00
|
|
|
int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size);
|
2021-01-14 14:40:42 +01:00
|
|
|
|
2024-01-24 13:12:42 +08:00
|
|
|
#if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) || IS_ENABLED(CONFIG_VMCORE_INFO)
|
2021-07-07 18:09:13 -07:00
|
|
|
extern unsigned char vmlinux_build_id[BUILD_ID_SIZE_MAX];
|
|
|
|
|
void init_vmlinux_build_id(void);
|
2021-07-07 18:09:17 -07:00
|
|
|
#else
|
|
|
|
|
static inline void init_vmlinux_build_id(void) { }
|
|
|
|
|
#endif
|
2021-07-07 18:09:13 -07:00
|
|
|
|
2021-01-14 14:40:42 +01:00
|
|
|
#endif
|