函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\mman.h Create Date:2022-07-27 07:26:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Combine the mmap "prot" argument into "vm_flags" used internally.

函数原型:static inline unsigned long calc_vm_prot_bits(unsigned long prot, unsigned long pkey)

返回类型:unsigned long

参数:

类型参数名称
unsigned longprot
unsigned longpkey
119  返回:Optimisation macro. It is equivalent to:* (x & bit1) ? bit2 : 0* but this version is faster.* ("bit1" and "bit2" must be single bits)(prot, page can be read , currently active flags )按位或Optimisation macro. It is equivalent to:* (x & bit1) ? bit2 : 0* but this version is faster.* ("bit1" and "bit2" must be single bits)(prot, page can be written , VM_WRITE)按位或Optimisation macro. It is equivalent to:* (x & bit1) ? bit2 : 0* but this version is faster.* ("bit1" and "bit2" must be single bits)(prot, page can be executed , VM_EXEC)按位或Allow architectures to handle additional protection bits(prot, pkey)
调用者
名称描述
determine_vm_flagswe've determined that we can make the mapping, now translate what we* now know into VMA flags
do_mmapThe caller must hold down_write(¤t->mm->mmap_sem).
do_mprotect_pkeypkey==-1 when doing a legacy mprotect()