Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ycle the list of binary formats handler, until one recognizes the image

Proto:int search_binary_handler(struct linux_binprm *bprm)

Type:int

Parameter:

TypeParameterName
struct linux_binprm *bprm
1637  need_retry = IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_MODULES)
1642  If recursion_depth > 5 Then Return -ELOOP
1645  retval = security_bprm_check(bprm)
1646  If retval Then Return retval
1649  retval = -ENOENT
1650  retry :
1651  read_lock( & binfmt_lock)
1653  If Not try_module_get(module) Then Continue
1655  read_unlock( & binfmt_lock)
1657  recursion_depth++
1658  retval = load_binary(bprm)
1659  recursion_depth--
1661  read_lock( & binfmt_lock)
1662  put_binfmt(fmt)
1663  If retval < 0 && Not mm Then
1665  read_unlock( & binfmt_lock)
1666  When things go south during signal handling, we* will force a SIGSEGV. And if the signal that caused* the problem was already a SIGSEGV, we'll want to* make sure we don't even try to deliver the signal..
1667  Return retval
1669  If retval != -ENOEXEC || Not file Then
1670  read_unlock( & binfmt_lock)
1671  Return retval
1674  read_unlock( & binfmt_lock)
1676  If need_retry Then
1677  If printable(buf[0]) && printable(buf[1]) && printable(buf[2]) && printable(buf[3]) Then Return retval
1680  If try to load a kernel module("binfmt-%04x", * (ushort * )(buf + 2)) < 0 Then Return retval
1682  need_retry = false
1683  Go to retry
1686  Return retval
Caller
NameDescribe
exec_binprm
load_em86
load_misc_binaryhe loader itself
load_script