Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_main.c Create Date:2022-07-28 19:58:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Prevent mmap'ing a file execute that is already mmap'ed write

Proto:static int mmap_violation_check(enum ima_hooks func, struct file *file, char **pathbuf, const char **pathname, char *filename)

Type:int

Parameter:

TypeParameterName
enum ima_hooksfunc
struct file *file
char **pathbuf
const char **pathname
char *filename
81  rc = 0
83  If func == MMAP_CHECK && Might pages of this file have been modified in userspace?* Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff* marks vma as VM_SHARED if it is shared, and the file was opened for* writing i Then
84  rc = -ETXTBSY
85  inode = file_inode(file)
87  If Not pathbuf Then pathname = ima_d_path( & f_path, pathbuf, filename)
90  integrity_audit_msg(Data integrity verification , inode, * pathname, "mmap_file", "mmapped_writers", rc, 0)
93  Return rc
Caller
NameDescribe
process_measurement