Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\lsm.c Create Date:2022-07-28 19:53:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:common_mmap

Proto:static int common_mmap(const char *op, struct file *file, unsigned long prot, unsigned long flags, bool in_atomic)

Type:int

Parameter:

TypeParameterName
const char *op
struct file *file
unsigned longprot
unsigned longflags
boolin_atomic
496  mask = 0
498  If Not file || Not file_ctx(file) Then Return 0
501  If prot & page can be read Then mask |= MAY_READ
507  If prot & page can be written && Not (flags & Changes are private ) Then mask |= MAY_WRITE
509  If prot & page can be executed Then mask |= AA_EXEC_MMAP
512  Return common_file_perm(op, file, mask, in_atomic)
Caller
NameDescribe
apparmor_mmap_file
apparmor_file_mprotect