函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\sed-opal.c Create Date:2022-07-27 19:46:41
Last Modify:2020-03-17 23:36:33 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:start_auth_opal_session

函数原型:static int start_auth_opal_session(struct opal_dev *dev, void *data)

返回类型:int

参数:

类型参数名称
struct opal_dev *dev
void *data
1497  session等于data
1499  keylen等于key_len
1500  err等于0
1502  key等于key
1503  hsn等于GENERIC_HOST_SESSION_NUM
1505  如果sumerr等于build_locking_user(lk_ul_user, lk_ul_user的长度, lr)
1508  否则如果who不等于OPAL_ADMIN1且非sumerr等于build_locking_user(lk_ul_user, lk_ul_user的长度, who - 1)
1511  否则memcpy(lk_ul_user, opaluid[OPAL_ADMIN1_UID], OPAL_UID_LENGTH)
1514  如果err则返回:err
1517  err等于cmd_start(dev, opaluid[OPAL_SMUID_UID], TCG Storage SSC Methods.* Derived from: TCG_Storage_Architecture_Core_Spec_v2.01_r1.00* Section: 6.3 Assigned UIDs[OPAL_STARTSESSION])
1520  add_token_u64( & err, dev, hsn)
1521  add_token_bytestring( & err, dev, opaluid[OPAL_LOCKINGSP_UID], OPAL_UID_LENGTH)
1523  add_token_u8( & err, dev, 1)
1524  add_token_u8( & err, dev, OPAL_STARTNAME)
1525  add_token_u8( & err, dev, 0)
1526  add_token_bytestring( & err, dev, key, keylen)
1527  add_token_u8( & err, dev, OPAL_ENDNAME)
1528  add_token_u8( & err, dev, OPAL_STARTNAME)
1529  add_token_u8( & err, dev, 3)
1530  add_token_bytestring( & err, dev, lk_ul_user, OPAL_UID_LENGTH)
1531  add_token_u8( & err, dev, OPAL_ENDNAME)
1533  如果err
1534  pr_debug("Error building STARTSESSION command.\n")
1535  返回:err
1538  返回:finalize_and_send(dev, start_opal_session_cont)