linux/kernel/utsname.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Copyright (C) 2004 IBM Corporation
 *
 *  Author: Serge Hallyn <[email protected]>
 */

#include <linux/export.h>
#include <linux/uts.h>
#include <linux/utsname.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/cred.h>
#include <linux/user_namespace.h>
#include <linux/proc_ns.h>
#include <linux/sched/task.h>

static struct kmem_cache *uts_ns_cache __ro_after_init;

static struct ucounts *inc_uts_namespaces(struct user_namespace *ns)
{}

static void dec_uts_namespaces(struct ucounts *ucounts)
{}

static struct uts_namespace *create_uts_ns(void)
{}

/*
 * Clone a new ns copying an original utsname, setting refcount to 1
 * @old_ns: namespace to clone
 * Return ERR_PTR(-ENOMEM) on error (failure to allocate), new ns otherwise
 */
static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
					  struct uts_namespace *old_ns)
{}

/*
 * Copy task tsk's utsname namespace, or clone it if flags
 * specifies CLONE_NEWUTS.  In latter case, changes to the
 * utsname of this process won't be seen by parent, and vice
 * versa.
 */
struct uts_namespace *copy_utsname(unsigned long flags,
	struct user_namespace *user_ns, struct uts_namespace *old_ns)
{}

void free_uts_ns(struct uts_namespace *ns)
{}

static inline struct uts_namespace *to_uts_ns(struct ns_common *ns)
{}

static struct ns_common *utsns_get(struct task_struct *task)
{}

static void utsns_put(struct ns_common *ns)
{}

static int utsns_install(struct nsset *nsset, struct ns_common *new)
{}

static struct user_namespace *utsns_owner(struct ns_common *ns)
{}

const struct proc_ns_operations utsns_operations =;

void __init uts_ns_init(void)
{}