Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:verify_dfa - verify that transitions and states in the tables are in bounds

Proto:static int verify_dfa(struct aa_dfa *dfa)

Type:int

Parameter:

TypeParameterName
struct aa_dfa *dfa
197  error = -EPROTO
199  state_count = td_lolen
200  trans_count = td_lolen
201  When i < state_count cycle
202  If Not (BASE_TABLE(dfa)[i] & MATCH_FLAG_DIFF_ENCODE) && DEFAULT_TABLE(dfa)[i] >= state_count Then Go to out
205  If base_idx(BASE_TABLE(dfa)[i]) + 255 >= trans_count Then
206  pr_err("AppArmor DFA next/check upper bounds error\n")
207  Go to out
211  When i < trans_count cycle
212  If NEXT_TABLE(dfa)[i] >= state_count Then Go to out
214  If CHECK_TABLE(dfa)[i] >= state_count Then Go to out
219  When i < state_count cycle
226  k = DEFAULT_TABLE(dfa)[j]
227  If j == k Then Go to out
229  If k < j Then Break
234  error = 0
236  out :
237  Return error
Caller
NameDescribe
aa_dfa_unpackaa_dfa_unpack - unpack the binary tables of a serialized dfa*@blob: aligned serialized stream of data to unpack (NOT NULL)*@size: size of data to unpack*@flags: flags controlling what type of accept tables are acceptable