Linux内核中错误注入宏的目的

我已经看到了SYSCALL_DEFINEx中使用的宏ALLOW_ERROR_INJECTION

#ifdef CONFIG_FUNCTION_ERROR_INJECTION
/*
 * Whitelist ganerating macro. Specify functions which can be
 * error-injectable using this macro.
 */
#define ALLOW_ERROR_INJECTION(fname,_etype)                            \
static struct error_injection_entry __used                              \
        __attribute__((__section__("_error_injection_whitelist")))      \
        _eil_addr_##fname = {                                           \
                .addr = (unsigned long)fname,\
                .etype = EI_ETYPE_##_etype,\
        };
#else
#define ALLOW_ERROR_INJECTION(fname,_etype)
#endif
#endif

有人可以为此提供足够的文档吗?

它的用途是什么。什么是白名单

henghbing 回答:Linux内核中错误注入宏的目的

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3147808.html

大家都在问