Lines Matching full:security
3 * Security plug functions
58 * all security modules to use the same descriptions for auditing
338 /* Process "security=", if given. */ in ordered_lsm_parse()
343 * To match the original "security=" behavior, this in ordered_lsm_parse()
353 init_debug("security=%s disabled: %s (only one legacy major LSM)\n", in ordered_lsm_parse()
378 /* Process "security=", if given. */ in ordered_lsm_parse()
384 append_ordered_lsm(lsm, "security="); in ordered_lsm_parse()
455 pr_warn("security=%s is ignored because it is superseded by lsm=%s\n", in ordered_lsm_init()
518 * security_init - initializes the security framework
526 init_debug("legacy security=%s\n", chosen_major_lsm ? : " *unspecified*"); in security_init()
553 __setup("security=", choose_major_lsm);
611 * @lsmid: the identification information for the security module
621 * A security module may call security_add_hooks() more in security_add_hooks()
702 return lsm_blob_alloc(&cred->security, blob_sizes.lbs_cred, gfp); in lsm_cred_alloc()
772 return lsm_blob_alloc(&task->security, blob_sizes.lbs_task, GFP_KERNEL); in lsm_task_alloc()
785 return lsm_blob_alloc(&kip->security, blob_sizes.lbs_ipc, GFP_KERNEL); in lsm_ipc_alloc()
799 return lsm_blob_alloc(&key->security, blob_sizes.lbs_key, GFP_KERNEL); in lsm_key_alloc()
813 return lsm_blob_alloc(&mp->security, blob_sizes.lbs_msg_msg, in lsm_msg_msg_alloc()
986 /* Security operations */
1053 * process. Security modules may also want to perform a process tracing check
1056 * process is being traced and its security attributes would be changed by the
1134 * @opts contains options for the capable check <include/linux/security.h>.
1244 * If the setup in prepare_exec_creds did not setup @bprm->cred->security
1246 * @bprm->cred->security to be what commit_creds needs to install for the new
1248 * transitions between security domains). The hook must set @bprm->secureexec
1270 * transitions between security domains). The hook must set @bprm->secureexec
1288 * It allows a check against the @bprm->cred->security value which was set in
1304 * Prepare to install the new security attributes of a process being
1321 * Tidy up after the installation of the new security attributes of a process
1334 * security_fs_context_submount() - Initialise fc->security
1338 * Fill out the ->security field for a new fs_context.
1352 * Allocate and attach a security structure to sc->security. This pointer is
1396 * Allocate and attach a security structure to the sb->s_security field. The
1492 * Extracts security system specific mount options and verifies no changes are
1604 * Set the security relevant mount options used for a superblock.
1633 * Copy all security options from a given superblock to another.
1684 * Allocate and attach a security structure to @inode->i_security. The
1738 * @xattr_name: name of the security/LSM xattr
1790 * Obtain the security attribute name suffix and value to set on a newly
1791 * created inode and set up the incore security field for the new inode. This
1797 * lsm_get_xattr_slot() to retrieve the slots reserved by the security module
1802 * the security module does not use security attributes or does not wish to put
1803 * a security attribute on this particular inode, then it should return
1807 * security attributes that are required, negative values otherwise.
1863 * Set up the incore security field for the new anonymous inode and return
1864 * whether the inode creation is permitted by the security module or not.
1866 * Return: Returns 0 on success, -EACCES if the security module denies the
1900 * security_path_post_mknod() - Update inode security after reg file creation
1904 * Update inode security field after a regular file has been created.
2113 * security_inode_post_create_tmpfile() - Update inode security of new tmpfile
2117 * Update inode security data after a tmpfile has been created.
2308 * existing Linux permission function, so a security module can use it to
2351 * Update inode security field after successful setting file attributes.
2444 * security_inode_post_set_acl() - Update inode security from posix acls set
2449 * Update inode security data after successfully setting posix acls on @dentry.
2499 * security_inode_post_remove_acl() - Update inode security after rm posix acls
2504 * Update inode security data after successfully removing posix acls on
2523 * Update inode security field after successful setxattr operation.
2642 * The @dentry's setuid bit is being removed. Remove similar security labels.
2655 * security_inode_getsecurity() - Get the xattr security label of an inode
2659 * @buffer: security label buffer
2662 * Retrieve a copy of the extended attribute representation of the security
2664 * remainder of the attribute name after the security prefix has been removed.
2682 * security_inode_setsecurity() - Set the xattr security label of an inode
2685 * @value: security label
2686 * @size: length of security label
2689 * Set the security label associated with @name for @inode from the extended
2692 * remainder of the attribute name after the security. prefix has been removed.
2707 * security_inode_listsecurity() - List the xattr security label names
2712 * Copy the extended attribute names for the security labels associated with
2747 * filesystem. Security module can prepare a set of new creds and modify as
2769 * -EOPNOTSUPP if the security module does not know about attribute,
2809 * Initialize the security context of a newly created kernfs node based on its
2826 * by various operations that read or write files. A security module can use
2834 * memory-mapped files. Security modules must handle this separately if they
2848 * Allocate and attach a security structure to the file->f_security field. The
2849 * security field is initialized to NULL when the structure is first created.
2880 * Deallocate and free any security structures stored in file->f_security.
2904 * by the security module.
3037 * security module.
3050 * Save owner security information (typically from current->security) in
3071 * so the file structure (and associated security information) can always be
3086 * This hook allows security modules to control the ability of a process to
3180 kfree(task->security); in security_task_free()
3181 task->security = NULL; in security_task_free()
3211 * Deallocate and clear the cred->security field in a set of credentials.
3217 * may result in a call here with ->security being NULL. in security_cred_free()
3219 if (unlikely(cred->security == NULL)) in security_cred_free()
3224 kfree(cred->security); in security_cred_free()
3225 cred->security = NULL; in security_cred_free()
3268 * Retrieve the security identifier of the cred structure @c. In case of
3500 * Retrieve the subjective security identifier of the current task and return
3515 * Retrieve the objective security identifier of the task_struct in @p and
3695 * security_task_to_inode() - Set the security attributes of a task's inode
3699 * Set the security attributes for an inode based on an associated task's
3700 * security attributes, e.g. for /proc/pid inodes.
3752 * Allocate and attach a security structure to the msg->security field. The
3753 * security field is initialized to NULL when the structure is first created.
3773 * Deallocate the security structure for this message.
3778 kfree(msg->security); in security_msg_msg_free()
3779 msg->security = NULL; in security_msg_msg_free()
3786 * Allocate and attach a security structure to @msg. The security field is
3807 * Deallocate security field @perm->security for the message queue.
3812 kfree(msq->security); in security_msg_queue_free()
3813 msq->security = NULL; in security_msg_queue_free()
3889 * Allocate and attach a security structure to the @shp security field. The
3890 * security field is initialized to NULL when the structure is first created.
3910 * Deallocate the security structure @perm->security for the memory segment.
3915 kfree(shp->security); in security_shm_free()
3916 shp->security = NULL; in security_shm_free()
3973 * Allocate and attach a security structure to the @sma security field. The
3974 * security field is initialized to NULL when the structure is first created.
3994 * Deallocate security structure @sma->security for the semaphore.
3999 kfree(sma->security); in security_sem_free()
4000 sma->security = NULL; in security_sem_free()
4057 * Fill in @inode security information for a @dentry if allowed.
4068 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
4163 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
4270 * Save security information for a netlink message so that permission checking
4271 * can be performed when the message is processed. The security information
4303 * Convert secid to security context. If @secdata is NULL the length of the
4322 * Convert security context to secid.
4338 * Release the security context.
4347 * security_inode_invalidate_secctx() - Invalidate an inode's security label
4350 * Notify the security module that it must revalidate the security context of
4360 * security_inode_notifysecctx() - Notify the LSM of an inode's security label
4365 * Notify the security module of what the security context of an inode should
4366 * be. Initializes the incore security context managed by the security module
4368 * the security context in its incore inode to the value provided by the server
4381 * security_inode_setsecctx() - Change the security label of an inode
4386 * Change the security context of an inode. Updates the incore security
4387 * context managed by the security module and invokes the fs code as needed
4389 * context. Example usage: NFS server invokes this hook to change the security
4403 * security_inode_getsecctx() - Get the security label of an inode
4408 * On success, returns 0 and fills out @ctx and @ctxlen with the security
4533 * This hook allows a module to update or allocate a per-socket security
4534 * structure. Note that the security field was not added directly to the socket
4535 * structure, but rather, the socket security information is stored in the
4537 * and attach security information to SOCK_INODE(sock)->i_security. This hook
4761 * This hook allows the security module to provide peer socket security state
4782 * This hook allows the security module to provide peer socket security state
4785 * option via getsockopt. It can then retrieve the security state returned by
4817 * Allocate and attach a security structure to the sk->sk_security field, which
4818 * is used to copy security attributes between local stream sockets.
4838 * Deallocate security structure.
4852 * Clone/copy security structure.
4983 * @security: pointer to the LSM blob
4985 * This hook allows a module to allocate a security structure for a TUN device,
4986 * returning the pointer in @security.
4990 int security_tun_dev_alloc_security(void **security) in security_tun_dev_alloc_security() argument
4994 rc = lsm_blob_alloc(security, blob_sizes.lbs_tun_dev, GFP_KERNEL); in security_tun_dev_alloc_security()
4998 rc = call_int_hook(tun_dev_alloc_security, *security); in security_tun_dev_alloc_security()
5000 kfree(*security); in security_tun_dev_alloc_security()
5001 *security = NULL; in security_tun_dev_alloc_security()
5009 * @security: LSM blob
5011 * This hook allows a module to free the security structure for a TUN device.
5013 void security_tun_dev_free_security(void *security) in security_tun_dev_free_security() argument
5015 kfree(security); in security_tun_dev_free_security()
5034 * @security: TUN device LSM blob
5040 int security_tun_dev_attach_queue(void *security) in security_tun_dev_attach_queue() argument
5042 return call_int_hook(tun_dev_attach_queue, security); in security_tun_dev_attach_queue()
5049 * @security: TUN device LSM blob
5051 * This hook can be used by the module to update any security state associated
5056 int security_tun_dev_attach(struct sock *sk, void *security) in security_tun_dev_attach() argument
5058 return call_int_hook(tun_dev_attach, sk, security); in security_tun_dev_attach()
5064 * @security: TUN device LSM blob
5066 * This hook can be used by the module to update any security state associated
5067 * with the TUN device's security structure.
5071 int security_tun_dev_open(void *security) in security_tun_dev_open() argument
5073 return call_int_hook(tun_dev_open, security); in security_tun_dev_open()
5137 * security module.
5205 * Allocate a security structure for Infiniband objects.
5230 * Deallocate an Infiniband security structure.
5242 * @ctxp: xfrm security context being added to the SPD
5243 * @sec_ctx: security label provided by userspace
5246 * Allocate a security structure to the xp->security field; the security field
5261 * @old_ctx: xfrm security context
5262 * @new_ctxp: target xfrm security context
5264 * Allocate a security structure in new_ctxp that contains the information from
5276 * security_xfrm_policy_free() - Free a xfrm security context
5277 * @ctx: xfrm security context
5289 * @ctx: xfrm security context
5303 * @sec_ctx: security label provided by userspace
5305 * Allocate a security structure to the @x->security field; the security field
5321 * @polsec: associated policy's security context
5324 * Allocate a security structure to the x->security field; the security field
5340 * Authorize deletion of x->security.
5354 * Deallocate x->security.
5363 * @ctx: target xfrm security context
5416 * Decode the packet in @skb and return the security label in @secid.
5442 * Permit allocation of a key and assign security data. Note that key does not
5464 * Notification of destruction; free security data.
5468 kfree(key->security); in security_key_free()
5469 key->security = NULL; in security_key_free()
5489 * security_key_getsecurity() - Get the key's security label
5491 * @buffer: security label buffer
5493 * Get a textual representation of the security context attached to a key for
5499 * there is no security label assigned to the key.
5575 * @secid: security label
5600 * the kernel. The actual security module can implement their own rules to
5727 * Clean up the security information stored inside bpf map.
5738 * Clean up the security information stored inside BPF program.
5749 * Clean up the security information stored inside BPF token.
5776 * Allocate and attach a security structure to @bdev->bd_security. The
5777 * security field is initialized to NULL when the bdev structure is
5802 * Deallocate the bdev security structure and set @bdev->bd_security to NULL.
5825 * Please note that the new hook should be invoked every time the security
5870 * Allocate and save perf_event security info.
5878 rc = lsm_blob_alloc(&event->security, blob_sizes.lbs_perf_event, in security_perf_event_alloc()
5885 kfree(event->security); in security_perf_event_alloc()
5886 event->security = NULL; in security_perf_event_alloc()
5895 * Release (free) perf_event security info.
5899 kfree(event->security); in security_perf_event_free()
5900 event->security = NULL; in security_perf_event_free()
5907 * Read perf_event security info if allowed.
5920 * Write perf_event security info if allowed.