1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _MISC_CRASHINFO_H 3 #define _MISC_CRASHINFO_H 4 5 #include <linux/types.h> 6 7 #define CRASHINFO_MAGIC "crashnfo" 8 #define CRASHINFO_MAGIC_SIZE 8 9 #define CRASHINFO_REASON_SIZE 256 10 11 /* 12 * The userspace client expects crashinfo_img_hdr to precede data. 13 * Header version 0 to be as follows: 14 */ 15 struct crashinfo_img_hdr { 16 /* must be CRASHINFO MAGIC. */ 17 __u8 magic[CRASHINFO_MAGIC_SIZE]; 18 19 __le32 header_version; 20 __le32 header_size; 21 __le32 flags; 22 __le32 crc; 23 24 __le64 coredump_size; /* size in bytes */ 25 char crashinfo[CRASHINFO_REASON_SIZE]; 26 } __attribute__((packed)); 27 28 #endif /* _MISC_CRASHINFO_H */ 29