From eb3c89638a1e1ba41f16af41dbb8538c395529ff Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 30 Apr 2019 09:53:44 -0500 Subject: Handle DD2.3 mode properly when setting elevated risk in HDAT When running in native (DD2.3) mode, the value of ATTR_RISK_LEVEL is always greater than zero. The code needs to handle the higher values when setting the elevated risk level bit in the HDAT structures that go up to the OS. Change-Id: Ib8d9c4f885ad84cf2b0344e38d6e3c74b7c21ef8 CQ: SW464159 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76728 Tested-by: Jenkins Server Reviewed-by: Matt Derksen Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Jayashankar Padath Tested-by: Jenkins OP HW Reviewed-by: Nicholas E. Bofferding --- src/usr/hdat/hdatiplparms.C | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/usr/hdat') diff --git a/src/usr/hdat/hdatiplparms.C b/src/usr/hdat/hdatiplparms.C index a22dfbbe2..1f4e3f066 100755 --- a/src/usr/hdat/hdatiplparms.C +++ b/src/usr/hdat/hdatiplparms.C @@ -705,8 +705,16 @@ void HdatIplParms::hdatGetSystemParamters() HDAT_ERR(" Error in getting attribute PAYLOAD_IN_MIRROR_MEM"); } - this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= - l_pSysTarget->getAttr() ? HDAT_RISK_LEVEL_ELEVATED : 0 ; + // Check both compat and native mode for relevant risk levels + ATTR_RISK_LEVEL_type l_risk = l_pSysTarget->getAttr(); + if( !((l_risk == UTIL::P9N22_P9C12_RUGBY_FAVOR_SECURITY) + || (l_risk == UTIL::P9N23_P9C13_NATIVE_SMF_RUGBY_FAVOR_SECURITY)) ) + { + // running in a mode that doesn't favor security, set elevated risk + this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= + HDAT_RISK_LEVEL_ELEVATED; + } + this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= l_pSysTarget->getAttr() ? HDAT_MPIPL_SUPPORTED : 0 ; -- cgit v1.2.1