Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ima_init_arch_policy

Proto:static int __init ima_init_arch_policy(void)

Type:int

Parameter:Nothing

607  arch_entries = 0
608  i = 0
610  arch_rules = arch_get_ima_policy()
611  If Not arch_rules Then Return arch_entries
615  When * rules != NULL cycle arch_entries++
618  An array of architecture specific rules = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
620  If Not An array of architecture specific rules Then Return 0
624  When * rules != NULL cycle
628  result = Copy a NUL terminated string into a sized buffer
630  Initialization list head
631  result = ima_parse_rule(rule, & An array of architecture specific rules [i])
632  If result Then
633  pr_warn("Skipping unknown architecture policy rule: %s\n", rule)
637  Continue
639  i++
641  Return i
Caller
NameDescribe
ima_init_policyma_init_policy - initialize the default measure rules.* ima_rules points to either the ima_default_rules or the* the new ima_policy_rules.