Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\compat_ioctl.c Create Date:2022-07-28 18:01:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:compat_cdrom_generic_command

Proto:static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
fmode_tmode
unsigned intcmd
unsigned longarg
148  __user * cgc
149  __user * cgc32
154  cgc = Allocate user-space memory for the duration of a single system call,* in order to marshall parameters inside a compat thunk.
155  cgc32 = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
157  If copy_in_user( & cmd, & cmd, size of cmd ) || Get a simple variable from user space(data, & buffer) || Write a simple value into user space(A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., & buffer) || copy_in_user( & buflen, & buflen, (sizeof(unsignedint) + sizeof(int))) || Get a simple variable from user space(data, & sense) || Write a simple value into user space(A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., & sense) || Get a simple variable from user space(dir, & data_direction) || Write a simple value into user space(dir, & data_direction) || Get a simple variable from user space(itmp, & quiet) || Write a simple value into user space(itmp, & quiet) || Get a simple variable from user space(itmp, & timeout) || Write a simple value into user space(itmp, & timeout) || Get a simple variable from user space(data, & reserved[0]) || Write a simple value into user space(A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., & unused, actually [0]) Then Return -EFAULT
174  Return __blkdev_driver_ioctl(bdev, mode, cmd, (unsignedlong)cgc)
Caller
NameDescribe
compat_blkdev_driver_ioctl