Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #include <stdio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #include <stdlib.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #include <stdarg.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <stdbool.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <string.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <sys/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <sys/stat.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <sys/mman.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <fcntl.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <unistd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <elf.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include "elfconfig.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) /* On BSD-alike OSes elf.h defines these according to host's word size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #undef ELF_ST_BIND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #undef ELF_ST_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #undef ELF_R_SYM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #undef ELF_R_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #if KERNEL_ELFCLASS == ELFCLASS32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #define Elf_Ehdr    Elf32_Ehdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define Elf_Shdr    Elf32_Shdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #define Elf_Sym     Elf32_Sym
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #define Elf_Addr    Elf32_Addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define Elf_Sword   Elf64_Sword
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define Elf_Section Elf32_Half
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define ELF_ST_BIND ELF32_ST_BIND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #define ELF_ST_TYPE ELF32_ST_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #define Elf_Rel     Elf32_Rel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #define Elf_Rela    Elf32_Rela
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #define ELF_R_SYM   ELF32_R_SYM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) #define ELF_R_TYPE  ELF32_R_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) #define Elf_Ehdr    Elf64_Ehdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #define Elf_Shdr    Elf64_Shdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #define Elf_Sym     Elf64_Sym
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) #define Elf_Addr    Elf64_Addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) #define Elf_Sword   Elf64_Sxword
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) #define Elf_Section Elf64_Half
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) #define ELF_ST_BIND ELF64_ST_BIND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #define ELF_ST_TYPE ELF64_ST_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #define Elf_Rel     Elf64_Rel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #define Elf_Rela    Elf64_Rela
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) #define ELF_R_SYM   ELF64_R_SYM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) #define ELF_R_TYPE  ELF64_R_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) /* The 64-bit MIPS ELF ABI uses an unusual reloc format. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) typedef struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	Elf32_Word    r_sym;	/* Symbol index */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	unsigned char r_ssym;	/* Special symbol for 2nd relocation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	unsigned char r_type3;	/* 3rd relocation type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	unsigned char r_type2;	/* 2nd relocation type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	unsigned char r_type1;	/* 1st relocation type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) } _Elf64_Mips_R_Info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) typedef union
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	Elf64_Xword		r_info_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	_Elf64_Mips_R_Info	r_info_fields;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) } _Elf64_Mips_R_Info_union;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) #define ELF64_MIPS_R_SYM(i) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)   ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) #define ELF64_MIPS_R_TYPE(i) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)   ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) #if KERNEL_ELFDATA != HOST_ELFDATA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) static inline void __endian(const void *src, void *dest, unsigned int size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	unsigned int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	for (i = 0; i < size; i++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		((unsigned char*)dest)[i] = ((unsigned char*)src)[size - i-1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) #define TO_NATIVE(x)						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) ({								\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	typeof(x) __x;						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	__endian(&(x), &(__x), sizeof(__x));			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	__x;							\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) #else /* endianness matches */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) #define TO_NATIVE(x) (x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) #define NOFAIL(ptr)   do_nofail((ptr), #ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) void *do_nofail(void *ptr, const char *expr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) struct buffer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	char *p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	int pos;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	int size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) void __attribute__((format(printf, 2, 3)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) buf_printf(struct buffer *buf, const char *fmt, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) buf_write(struct buffer *buf, const char *s, int len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) struct namespace_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	struct namespace_list *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	char namespace[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) struct module {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	struct module *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	int gpl_compatible;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	struct symbol *unres;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	int from_dump;  /* 1 if module was loaded from *.symvers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	int is_vmlinux;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	int seen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	int has_init;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	int has_cleanup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	struct buffer dev_table_buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	char	     srcversion[25];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	// Missing namespace dependencies
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	struct namespace_list *missing_namespaces;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	// Actual imported namespaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	struct namespace_list *imported_namespaces;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	char name[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) struct elf_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	size_t size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	Elf_Ehdr     *hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	Elf_Shdr     *sechdrs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	Elf_Sym      *symtab_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	Elf_Sym      *symtab_stop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	Elf_Section  export_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	Elf_Section  export_unused_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	Elf_Section  export_gpl_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	Elf_Section  export_unused_gpl_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	Elf_Section  export_gpl_future_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	char         *strtab;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	char	     *modinfo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	unsigned int modinfo_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	/* support for 32bit section numbers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	unsigned int num_sections; /* max_secindex + 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	unsigned int secindex_strings;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	/* if Nth symbol table entry has .st_shndx = SHN_XINDEX,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	 * take shndx from symtab_shndx_start[N] instead */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	Elf32_Word   *symtab_shndx_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	Elf32_Word   *symtab_shndx_stop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) static inline int is_shndx_special(unsigned int i)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	return i != SHN_XINDEX && i >= SHN_LORESERVE && i <= SHN_HIRESERVE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)  * Move reserved section indices SHN_LORESERVE..SHN_HIRESERVE out of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)  * the way to -256..-1, to avoid conflicting with real section
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)  * indices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) #define SPECIAL(i) ((i) - (SHN_HIRESERVE + 1))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) /* Accessor for sym->st_shndx, hides ugliness of "64k sections" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) static inline unsigned int get_secindex(const struct elf_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 					const Elf_Sym *sym)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	if (is_shndx_special(sym->st_shndx))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		return SPECIAL(sym->st_shndx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	if (sym->st_shndx != SHN_XINDEX)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		return sym->st_shndx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	return info->symtab_shndx_start[sym - info->symtab_start];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) static inline bool strends(const char *str, const char *postfix)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	if (strlen(str) < strlen(postfix))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		return false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	return strcmp(str + strlen(str) - strlen(postfix), postfix) == 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) /* file2alias.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) extern unsigned int cross_build;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) void handle_moddevtable(struct module *mod, struct elf_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 			Elf_Sym *sym, const char *symname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) void add_moddevtable(struct buffer *buf, struct module *mod);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) /* sumversion.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) void get_src_version(const char *modname, char sum[], unsigned sumlen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /* from modpost.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) char *read_text_file(const char *filename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) char *get_line(char **stringp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) enum loglevel {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	LOG_WARN,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	LOG_ERROR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	LOG_FATAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) void modpost_log(enum loglevel loglevel, const char *fmt, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)  * warn - show the given message, then let modpost continue running, still
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)  *        allowing modpost to exit successfully. This should be used when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)  *        we still allow to generate vmlinux and modules.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)  * error - show the given message, then let modpost continue running, but fail
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)  *         in the end. This should be used when we should stop building vmlinux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)  *         or modules, but we can continue running modpost to catch as many
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)  *         issues as possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)  * fatal - show the given message, and bail out immediately. This should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)  *         used when there is no point to continue running modpost.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) #define warn(fmt, args...)	modpost_log(LOG_WARN, fmt, ##args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) #define error(fmt, args...)	modpost_log(LOG_ERROR, fmt, ##args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #define fatal(fmt, args...)	modpost_log(LOG_FATAL, fmt, ##args)