Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:COMPAT_SYSCALL_DEFINE1

Proto:COMPAT_SYSCALL_DEFINE1(sysinfo, struct compat_sysinfo __user *, info)

Type:

Parameter:Nothing

2611  do_sysinfo - fill in sysinfo struct*@info: pointer to buffer to fill
2616  If upper_32_bits - return bits 32-63 of a number*@n: the number we're accessing* A basic shift-right of a 64- or 32-bit quantity. Use this to suppress* the "right shift count >= width of type" warning when that quantity is* 32-bits.( Total usable main memory size ) || upper_32_bits - return bits 32-63 of a number*@n: the number we're accessing* A basic shift-right of a 64- or 32-bit quantity. Use this to suppress* the "right shift count >= width of type" warning when that quantity is* 32-bits.( Total swap space size ) Then
2617  bitcount = 0
2621  bitcount++
2624  Total usable main memory size >>= bitcount
2625  Available memory size >>= bitcount
2626  Amount of shared memory >>= bitcount
2627  Memory used by buffers >>= bitcount
2628  Total swap space size >>= bitcount
2629  swap space still available >>= bitcount
2630  Total high memory size >>= bitcount
2631  Available high memory size >>= bitcount
2634  If Not access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(info, sizeof(structcompat_sysinfo)) || Write a simple value into user space, with less checking( Seconds since boot , & uptime) || Write a simple value into user space, with less checking( 1, 5, and 15 minute load averages [0], & loads[0]) || Write a simple value into user space, with less checking( 1, 5, and 15 minute load averages [1], & loads[1]) || Write a simple value into user space, with less checking( 1, 5, and 15 minute load averages [2], & loads[2]) || Write a simple value into user space, with less checking( Total usable main memory size , & totalram) || Write a simple value into user space, with less checking( Available memory size , & freeram) || Write a simple value into user space, with less checking( Amount of shared memory , & sharedram) || Write a simple value into user space, with less checking( Memory used by buffers , & bufferram) || Write a simple value into user space, with less checking( Total swap space size , & totalswap) || Write a simple value into user space, with less checking( swap space still available , & freeswap) || Write a simple value into user space, with less checking( Number of current processes , & procs) || Write a simple value into user space, with less checking( Total high memory size , & totalhigh) || Write a simple value into user space, with less checking( Available high memory size , & freehigh) || Write a simple value into user space, with less checking( Memory unit size in bytes , & mem_unit) Then Return -EFAULT
2651  Return 0