Spectre/meltdown kernel options controllable by customer

Implements customer configuration of kernel options to control
spectre/meltdown related kernel options.  Default (with "nopti
nospectre_v2" options) can be changed to "" using

system modify -S spectre_meltdown_all

Change-Id: I6e86cfca126a1864ab27989e7027ae990716a29d
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
jmckenna 2018-05-11 14:24:06 -04:00 committed by Jack Ding
parent fdc2cc4ade
commit c172f502b1
1 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import logging
SW_VERSION = ""
SW_VERSION_1610 = '16.10'
SW_VERSION_1706 = '17.06'
SW_VERSION_1803 = '18.03'
nodetype = None
subfunctions = []
@ -30,6 +31,7 @@ system_type = None
system_mode = None
security_profile = None
distributed_cloud_role = None
security_feature = None
PLATFORM_CONF_PATH = '/etc/platform'
PLATFORM_CONF_FILE = os.path.join(PLATFORM_CONF_PATH, 'platform.conf')
@ -140,6 +142,10 @@ def _load():
if config.has_option('platform_conf', 'distributed_cloud_role'):
distributed_cloud_role = config.get('platform_conf', 'distributed_cloud_role')
global security_feature
if config.has_option('platform_conf', 'security_feature'):
security_feature = config.get('platform_conf', 'security_feature')
except ConfigParser.Error:
logging.exception("Failed to read platform.conf")
return False