rkmem.c File Reference

#include <rsbac/types.h>
#include <rsbac/rkmem.h>
#include <rsbac/debug.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>

Go to the source code of this file.

Typedefs

typedef rsbac_cache_sizes rsbac_cache_sizes_t

Functions

void __init rsbac_kmem_cache_sizes_init (void)
void * rsbac_kmalloc (size_t size)
void * rsbac_vkmalloc (size_t size, rsbac_boolean_t *vmalloc_used_p)
void rsbac_kfree (const void *objp)
void rsbac_vkfree (void *objp, rsbac_boolean_t vmalloc_used)

Variables

static rsbac_cache_sizes_t rsbac_cache_sizes []


Typedef Documentation

typedef struct rsbac_cache_sizes rsbac_cache_sizes_t
 


Function Documentation

void rsbac_kfree const void *  objp  ) 
 

rsbac_kfree - free previously allocated memory : pointer returned by kmalloc.

Don't free memory not originally allocated by rsbac_kmalloc() or you will run into trouble.

We simply call general kfree, which does everything

Definition at line 168 of file rkmem.c.

Referenced by aci_detach_fd_lists(), acl_detach_fd_lists(), acl_register_fd_lists(), auth_detach_fd_lists(), auth_register_fd_lists(), auto_read_attr(), auto_read_write_attr(), auto_write_attr(), check_comp_rc(), check_comp_rc_scd(), clear_device_item(), clear_lol_reg(), clear_reg(), create_lol_reg(), create_reg(), do_remove_item(), do_remove_lol_item(), do_remove_lol_subitem(), fill_buffer(), fill_lol_buffer(), get_attribute_value_name(), get_target_name(), mac_detach_fd_lists(), mac_register_fd_lists(), read_list(), read_lol_list(), register_fd_lists(), registration_error(), remove_all_items(), remove_all_lol_items(), remove_all_lol_subitems(), remove_item(), remove_sc_item(), rsbac_acl_check_forward(), rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_get_mask(), rsbac_acl_sys_get_rights(), rsbac_acl_sys_get_tlist(), rsbac_acl_sys_group(), rsbac_acl_sys_remove_acl(), rsbac_acl_sys_remove_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_remove_user(), rsbac_acl_sys_set_acl_entry(), rsbac_acl_sys_set_mask(), rsbac_adf_request_int(), rsbac_adf_request_rc(), rsbac_adf_set_attr(), rsbac_check(), rsbac_do_init(), rsbac_get_full_path(), rsbac_init_auth(), rsbac_init_debug(), rsbac_init_mac(), rsbac_init_rc(), rsbac_jail_sys_jail(), rsbac_list_lol_register(), rsbac_list_register(), rsbac_list_write_buffers(), rsbac_list_write_lol_buffers(), rsbac_mac_set_curr_level(), rsbac_mount(), rsbac_mount_acl(), rsbac_rc_check_type_comp(), rsbac_rc_get_item(), rsbac_rc_sys_copy_type(), rsbac_read_open(), rsbac_um_check_account(), rsbac_um_check_pass(), rsbac_um_get_group_item(), rsbac_um_get_user_item(), rsbac_um_hash(), rsbac_um_mod_group(), rsbac_um_mod_user(), rsbac_um_set_group_pass(), rsbac_um_set_pass(), rsbac_write_open(), sys_rsbac_adf_log_switch(), sys_rsbac_get_adf_log(), sys_rsbac_switch(), sys_rsbac_um_add_group(), sys_rsbac_um_add_user(), sys_rsbac_um_auth_name(), sys_rsbac_um_auth_uid(), sys_rsbac_um_get_group_item(), sys_rsbac_um_get_user_item(), sys_rsbac_um_mod_group(), sys_rsbac_um_mod_user(), sys_rsbac_um_set_group_pass(), sys_rsbac_um_set_pass(), and sys_rsbac_um_set_pass_name().

void* rsbac_kmalloc size_t  size  ) 
 

rsbac_kmalloc - allocate memory : how many bytes of memory are required.

rsbac_kmalloc is the normal method of allocating memory for RSBAC in the kernel. It will always be of type GFP_KERNEL.

rsbac_kmalloc'd memory is freed by rsbac_kfree

Definition at line 95 of file rkmem.c.

References rsbac_cache_sizes::cs_cachep, rsbac_cache_sizes::cs_size, NULL, and RSBAC_MAX_KMALLOC.

Referenced by aci_detach_fd_lists(), acl_detach_fd_lists(), acl_register_fd_lists(), add_item(), add_lol_item(), add_lol_subitem(), add_sc_item(), auth_detach_fd_lists(), auth_register_fd_lists(), auto_read_attr(), auto_read_write_attr(), auto_write_attr(), check_comp_rc(), check_comp_rc_scd(), create_device_item(), create_lol_reg(), create_reg(), fill_buffer(), fill_lol_buffer(), get_attribute_value_name(), get_target_name(), mac_detach_fd_lists(), mac_register_fd_lists(), read_list(), read_lol_list(), register_fd_lists(), registration_error(), rsbac_acl_check_forward(), rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_get_mask(), rsbac_acl_sys_get_rights(), rsbac_acl_sys_get_tlist(), rsbac_acl_sys_group(), rsbac_acl_sys_remove_acl(), rsbac_acl_sys_remove_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_remove_user(), rsbac_acl_sys_set_acl_entry(), rsbac_acl_sys_set_mask(), rsbac_adf_request_int(), rsbac_adf_request_rc(), rsbac_adf_set_attr(), rsbac_check(), rsbac_do_init(), rsbac_get_full_path(), rsbac_init_auth(), rsbac_init_debug(), rsbac_init_mac(), rsbac_init_rc(), rsbac_init_um(), rsbac_jail_sys_jail(), rsbac_list_lol_register(), rsbac_list_register(), rsbac_list_write_buffers(), rsbac_list_write_lol_buffers(), rsbac_mac_set_curr_level(), rsbac_mount(), rsbac_mount_acl(), rsbac_rc_check_type_comp(), rsbac_rc_get_item(), rsbac_rc_sys_copy_type(), rsbac_read_open(), rsbac_um_check_account(), rsbac_um_check_pass(), rsbac_um_get_group_item(), rsbac_um_get_user_item(), rsbac_um_hash(), rsbac_um_mod_group(), rsbac_um_mod_user(), rsbac_um_set_group_pass(), rsbac_um_set_pass(), rsbac_write_open(), sys_rsbac_adf_log_switch(), sys_rsbac_get_adf_log(), sys_rsbac_switch(), sys_rsbac_um_add_group(), sys_rsbac_um_add_user(), sys_rsbac_um_auth_name(), sys_rsbac_um_auth_uid(), sys_rsbac_um_get_group_item(), sys_rsbac_um_get_user_item(), sys_rsbac_um_mod_group(), sys_rsbac_um_mod_user(), sys_rsbac_um_set_group_pass(), sys_rsbac_um_set_pass(), sys_rsbac_um_set_pass_name(), and xp_malloc().

void __init rsbac_kmem_cache_sizes_init void   ) 
 

Definition at line 66 of file rkmem.c.

References rsbac_cache_sizes::cs_cachep, rsbac_cache_sizes::cs_size, rsbac_cache_sizes::name, and NULL.

Referenced by rsbac_do_init().

void rsbac_vkfree void *  objp,
rsbac_boolean_t  vmalloc_used
 

Definition at line 176 of file rkmem.c.

Referenced by rsbac_list_write_buffers(), and rsbac_list_write_lol_buffers().

void* rsbac_vkmalloc size_t  size,
rsbac_boolean_t vmalloc_used_p
 

Definition at line 125 of file rkmem.c.

References rsbac_cache_sizes::cs_cachep, rsbac_cache_sizes::cs_size, FALSE, NULL, and TRUE.

Referenced by fill_buffer(), and fill_lol_buffer().


Variable Documentation

rsbac_cache_sizes_t rsbac_cache_sizes[] [static]
 

Definition at line 26 of file rkmem.c.


Generated on Fri Jun 17 09:45:30 2005 for RSBAC by  doxygen 1.4.2