函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\bugs.c Create Date:2022-07-27 08:56:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:spectre_v2_parse_cmdline

函数原型:static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)

返回类型:enum spectre_v2_mitigation_cmd

参数:

715  cmd等于SPECTRE_V2_CMD_AUTO
719  如果命令行查找选项cpu_mitigations_off()则返回:SPECTRE_V2_CMD_NONE
723  ret等于命令行查找参数
724  如果ret小于0则返回:SPECTRE_V2_CMD_AUTO
727 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(mitigation_options)循环
728  如果非match_option(arg, ret, option)则继续下一循环
730  cmd等于cmd
731  退出
734  如果i大于等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(mitigation_options)则
735  打印错误信息("unknown option (%s). Switching to AUTO select\n", arg)
736  返回:SPECTRE_V2_CMD_AUTO
739  如果cmd恒等于SPECTRE_V2_CMD_RETPOLINEcmd恒等于SPECTRE_V2_CMD_RETPOLINE_AMDcmd恒等于SPECTRE_V2_CMD_RETPOLINE_GENERIC的值且非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RETPOLINE)则
743  打印错误信息("%s selected but not compiled in. Switching to AUTO select\n", option)
744  返回:SPECTRE_V2_CMD_AUTO
747  如果cmd恒等于SPECTRE_V2_CMD_RETPOLINE_AMDCPU vendor 不等于X86_VENDOR_HYGONCPU vendor 不等于X86_VENDOR_AMD
750  打印错误信息("retpoline,amd selected but CPU is not AMD. Switching to AUTO select\n")
751  返回:SPECTRE_V2_CMD_AUTO
754  spec_v2_print_cond(option, secure)
756  返回:cmd
调用者
名称描述
spectre_v2_select_mitigation