Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Check if we support the binfmt* if we do, return the node, else NULL* locking is done in load_misc_binary

Proto:static Node *check_file(struct linux_binprm *bprm)

Type:Node

Parameter:

TypeParameterName
struct linux_binprm *bprm
92  p = strrchr - Find the last occurrence of a character in a string*@s: The string to be searched*@c: The character to search for
97  e = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(l, Node, list)
102  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Continue
106  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then
107  If p && Not strcmp( magic or filename extension , p + 1) Then Return e
109  Continue
113  s = buf + offset of magic
114  If mask, NULL for exact match Then
115  When j < size of magic/mask cycle If ( s++ ^ magic or filename extension [j]) & mask, NULL for exact match [j] Then
117  Break
118  Else
119  When j < size of magic/mask cycle If s++ ^ magic or filename extension [j] Then
121  Break
123  If j == size of magic/mask Then Return e
126  Return NULL
Caller
NameDescribe
load_misc_binaryhe loader itself