函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:COMPAT_SYSCALL_DEFINE3

函数原型:COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, compat_ulong_t, arg32)

返回类型:

参数:

145  arg等于arg32
146  f等于fdget(fd)
147  error等于负EBADF
148  如果非file则转到:out
152  error等于security_file_ioctl(file, cmd, arg)
153  如果error则转到:out_fput
158  :cmd恒等于FIOCLEX
159  :cmd恒等于hese numbers need to be adjusted.
160  :cmd恒等于Freeze
161  :cmd恒等于Thaw
162  :cmd恒等于FICLONE
163  转到:do_ioctl
165  :cmd恒等于FIONBIO
166  :cmd恒等于FIOASYNC
167  :cmd恒等于Get exact space used by quota
168  :cmd恒等于FS_IOC_FIEMAP
169  :cmd恒等于get the block size used for bmap
170  :cmd恒等于FICLONERANGE
171  :cmd恒等于FIDEDUPERANGE
172  转到:found_handler
183  :cmd恒等于map access
184  转到:found_handler
186  :cmd恒等于FIONREAD
187  转到:found_handler
190  :cmd恒等于FS_IOC_RESVSP_32
191  :cmd恒等于FS_IOC_RESVSP64_32
192  error等于just account for different alignment
193  转到:out_fput
194  :cmd恒等于FS_IOC_UNRESVSP_32
195  :cmd恒等于FS_IOC_UNRESVSP64_32
196  error等于just account for different alignment
198  转到:out_fput
199  :cmd恒等于FS_IOC_ZERO_RANGE_32
200  error等于just account for different alignment
202  转到:out_fput
212  默认
213  如果compat_ioctl
214  error等于compat_ioctl(file, cmd, arg)
215  如果error不等于负No ioctl command 则转到:out_fput
219  如果非unlocked_ioctl则转到:do_ioctl
221  退出
224  如果compat_ioctl_check_table(simple reversible transform to make our table more evenly* distributed after sorting.(cmd))则转到:found_handler
227  error等于Convert common ioctl arguments based on their command number* Please do not add any code in here. Instead, implement* a compat_ioctl operation in the place that handle褧 the* ioctl for the native case.
228  如果error恒等于负No ioctl command error等于负ENOTTY
231  转到:out_fput
233  found_handler :
234  arg等于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.
235  do_ioctl :
236  error等于When you add any new common ioctls to the switches above and below* please update compat_sys_ioctl() too.* do_vfs_ioctl() is not for drivers and not intended to be EXPORT_SYMBOL()'d.* It's just a simple helper for sys_ioctl and compat_sys_ioctl.
237  out_fput :
238  fdput(f)
239  out :
240  返回:error