函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\bugs.c |
Create Date:2022-07-27 08:56:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:spectre_v2_user_select_mitigation
函数原型:static void __init spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
enum spectre_v2_mitigation_cmd | v2_cmd |
605 | mode等于SPECTRE_V2_USER_NONE |
606 | smt_possible等于IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SMP) |
609 | 如果非boot_cpu_has(Indirect Branch Prediction Barrier )且非boot_cpu_has(Single Thread Indirect Branch Predictors )则返回 |
612 | 如果cpu_smt_control恒等于CPU_SMT_FORCE_DISABLED或cpu_smt_control恒等于CPU_SMT_NOT_SUPPORTED则smt_possible = false |
618 | 当:cmd恒等于SPECTRE_V2_USER_CMD_NONE |
619 | 转到:set_mode |
620 | 当:cmd恒等于SPECTRE_V2_USER_CMD_FORCE |
622 | 退出 |
623 | 当:cmd恒等于SPECTRE_V2_USER_CMD_PRCTL |
626 | 退出 |
627 | 当:cmd恒等于SPECTRE_V2_USER_CMD_AUTO |
628 | 当:cmd恒等于SPECTRE_V2_USER_CMD_SECCOMP |
630 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SECCOMP)则mode等于SPECTRE_V2_USER_SECCOMP |
632 | 否则mode等于SPECTRE_V2_USER_PRCTL |
634 | 退出 |
642 | 如果mode不等于SPECTRE_V2_USER_STRICT且boot_cpu_has("" Single Thread Indirect Branch Predictors always-on preferred )则mode等于SPECTRE_V2_USER_STRICT_PREFERRED |
651 | 当:cmd恒等于SPECTRE_V2_USER_CMD_FORCE |
656 | 当:cmd恒等于SPECTRE_V2_USER_CMD_PRCTL |
657 | 当:cmd恒等于SPECTRE_V2_USER_CMD_AUTO |
658 | 当:cmd恒等于SPECTRE_V2_USER_CMD_SECCOMP |
661 | 默认 |
662 | 退出 |
665 | 打印信息("mitigation: Enabling %s Indirect Branch Prediction Barrier\n", static_key_enabled( & Control unconditional IBPB in switch_mm() ) ? "always-on" : "conditional") |
671 | 如果spectre_v2_enabled恒等于SPECTRE_V2_IBRS_ENHANCED则返回 |
678 | 如果非smt_possible或非boot_cpu_has(Single Thread Indirect Branch Predictors )则mode等于SPECTRE_V2_USER_NONE |
680 | set_mode : |
681 | spectre_v2_user等于mode |
683 | 如果smt_possible则打印信息("%s\n", spectre_v2_user_strings[mode]) |
名称 | 描述 |
---|---|
spectre_v2_select_mitigation |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |