include/linux/uts_namespace.h
Source file repositories/reference/linux-study-clean/include/linux/uts_namespace.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/uts_namespace.h- Extension
.h- Size
- 1356 bytes
- Lines
- 66
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ns_common.huapi/linux/utsname.h
Detected Declarations
struct user_namespacestruct uts_namespacefunction get_uts_nsfunction put_uts_nsfunction get_uts_nsfunction uts_ns_init
Annotated Snippet
struct uts_namespace {
struct new_utsname name;
struct user_namespace *user_ns;
struct ucounts *ucounts;
struct ns_common ns;
} __randomize_layout;
extern struct uts_namespace init_uts_ns;
#ifdef CONFIG_UTS_NS
static inline struct uts_namespace *to_uts_ns(struct ns_common *ns)
{
return container_of(ns, struct uts_namespace, ns);
}
static inline void get_uts_ns(struct uts_namespace *ns)
{
ns_ref_inc(ns);
}
extern struct uts_namespace *copy_utsname(u64 flags,
struct user_namespace *user_ns, struct uts_namespace *old_ns);
extern void free_uts_ns(struct uts_namespace *ns);
static inline void put_uts_ns(struct uts_namespace *ns)
{
if (ns_ref_put(ns))
free_uts_ns(ns);
}
void uts_ns_init(void);
#else
static inline void get_uts_ns(struct uts_namespace *ns)
{
}
static inline void put_uts_ns(struct uts_namespace *ns)
{
}
static inline struct uts_namespace *copy_utsname(u64 flags,
struct user_namespace *user_ns, struct uts_namespace *old_ns)
{
if (flags & CLONE_NEWUTS)
return ERR_PTR(-EINVAL);
return old_ns;
}
static inline void uts_ns_init(void)
{
}
#endif
#endif /* _LINUX_UTS_NAMESPACE_H */
Annotation
- Immediate include surface: `linux/ns_common.h`, `uapi/linux/utsname.h`.
- Detected declarations: `struct user_namespace`, `struct uts_namespace`, `function get_uts_ns`, `function put_uts_ns`, `function get_uts_ns`, `function uts_ns_init`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.