函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\bugs.c |
Create Date:2022-07-27 08:56:35 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:spectre_v2_select_mitigation
函数原型:static void __init spectre_v2_select_mitigation(void)
返回类型:void
参数:无
761 | cmd等于spectre_v2_parse_cmdline() |
762 | mode等于SPECTRE_V2_NONE |
768 | 如果非boot_cpu_has_bug(CPU is affected by Spectre variant 2 attack with indirect branches )且cmd恒等于SPECTRE_V2_CMD_NONE或cmd恒等于SPECTRE_V2_CMD_AUTO的值则返回 |
773 | 当:cmd恒等于SPECTRE_V2_CMD_NONE |
774 | 返回 |
776 | 当:cmd恒等于SPECTRE_V2_CMD_FORCE |
777 | 当:cmd恒等于SPECTRE_V2_CMD_AUTO |
778 | 如果boot_cpu_has(Enhanced IBRS )则 |
781 | The base value of the SPEC_CTRL MSR that always has to be preserved. 或等于Indirect Branch Restricted Speculation |
782 | wrmsrl(Speculation Control , The base value of the SPEC_CTRL MSR that always has to be preserved. ) |
783 | 转到:specv2_set_mode |
785 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RETPOLINE)则转到:retpoline_auto |
787 | 退出 |
788 | 当:cmd恒等于SPECTRE_V2_CMD_RETPOLINE_AMD |
789 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RETPOLINE)则转到:retpoline_amd |
791 | 退出 |
793 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RETPOLINE)则转到:retpoline_generic |
795 | 退出 |
796 | 当:cmd恒等于SPECTRE_V2_CMD_RETPOLINE |
797 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RETPOLINE)则转到:retpoline_auto |
799 | 退出 |
801 | 打印错误信息("Spectre mitigation: kernel not compiled with retpoline; no mitigation available!") |
802 | 返回 |
804 | retpoline_auto : |
805 | 如果CPU vendor 恒等于X86_VENDOR_AMD或CPU vendor 恒等于X86_VENDOR_HYGON则 |
807 | retpoline_amd : |
808 | 如果非boot_cpu_has("" LFENCE synchronizes RDTSC )则 |
809 | 打印错误信息("Spectre mitigation: LFENCE not serializing, switching to generic retpoline\n") |
810 | 转到:retpoline_generic |
815 | 否则 |
816 | retpoline_generic : |
821 | specv2_set_mode : |
822 | spectre_v2_enabled等于mode |
823 | 打印信息("%s\n", spectre_v2_strings[mode]) |
834 | 打印信息("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n") |
849 | 打印信息("Enabling Restricted Speculation for firmware calls\n") |
名称 | 描述 |
---|---|
check_bugs | 检查CPU配置是否非法使用不具备的功能 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |