Lines Matching full:security
3 * Security plug functions
59 * all security modules to use the same descriptions for auditing
285 /* Process "security=", if given. */ in ordered_lsm_parse()
290 * To match the original "security=" behavior, this in ordered_lsm_parse()
300 init_debug("security=%s disabled: %s (only one legacy major LSM)\n", in ordered_lsm_parse()
325 /* Process "security=", if given. */ in ordered_lsm_parse()
331 append_ordered_lsm(lsm, "security="); in ordered_lsm_parse()
386 pr_warn("security=%s is ignored because it is superseded by lsm=%s\n", in ordered_lsm_init()
448 * security_init - initializes the security framework
456 init_debug("legacy security=%s\n", chosen_major_lsm ? : " *unspecified*"); in security_init()
483 __setup("security=", choose_major_lsm);
541 * @lsmid: the identification information for the security module
551 * A security module may call security_add_hooks() more in security_add_hooks()
610 cred->security = NULL; in lsm_cred_alloc()
614 cred->security = kzalloc(blob_sizes.lbs_cred, gfp); in lsm_cred_alloc()
615 if (cred->security == NULL) in lsm_cred_alloc()
687 task->security = NULL; in lsm_task_alloc()
691 task->security = kzalloc(blob_sizes.lbs_task, GFP_KERNEL); in lsm_task_alloc()
692 if (task->security == NULL) in lsm_task_alloc()
708 kip->security = NULL; in lsm_ipc_alloc()
712 kip->security = kzalloc(blob_sizes.lbs_ipc, GFP_KERNEL); in lsm_ipc_alloc()
713 if (kip->security == NULL) in lsm_ipc_alloc()
729 mp->security = NULL; in lsm_msg_msg_alloc()
733 mp->security = kzalloc(blob_sizes.lbs_msg_msg, GFP_KERNEL); in lsm_msg_msg_alloc()
734 if (mp->security == NULL) in lsm_msg_msg_alloc()
873 /* Security operations */
940 * process. Security modules may also want to perform a process tracing check
943 * process is being traced and its security attributes would be changed by the
1022 * @opts contains options for the capable check <include/linux/security.h>.
1133 * If the setup in prepare_exec_creds did not setup @bprm->cred->security
1135 * @bprm->cred->security to be what commit_creds needs to install for the new
1137 * transitions between security domains). The hook must set @bprm->secureexec
1159 * transitions between security domains). The hook must set @bprm->secureexec
1177 * It allows a check against the @bprm->cred->security value which was set in
1198 * Prepare to install the new security attributes of a process being
1215 * Tidy up after the installation of the new security attributes of a process
1228 * security_fs_context_submount() - Initialise fc->security
1232 * Fill out the ->security field for a new fs_context.
1246 * Allocate and attach a security structure to sc->security. This pointer is
1291 * Allocate and attach a security structure to the sb->s_security field. The
1387 * Extracts security system specific mount options and verifies no changes are
1499 * Set the security relevant mount options used for a superblock.
1521 * Copy all security options from a given superblock to another.
1571 * Allocate and attach a security structure to @inode->i_security. The
1601 * Deallocate the inode security structure and set @inode->i_security to NULL.
1626 * @xattr_name: name of the security/LSM xattr
1645 * Only one module will provide a security context. in security_dentry_init_security()
1690 * Obtain the security attribute name suffix and value to set on a newly
1691 * created inode and set up the incore security field for the new inode. This
1697 * lsm_get_xattr_slot() to retrieve the slots reserved by the security module
1702 * the security module does not use security attributes or does not wish to put
1703 * a security attribute on this particular inode, then it should return
1707 * security attributes that are required, negative values otherwise.
1768 * Set up the incore security field for the new anonymous inode and return
1769 * whether the inode creation is permitted by the security module or not.
1771 * Return: Returns 0 on success, -EACCES if the security module denies the
2184 * existing Linux permission function, so a security module can use it to
2363 * Update inode security field after successful setxattr operation.
2461 * The @dentry's setuid bit is being removed. Remove similar security labels.
2474 * security_inode_getsecurity() - Get the xattr security label of an inode
2478 * @buffer: security label buffer
2481 * Retrieve a copy of the extended attribute representation of the security
2483 * remainder of the attribute name after the security prefix has been removed.
2511 * security_inode_setsecurity() - Set the xattr security label of an inode
2514 * @value: security label
2515 * @size: length of security label
2518 * Set the security label associated with @name for @inode from the extended
2521 * remainder of the attribute name after the security. prefix has been removed.
2546 * security_inode_listsecurity() - List the xattr security label names
2551 * Copy the extended attribute names for the security labels associated with
2586 * filesystem. Security module can prepare a set of new creds and modify as
2607 * if the security module does not know about attribute, or a negative
2636 * Initialize the security context of a newly created kernfs node based on its
2653 * by various operations that read or write files. A security module can use
2661 * memory-mapped files. Security modules must handle this separately if they
2675 * Allocate and attach a security structure to the file->f_security field. The
2676 * security field is initialized to NULL when the structure is first created.
2696 * Deallocate and free any security structures stored in file->f_security.
2720 * by the security module.
2863 * security module.
2876 * Save owner security information (typically from current->security) in
2895 * so the file structure (and associated security information) can always be
2910 * This hook allows security modules to control the ability of a process to
2987 kfree(task->security); in security_task_free()
2988 task->security = NULL; in security_task_free()
3018 * Deallocate and clear the cred->security field in a set of credentials.
3024 * may result in a call here with ->security being NULL. in security_cred_free()
3026 if (unlikely(cred->security == NULL)) in security_cred_free()
3031 kfree(cred->security); in security_cred_free()
3032 cred->security = NULL; in security_cred_free()
3075 * Retrieve the security identifier of the cred structure @c. In case of
3333 * Retrieve the subjective security identifier of the current task and return
3348 * Retrieve the objective security identifier of the task_struct in @p and
3528 * security_task_to_inode() - Set the security attributes of a task's inode
3532 * Set the security attributes for an inode based on an associated task's
3533 * security attributes, e.g. for /proc/pid inodes.
3585 * Allocate and attach a security structure to the msg->security field. The
3586 * security field is initialized to NULL when the structure is first created.
3606 * Deallocate the security structure for this message.
3611 kfree(msg->security); in security_msg_msg_free()
3612 msg->security = NULL; in security_msg_msg_free()
3619 * Allocate and attach a security structure to @msg. The security field is
3640 * Deallocate security field @perm->security for the message queue.
3645 kfree(msq->security); in security_msg_queue_free()
3646 msq->security = NULL; in security_msg_queue_free()
3722 * Allocate and attach a security structure to the @shp security field. The
3723 * security field is initialized to NULL when the structure is first created.
3743 * Deallocate the security structure @perm->security for the memory segment.
3748 kfree(shp->security); in security_shm_free()
3749 shp->security = NULL; in security_shm_free()
3806 * Allocate and attach a security structure to the @sma security field. The
3807 * security field is initialized to NULL when the structure is first created.
3827 * Deallocate security structure @sma->security for the semaphore.
3832 kfree(sma->security); in security_sem_free()
3833 sma->security = NULL; in security_sem_free()
3890 * Fill in @inode security information for a @dentry if allowed.
3901 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
3996 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
4103 * Save security information for a netlink message so that permission checking
4104 * can be performed when the message is processed. The security information
4136 * Convert secid to security context. If @secdata is NULL the length of the
4168 * Convert security context to secid.
4184 * Release the security context.
4193 * security_inode_invalidate_secctx() - Invalidate an inode's security label
4196 * Notify the security module that it must revalidate the security context of
4206 * security_inode_notifysecctx() - Notify the LSM of an inode's security label
4211 * Notify the security module of what the security context of an inode should
4212 * be. Initializes the incore security context managed by the security module
4214 * the security context in its incore inode to the value provided by the server
4227 * security_inode_setsecctx() - Change the security label of an inode
4232 * Change the security context of an inode. Updates the incore security
4233 * context managed by the security module and invokes the fs code as needed
4235 * context. Example usage: NFS server invokes this hook to change the security
4249 * security_inode_getsecctx() - Get the security label of an inode
4254 * On success, returns 0 and fills out @ctx and @ctxlen with the security
4265 * Only one module will provide a security context. in security_inode_getsecctx()
4391 * This hook allows a module to update or allocate a per-socket security
4392 * structure. Note that the security field was not added directly to the socket
4393 * structure, but rather, the socket security information is stored in the
4395 * and attach security information to SOCK_INODE(sock)->i_security. This hook
4619 * This hook allows the security module to provide peer socket security state
4634 * Only one module will provide a security context. in security_socket_getpeersec_stream()
4652 * This hook allows the security module to provide peer socket security state
4655 * option via getsockopt. It can then retrieve the security state returned by
4667 * Only one module will provide a security context. in security_socket_getpeersec_dgram()
4685 * Allocate and attach a security structure to the sk->sk_security field, which
4686 * is used to copy security attributes between local stream sockets.
4699 * Deallocate security structure.
4711 * Clone/copy security structure.
4842 * @security: pointer to the LSM blob
4844 * This hook allows a module to allocate a security structure for a TUN device,
4845 * returning the pointer in @security.
4849 int security_tun_dev_alloc_security(void **security) in security_tun_dev_alloc_security() argument
4851 return call_int_hook(tun_dev_alloc_security, 0, security); in security_tun_dev_alloc_security()
4857 * @security: LSM blob
4859 * This hook allows a module to free the security structure for a TUN device.
4861 void security_tun_dev_free_security(void *security) in security_tun_dev_free_security() argument
4863 call_void_hook(tun_dev_free_security, security); in security_tun_dev_free_security()
4882 * @security: TUN device LSM blob
4888 int security_tun_dev_attach_queue(void *security) in security_tun_dev_attach_queue() argument
4890 return call_int_hook(tun_dev_attach_queue, 0, security); in security_tun_dev_attach_queue()
4897 * @security: TUN device LSM blob
4899 * This hook can be used by the module to update any security state associated
4904 int security_tun_dev_attach(struct sock *sk, void *security) in security_tun_dev_attach() argument
4906 return call_int_hook(tun_dev_attach, 0, sk, security); in security_tun_dev_attach()
4912 * @security: TUN device LSM blob
4914 * This hook can be used by the module to update any security state associated
4915 * with the TUN device's security structure.
4919 int security_tun_dev_open(void *security) in security_tun_dev_open() argument
4921 return call_int_hook(tun_dev_open, 0, security); in security_tun_dev_open()
4986 * security module.
5055 * Allocate a security structure for Infiniband objects.
5069 * Deallocate an Infiniband security structure.
5081 * @ctxp: xfrm security context being added to the SPD
5082 * @sec_ctx: security label provided by userspace
5085 * Allocate a security structure to the xp->security field; the security field
5100 * @old_ctx: xfrm security context
5101 * @new_ctxp: target xfrm security context
5103 * Allocate a security structure in new_ctxp that contains the information from
5115 * security_xfrm_policy_free() - Free a xfrm security context
5116 * @ctx: xfrm security context
5128 * @ctx: xfrm security context
5142 * @sec_ctx: security label provided by userspace
5144 * Allocate a security structure to the @x->security field; the security field
5160 * @polsec: associated policy's security context
5163 * Allocate a security structure to the x->security field; the security field
5179 * Authorize deletion of x->security.
5193 * Deallocate x->security.
5202 * @ctx: target xfrm security context
5256 * Decode the packet in @skb and return the security label in @secid.
5282 * Permit allocation of a key and assign security data. Note that key does not
5297 * Notification of destruction; free security data.
5321 * security_key_getsecurity() - Get the key's security label
5323 * @buffer: security label buffer
5325 * Get a textual representation of the security context attached to a key for
5331 * there is no security label assigned to the key.
5386 * @secid: security label
5411 * the kernel. The actual security module can implement their own rules to
5454 * Initialize the security field inside bpf map.
5467 * Initialize the security field inside bpf program.
5480 * Clean up the security information stored inside bpf map.
5491 * Clean up the security information stored inside bpf prog.
5533 * Allocate and save perf_event security info.
5546 * Release (free) perf_event security info.
5557 * Read perf_event security info if allowed.
5570 * Write perf_event security info if allowed.