Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:update_lsm_rule

Proto:static int update_lsm_rule(struct audit_krule *r)

Type:int

Parameter:

TypeParameterName
struct audit_krule *r
1395  entry = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(r, structaudit_entry, rule)
1397  err = 0
1399  If Not security_audit_rule_known(r) Then Return 0
1402  nentry = Duplicate an audit rule. This will be a deep copy with the exception* of the watch - that pointer is carried over. The LSM specific fields* will be updated in the copy. The point is to be able to replace the old
1403  If exe Then
1405  If IS_ERR(nentry) Then
1408  err = PTR_ERR(nentry)
1409  audit_panic("error updating LSM filters")
1410  If associated watch Then deletes entry from list
1412  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
1413  deletes entry from list
1414  Else
1415  If associated watch || associated watched tree Then list_replace_init( & entry in audit_{watch,tree}.rules list , & entry in audit_{watch,tree}.rules list )
1417  list_replace_rcu - replace old entry by new one*@old : the element to be replaced*@new : the new element to insert* The @old entry will be replaced with the @new entry atomically.* Note: @old should not be empty.
1418  list_replace - replace old entry by new one*@old : the element to be replaced*@new : the new element to insert* If @old was empty, it will be overwritten.
1420  all_rcu() - Queue an RCU callback for invocation after a grace period
1422  Return err
Caller
NameDescribe
audit_update_lsm_rulesThis function will re-initialize the lsm_rule field of all applicable rules