Lines Matching full:security

3  * Security plug functions
57 * all security modules to use the same descriptions for auditing
337 /* Process "security=", if given. */ in ordered_lsm_parse()
342 * To match the original "security=" behavior, this in ordered_lsm_parse()
352 init_debug("security=%s disabled: %s (only one legacy major LSM)\n", in ordered_lsm_parse()
377 /* Process "security=", if given. */ in ordered_lsm_parse()
383 append_ordered_lsm(lsm, "security="); in ordered_lsm_parse()
454 pr_warn("security=%s is ignored because it is superseded by lsm=%s\n", in ordered_lsm_init()
517 * security_init - initializes the security framework
525 init_debug("legacy security=%s\n", chosen_major_lsm ? : " *unspecified*"); in security_init()
552 __setup("security=", choose_major_lsm);
610 * @lsmid: the identification information for the security module
620 * A security module may call security_add_hooks() more in security_add_hooks()
701 return lsm_blob_alloc(&cred->security, blob_sizes.lbs_cred, gfp); in lsm_cred_alloc()
771 return lsm_blob_alloc(&task->security, blob_sizes.lbs_task, GFP_KERNEL); in lsm_task_alloc()
784 return lsm_blob_alloc(&kip->security, blob_sizes.lbs_ipc, GFP_KERNEL); in lsm_ipc_alloc()
798 return lsm_blob_alloc(&key->security, blob_sizes.lbs_key, GFP_KERNEL); in lsm_key_alloc()
812 return lsm_blob_alloc(&mp->security, blob_sizes.lbs_msg_msg, in lsm_msg_msg_alloc()
985 /* Security operations */
1052 * process. Security modules may also want to perform a process tracing check
1055 * process is being traced and its security attributes would be changed by the
1133 * @opts contains options for the capable check <include/linux/security.h>.
1243 * If the setup in prepare_exec_creds did not setup @bprm->cred->security
1245 * @bprm->cred->security to be what commit_creds needs to install for the new
1247 * transitions between security domains). The hook must set @bprm->secureexec
1275 * transitions between security domains). The hook must set @bprm->secureexec
1293 * It allows a check against the @bprm->cred->security value which was set in
1309 * Prepare to install the new security attributes of a process being
1326 * Tidy up after the installation of the new security attributes of a process
1339 * security_fs_context_submount() - Initialise fc->security
1343 * Fill out the ->security field for a new fs_context.
1357 * Allocate and attach a security structure to sc->security. This pointer is
1401 * Allocate and attach a security structure to the sb->s_security field. The
1497 * Extracts security system specific mount options and verifies no changes are
1609 * Set the security relevant mount options used for a superblock.
1638 * Copy all security options from a given superblock to another.
1689 * Allocate and attach a security structure to @inode->i_security. The
1743 * @xattr_name: name of the security/LSM xattr
1794 * Obtain the security attribute name suffix and value to set on a newly
1795 * created inode and set up the incore security field for the new inode. This
1801 * lsm_get_xattr_slot() to retrieve the slots reserved by the security module
1806 * the security module does not use security attributes or does not wish to put
1807 * a security attribute on this particular inode, then it should return
1811 * security attributes that are required, negative values otherwise.
1867 * Set up the incore security field for the new anonymous inode and return
1868 * whether the inode creation is permitted by the security module or not.
1870 * Return: Returns 0 on success, -EACCES if the security module denies the
1904 * security_path_post_mknod() - Update inode security after reg file creation
1908 * Update inode security field after a regular file has been created.
2117 * security_inode_post_create_tmpfile() - Update inode security of new tmpfile
2121 * Update inode security data after a tmpfile has been created.
2312 * existing Linux permission function, so a security module can use it to
2355 * Update inode security field after successful setting file attributes.
2448 * security_inode_post_set_acl() - Update inode security from posix acls set
2453 * Update inode security data after successfully setting posix acls on @dentry.
2503 * security_inode_post_remove_acl() - Update inode security after rm posix acls
2508 * Update inode security data after successfully removing posix acls on
2527 * Update inode security field after successful setxattr operation.
2646 * The @dentry's setuid bit is being removed. Remove similar security labels.
2659 * security_inode_getsecurity() - Get the xattr security label of an inode
2663 * @buffer: security label buffer
2666 * Retrieve a copy of the extended attribute representation of the security
2668 * remainder of the attribute name after the security prefix has been removed.
2686 * security_inode_setsecurity() - Set the xattr security label of an inode
2689 * @value: security label
2690 * @size: length of security label
2693 * Set the security label associated with @name for @inode from the extended
2696 * remainder of the attribute name after the security. prefix has been removed.
2711 * security_inode_listsecurity() - List the xattr security label names
2716 * Copy the extended attribute names for the security labels associated with
2750 * filesystem. Security module can prepare a set of new creds and modify as
2772 * -EOPNOTSUPP if the security module does not know about attribute,
2812 * Initialize the security context of a newly created kernfs node based on its
2829 * by various operations that read or write files. A security module can use
2837 * memory-mapped files. Security modules must handle this separately if they
2851 * Allocate and attach a security structure to the file->f_security field. The
2852 * security field is initialized to NULL when the structure is first created.
2883 * Deallocate and free any security structures stored in file->f_security.
2907 * by the security module.
3040 * security module.
3053 * Save owner security information (typically from current->security) in
3074 * so the file structure (and associated security information) can always be
3089 * This hook allows security modules to control the ability of a process to
3181 kfree(task->security); in security_task_free()
3182 task->security = NULL; in security_task_free()
3212 * Deallocate and clear the cred->security field in a set of credentials.
3218 * may result in a call here with ->security being NULL. in security_cred_free()
3220 if (unlikely(cred->security == NULL)) in security_cred_free()
3225 kfree(cred->security); in security_cred_free()
3226 cred->security = NULL; in security_cred_free()
3269 * Retrieve the security identifier of the cred structure @c. In case of
3284 * Retrieve the security data of the cred structure @c. In case of
3516 * Retrieve the subjective security identifier of the current task and return
3531 * Retrieve the objective security identifier of the task_struct in @p and
3711 * security_task_to_inode() - Set the security attributes of a task's inode
3715 * Set the security attributes for an inode based on an associated task's
3716 * security attributes, e.g. for /proc/pid inodes.
3768 * Allocate and attach a security structure to the msg->security field. The
3769 * security field is initialized to NULL when the structure is first created.
3789 * Deallocate the security structure for this message.
3794 kfree(msg->security); in security_msg_msg_free()
3795 msg->security = NULL; in security_msg_msg_free()
3802 * Allocate and attach a security structure to @msg. The security field is
3823 * Deallocate security field @perm->security for the message queue.
3828 kfree(msq->security); in security_msg_queue_free()
3829 msq->security = NULL; in security_msg_queue_free()
3905 * Allocate and attach a security structure to the @shp security field. The
3906 * security field is initialized to NULL when the structure is first created.
3926 * Deallocate the security structure @perm->security for the memory segment.
3931 kfree(shp->security); in security_shm_free()
3932 shp->security = NULL; in security_shm_free()
3989 * Allocate and attach a security structure to the @sma security field. The
3990 * security field is initialized to NULL when the structure is first created.
4010 * Deallocate security structure @sma->security for the semaphore.
4015 kfree(sma->security); in security_sem_free()
4016 sma->security = NULL; in security_sem_free()
4073 * Fill in @inode security information for a @dentry if allowed.
4084 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
4177 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
4284 * Save security information for a netlink message so that permission checking
4285 * can be performed when the message is processed. The security information
4316 * Convert secid to security context. If @cp is NULL the length of the
4334 * Convert a @prop entry to security context. If @cp is NULL the
4353 * Convert security context to secid.
4366 * @cp: the security context
4368 * Release the security context.
4378 * security_inode_invalidate_secctx() - Invalidate an inode's security label
4381 * Notify the security module that it must revalidate the security context of
4391 * security_inode_notifysecctx() - Notify the LSM of an inode's security label
4396 * Notify the security module of what the security context of an inode should
4397 * be. Initializes the incore security context managed by the security module
4399 * the security context in its incore inode to the value provided by the server
4412 * security_inode_setsecctx() - Change the security label of an inode
4417 * Change the security context of an inode. Updates the incore security
4418 * context managed by the security module and invokes the fs code as needed
4420 * context. Example usage: NFS server invokes this hook to change the security
4434 * security_inode_getsecctx() - Get the security label of an inode
4436 * @cp: security context
4438 * On success, returns 0 and fills out @cp with the security context
4564 * This hook allows a module to update or allocate a per-socket security
4565 * structure. Note that the security field was not added directly to the socket
4566 * structure, but rather, the socket security information is stored in the
4568 * and attach security information to SOCK_INODE(sock)->i_security. This hook
4792 * This hook allows the security module to provide peer socket security state
4813 * This hook allows the security module to provide peer socket security state
4816 * option via getsockopt. It can then retrieve the security state returned by
4848 * Allocate and attach a security structure to the sk->sk_security field, which
4849 * is used to copy security attributes between local stream sockets.
4869 * Deallocate security structure.
4883 * Clone/copy security structure.
5014 * @security: pointer to the LSM blob
5016 * This hook allows a module to allocate a security structure for a TUN device,
5017 * returning the pointer in @security.
5021 int security_tun_dev_alloc_security(void **security) in security_tun_dev_alloc_security() argument
5025 rc = lsm_blob_alloc(security, blob_sizes.lbs_tun_dev, GFP_KERNEL); in security_tun_dev_alloc_security()
5029 rc = call_int_hook(tun_dev_alloc_security, *security); in security_tun_dev_alloc_security()
5031 kfree(*security); in security_tun_dev_alloc_security()
5032 *security = NULL; in security_tun_dev_alloc_security()
5040 * @security: LSM blob
5042 * This hook allows a module to free the security structure for a TUN device.
5044 void security_tun_dev_free_security(void *security) in security_tun_dev_free_security() argument
5046 kfree(security); in security_tun_dev_free_security()
5065 * @security: TUN device LSM blob
5071 int security_tun_dev_attach_queue(void *security) in security_tun_dev_attach_queue() argument
5073 return call_int_hook(tun_dev_attach_queue, security); in security_tun_dev_attach_queue()
5080 * @security: TUN device LSM blob
5082 * This hook can be used by the module to update any security state associated
5087 int security_tun_dev_attach(struct sock *sk, void *security) in security_tun_dev_attach() argument
5089 return call_int_hook(tun_dev_attach, sk, security); in security_tun_dev_attach()
5095 * @security: TUN device LSM blob
5097 * This hook can be used by the module to update any security state associated
5098 * with the TUN device's security structure.
5102 int security_tun_dev_open(void *security) in security_tun_dev_open() argument
5104 return call_int_hook(tun_dev_open, security); in security_tun_dev_open()
5168 * security module.
5236 * Allocate a security structure for Infiniband objects.
5261 * Deallocate an Infiniband security structure.
5273 * @ctxp: xfrm security context being added to the SPD
5274 * @sec_ctx: security label provided by userspace
5277 * Allocate a security structure to the xp->security field; the security field
5292 * @old_ctx: xfrm security context
5293 * @new_ctxp: target xfrm security context
5295 * Allocate a security structure in new_ctxp that contains the information from
5307 * security_xfrm_policy_free() - Free a xfrm security context
5308 * @ctx: xfrm security context
5320 * @ctx: xfrm security context
5334 * @sec_ctx: security label provided by userspace
5336 * Allocate a security structure to the @x->security field; the security field
5352 * @polsec: associated policy's security context
5355 * Allocate a security structure to the x->security field; the security field
5371 * Authorize deletion of x->security.
5385 * Deallocate x->security.
5394 * @ctx: target xfrm security context
5447 * Decode the packet in @skb and return the security label in @secid.
5473 * Permit allocation of a key and assign security data. Note that key does not
5495 * Notification of destruction; free security data.
5499 kfree(key->security); in security_key_free()
5500 key->security = NULL; in security_key_free()
5520 * security_key_getsecurity() - Get the key's security label
5522 * @buffer: security label buffer
5524 * Get a textual representation of the security context attached to a key for
5530 * there is no security label assigned to the key.
5606 * @prop: security label
5632 * the kernel. The actual security module can implement their own rules to
5759 * Clean up the security information stored inside bpf map.
5770 * Clean up the security information stored inside BPF program.
5781 * Clean up the security information stored inside BPF token.
5808 * Allocate and attach a security structure to @bdev->bd_security. The
5809 * security field is initialized to NULL when the bdev structure is
5834 * Deallocate the bdev security structure and set @bdev->bd_security to NULL.
5857 * Please note that the new hook should be invoked every time the security
5902 * Allocate and save perf_event security info.
5910 rc = lsm_blob_alloc(&event->security, blob_sizes.lbs_perf_event, in security_perf_event_alloc()
5917 kfree(event->security); in security_perf_event_alloc()
5918 event->security = NULL; in security_perf_event_alloc()
5927 * Release (free) perf_event security info.
5931 kfree(event->security); in security_perf_event_free()
5932 event->security = NULL; in security_perf_event_free()
5939 * Read perf_event security info if allowed.
5952 * Write perf_event security info if allowed.