Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:audit_buffer_alloc

Proto:static struct audit_buffer *audit_buffer_alloc(struct audit_context *ctx, gfp_t gfp_mask, int type)

Type:struct audit_buffer

Parameter:

TypeParameterName
struct audit_context *ctx
gfp_tgfp_mask
inttype
1678  ab = kmem_cache_alloc(audit_buffer_cache, gfp_mask)
1679  If Not ab Then Return NULL
1682  rmatted skb ready to send = lmsg_new - Allocate a new netlink message*@payload: size of the message payload*@flags: the type of memory to allocate.* Use NLMSG_DEFAULT_SIZE if the size of the payload isn't known* and a good default is needed.
1683  If Not rmatted skb ready to send Then Go to err
1685  If Not lmsg_put - Add a new netlink message to an skb*@skb: socket buffer to store message in*@portid: netlink PORTID of requesting application*@seq: sequence number of message*@type: message type*@payload: length of message payload*@flags: message flags* Then Go to err
1688  NULL or associated context = ctx
1689  gfp_mask = gfp_mask
1691  Return ab
1693  err :
1694  audit_buffer_free(ab)
1695  Return NULL
Caller
NameDescribe
audit_log_startaudit_log_start - obtain an audit buffer*@ctx: audit_context (may be NULL)*@gfp_mask: type of allocation*@type: audit message type* Returns audit_buffer pointer on success or NULL on error