Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\sed-opal.c Create Date:2022-07-28 18:13:15
Last Modify:2020-03-17 23:36:33 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sed_ioctl

Proto:int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *arg)

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
unsigned intcmd
void __user *arg
2626  ret = -ENOTTY
2628  If Not Check operation authority Then Return -EACCES
2630  If Not dev Then Return -Operation is not supported
2632  If Not supported Then Return -Operation is not supported
2635  p = memdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result is physically* contiguous, to be freed by kfree().
2636  If IS_ERR(p) Then Return PTR_ERR(p)
2640  Case cmd == IOC_OPAL_SAVE
2641  ret = opal_save(dev, p)
2642  Break
2643  Case cmd == IOC_OPAL_LOCK_UNLOCK
2644  ret = opal_lock_unlock(dev, p)
2645  Break
2646  Case cmd == IOC_OPAL_TAKE_OWNERSHIP
2647  ret = opal_take_ownership(dev, p)
2648  Break
2649  Case cmd == IOC_OPAL_ACTIVATE_LSP
2650  ret = opal_activate_lsp(dev, p)
2651  Break
2652  Case cmd == IOC_OPAL_SET_PW
2653  ret = opal_set_new_pw(dev, p)
2654  Break
2655  Case cmd == IOC_OPAL_ACTIVATE_USR
2656  ret = opal_activate_user(dev, p)
2657  Break
2658  Case cmd == IOC_OPAL_REVERT_TPR
2659  ret = opal_reverttper(dev, p, false)
2660  Break
2661  Case cmd == IOC_OPAL_LR_SETUP
2662  ret = opal_setup_locking_range(dev, p)
2663  Break
2664  Case cmd == IOC_OPAL_ADD_USR_TO_LR
2665  ret = opal_add_user_to_lr(dev, p)
2666  Break
2667  Case cmd == IOC_OPAL_ENABLE_DISABLE_MBR
2668  ret = opal_enable_disable_shadow_mbr(dev, p)
2669  Break
2670  Case cmd == IOC_OPAL_MBR_DONE
2671  ret = opal_set_mbr_done(dev, p)
2672  Break
2673  Case cmd == IOC_OPAL_WRITE_SHADOW_MBR
2674  ret = opal_write_shadow_mbr(dev, p)
2675  Break
2676  Case cmd == IOC_OPAL_ERASE_LR
2677  ret = opal_erase_locking_range(dev, p)
2678  Break
2679  Case cmd == IOC_OPAL_SECURE_ERASE_LR
2680  ret = opal_secure_erase_locking_range(dev, p)
2681  Break
2682  Case cmd == IOC_OPAL_PSID_REVERT_TPR
2683  ret = opal_reverttper(dev, p, true)
2684  Break
2685  Case cmd == IOC_OPAL_GENERIC_TABLE_RW
2686  ret = opal_generic_read_write_table(dev, p)
2687  Break
2688  Default
2689  Break
2692  kfree(p)
2693  Return ret