Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
39 lines
958 B
C
39 lines
958 B
C
#ifndef _LINUX_CFI_H
|
|
#define _LINUX_CFI_H
|
|
|
|
#include <linux/stringify.h>
|
|
|
|
#ifdef CONFIG_CFI_CLANG
|
|
#ifdef CONFIG_MODULES
|
|
|
|
typedef void (*cfi_check_fn)(uint64_t, void *, void *);
|
|
|
|
/* Compiler-generated function in each module, and the kernel */
|
|
#define CFI_CHECK_FN __cfi_check
|
|
#define CFI_CHECK_FN_NAME __stringify(CFI_CHECK_FN)
|
|
|
|
extern void CFI_CHECK_FN(uint64_t, void *, void *);
|
|
|
|
#ifdef CONFIG_CFI_CLANG_SHADOW
|
|
extern void cfi_module_add(struct module *mod, unsigned long min_addr,
|
|
unsigned long max_addr);
|
|
|
|
extern void cfi_module_remove(struct module *mod, unsigned long min_addr,
|
|
unsigned long max_addr);
|
|
#else
|
|
static inline void cfi_module_add(struct module *mod, unsigned long min_addr,
|
|
unsigned long max_addr)
|
|
{
|
|
}
|
|
|
|
static inline void cfi_module_remove(struct module *mod, unsigned long min_addr,
|
|
unsigned long max_addr)
|
|
{
|
|
}
|
|
#endif /* CONFIG_CFI_CLANG_SHADOW */
|
|
|
|
#endif /* CONFIG_MODULES */
|
|
#endif /* CONFIG_CFI_CLANG */
|
|
|
|
#endif /* _LINUX_CFI_H */
|