函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\compat_ioctl.c Create Date:2022-07-27 19:36:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:compat_cdrom_generic_command

函数原型:static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
fmode_tmode
unsigned intcmd
unsigned longarg
148  __usercgc
149  __usercgc32
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  如果copy_in_user( & cmd, & cmd, cmd的长度)或Careful: we have to cast the result to the type of the pointer* for sign reasons(data, & buffer)或put_user - 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)))或Careful: we have to cast the result to the type of the pointer* for sign reasons(data, & sense)或put_user - 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)或Careful: we have to cast the result to the type of the pointer* for sign reasons(dir, & data_direction)或put_user - Write a simple value into user space(dir, & data_direction)或Careful: we have to cast the result to the type of the pointer* for sign reasons(itmp, & quiet)或put_user - Write a simple value into user space(itmp, & quiet)或Careful: we have to cast the result to the type of the pointer* for sign reasons(itmp, & timeout)或put_user - Write a simple value into user space(itmp, & timeout)或Careful: we have to cast the result to the type of the pointer* for sign reasons(data, & reserved[0])或put_user - 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])则返回:负EFAULT
174  返回:__blkdev_driver_ioctl(bdev, mode, cmd, (unsignedlong)cgc)
调用者
名称描述
compat_blkdev_driver_ioctl