函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\match.c Create Date:2022-07-27 21:29:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:leftmatch_fb

函数原型:static unsigned int leftmatch_fb(struct aa_dfa *dfa, unsigned int start, const char *str, struct match_workbuf *wb, unsigned int *count)

返回类型:unsigned int

参数:

类型参数名称
struct aa_dfa *dfa
unsigned intstart
const char *str
struct match_workbuf *wb
unsigned int *count
651  def等于DEFAULT_TABLE(dfa)
652  base等于BASE_TABLE(dfa)
653  next等于NEXT_TABLE(dfa)
654  check等于CHECK_TABLE(dfa)
655  state等于start
657  AA_BUG(!dfa)
658  AA_BUG(!str)
659  AA_BUG(!wb)
660  AA_BUG(!count)
662  count等于0
663  如果state恒等于0则返回:0
667  如果tables[YYTD_ID_EC]则
669  equiv等于EQUIV_TABLE(dfa)
671 str循环
674  history[pos]等于state
675  pos等于base_idx(base[state])加equiv[(u8) * str++]
676  如果check[pos]恒等于statestate等于next[pos]
678  否则state等于def[state]
685  inc_wb_pos(wb)
686  count自加
688  否则
690 str循环
693  history[pos]等于state
694  pos = base_idx(base[state]) + (u8) * str++
695  如果check[pos]恒等于statestate等于next[pos]
697  否则state等于def[state]
704  inc_wb_pos(wb)
705  count自加
709  out :
710  如果非statecount等于0
712  返回:state
调用者
名称描述
aa_dfa_leftmatchaa_dfa_leftmatch - traverse @dfa to find state @str stops at*@dfa: the dfa to match @str against (NOT NULL)*@start: the state of the dfa to start matching in*@str: the null terminated string of bytes to match against the dfa (NOT NULL)