Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:apparmor_init

Proto:static int __init apparmor_init(void)

Type:int

Parameter:Nothing

1834  aa_secids_init()
1836  error = aa_setup_dfa_engine()
1837  If error Then
1838  AA_ERROR("Unable to setup dfa engine\n")
1839  Go to alloc_out
1842  error = aa_alloc_root_ns()
1843  If error Then
1844  AA_ERROR("Unable to allocate default profile namespace\n")
1845  Go to alloc_out
1848  error = apparmor_init_sysctl()
1849  If error Then
1850  AA_ERROR("Unable to register sysctls\n")
1851  Go to alloc_out
1855  error = alloc_buffers()
1856  If error Then
1857  AA_ERROR("Unable to allocate work buffers\n")
1858  Go to alloc_out
1861  error = set_init_ctx - set a task context and profile on the first task.* TODO: allow setting an alternate profile than unconfined
1862  If error Then
1863  AA_ERROR("Failed to set context on init task\n")
1864  aa_free_root_ns - free the root profile namespace
1865  Go to buffers_out
1867  security_add_hooks - Add a modules hooks to the hook lists.*@hooks: the hooks to add*@count: the number of hooks to add*@lsm: the name of the security module* Each LSM has to register its hooks with the infrastructure.
1871  Flag indicating whether initialization completed = 1
1872  If AppArmor global enforcement switch - complain, enforce, kill == allow and log access violations Then aa_info_message - log a none profile related status message*@str: message to log
1874  Else if AppArmor global enforcement switch - complain, enforce, kill == kill task on access violation Then aa_info_message - log a none profile related status message*@str: message to log
1876  Else aa_info_message - log a none profile related status message*@str: message to log
1879  Return error
1881  buffers_out :
1882  destroy_buffers()
1883  alloc_out :
1884  aa_destroy_aafs - cleanup and free aafs* releases dentries allocated by aa_create_aafs
1885  aa_teardown_dfa_engine()
1887  Boot time disable flag = false
1888  Return error