Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kauditd_thread - Worker thread to send audit records to userspace*@dummy: unused

Proto:static int kauditd_thread(void *dummy)

Type:int

Parameter:

TypeParameterName
void *dummy
808  portid = 0
809  struct net * net = NULL
810  struct sock * sk = NULL
815  set_freezable - make %current freezable* Mark %current freezable and enter refrigerator if necessary.
816  When Not kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop(). cycle
818  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
819  ac = fetch RCU-protected pointer for dereferencing(struct auditd_connection - kernel/auditd connection state*@pid: auditd PID*@portid: netlink portid*@net: the associated network namespace*@rcu: RCU head* Description:* This struct is RCU protected; you must either hold the RCU lock for reading)
820  If Not ac Then
822  Go to main_queue
824  net = get_net(net)
825  sk = audit_get_sk - Return the audit socket for the given network namespace*@net: the destination network namespace* Description:* Returns the sock pointer if valid, NULL otherwise. The caller must ensure
826  portid = portid
827  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
830  rc = kauditd_send_queue - Helper for kauditd_thread to flush skb queues*@sk: the sending sock*@portid: the netlink destination*@queue: the skb queue to process*@retry_limit: limit on number of netlink unicast failures*@skb_hook: per-skb hook for additional
833  If rc < 0 Then
834  sk = NULL
836  Go to main_queue
840  rc = kauditd_send_queue - Helper for kauditd_thread to flush skb queues*@sk: the sending sock*@portid: the netlink destination*@queue: the skb queue to process*@retry_limit: limit on number of netlink unicast failures*@skb_hook: per-skb hook for additional
843  If rc < 0 Then
844  sk = NULL
846  Go to main_queue
849  main_queue :
854  rc = kauditd_send_queue - Helper for kauditd_thread to flush skb queues*@sk: the sending sock*@portid: the netlink destination*@queue: the skb queue to process*@retry_limit: limit on number of netlink unicast failures*@skb_hook: per-skb hook for additional
858  If ac && rc < 0 Then auditd_reset - Disconnect the auditd connection*@ac: auditd connection state* Description:* Break the auditd/kauditd connection and move all the queued records into the* hold queue in case auditd reconnects
860  sk = NULL
863  If net Then
864  put_net(net)
865  net = NULL
869  wake_up( & waitqueue for callers who are blocked on the audit backlog )
875  wait_event_freezable - sleep (or freeze) until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE -- so as not to contribute(kauditd_wait, (skb_queue_len - get queue length*@list_: list to measure* Return the length of an &sk_buff queue. ? 1 : 0))
879  Return 0