Merge branch 'for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[linux-2.6-microblaze.git] / include / linux / lsm_hooks.h
index 5c4c5c0..0bada4d 100644 (file)
  *     @dentry dentry to use in calculating the context.
  *     @mode mode used to determine resource type.
  *     @name name of the last path component used to create file
+ *     @xattr_name pointer to place the pointer to security xattr name.
+ *                 Caller does not have to free the resulting pointer. Its
+ *                 a pointer to static string.
  *     @ctx pointer to place the pointer to the resulting context in.
  *     @ctxlen point to place the length of the resulting context.
  * @dentry_create_files_as:
  *
  * @binder_set_context_mgr:
  *     Check whether @mgr is allowed to be the binder context manager.
- *     @mgr contains the task_struct for the task being registered.
+ *     @mgr contains the struct cred for the current binder process.
  *     Return 0 if permission is granted.
  * @binder_transaction:
  *     Check whether @from is allowed to invoke a binder transaction call
  *     to @to.
- *     @from contains the task_struct for the sending task.
- *     @to contains the task_struct for the receiving task.
+ *     @from contains the struct cred for the sending process.
+ *     @to contains the struct cred for the receiving process.
  * @binder_transfer_binder:
  *     Check whether @from is allowed to transfer a binder reference to @to.
- *     @from contains the task_struct for the sending task.
- *     @to contains the task_struct for the receiving task.
+ *     @from contains the struct cred for the sending process.
+ *     @to contains the struct cred for the receiving process.
  * @binder_transfer_file:
  *     Check whether @from is allowed to transfer @file to @to.
- *     @from contains the task_struct for the sending task.
+ *     @from contains the struct cred for the sending process.
  *     @file contains the struct file being transferred.
- *     @to contains the task_struct for the receiving task.
+ *     @to contains the struct cred for the receiving process.
  *
  * @ptrace_access_check:
  *     Check permission before allowing the current process to trace the
  *     Read perf_event security info if allowed.
  * @perf_event_write:
  *     Write perf_event security info if allowed.
+ *
+ * Security hooks for io_uring
+ *
+ * @uring_override_creds:
+ *      Check if the current task, executing an io_uring operation, is allowed
+ *      to override it's credentials with @new.
+ *
+ *      @new: the new creds to use
+ *
+ * @uring_sqpoll:
+ *      Check whether the current task is allowed to spawn a io_uring polling
+ *      thread (IORING_SETUP_SQPOLL).
+ *
  */
 union security_list_options {
        #define LSM_HOOK(RET, DEFAULT, NAME, ...) RET (*NAME)(__VA_ARGS__);