net/xfrm/xfrm_user.c
Source file repositories/reference/linux-study-clean/net/xfrm/xfrm_user.c
File Facts
- System
- Linux kernel
- Corpus path
net/xfrm/xfrm_user.c- Extension
.c- Size
- 115287 bytes
- Lines
- 4652
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compat.hlinux/crypto.hlinux/module.hlinux/kernel.hlinux/types.hlinux/slab.hlinux/socket.hlinux/string.hlinux/net.hlinux/skbuff.hlinux/pfkeyv2.hlinux/ipsec.hlinux/init.hlinux/security.hnet/sock.hnet/xfrm.hnet/netlink.hnet/ah.hlinux/uaccess.hlinux/in6.hlinux/unaligned.h
Detected Declarations
struct xfrm_dump_infofunction Copyrightfunction verify_one_algfunction verify_auth_truncfunction verify_aeadfunction verify_one_addrfunction verify_sec_ctx_lenfunction verify_replayfunction verify_mtimer_threshfunction verify_xfrm_familyfunction verify_selector_prefixlenfunction verify_newsa_infofunction attach_one_algofunction attach_cryptfunction attach_authfunction attach_auth_truncfunction attach_aeadfunction xfrm_replay_verify_lenfunction xfrm_alloc_replay_state_esnfunction xfrm_user_sec_ctx_sizefunction copy_from_user_statefunction xfrm_update_ae_paramsfunction xfrm_smark_initfunction xfrm_add_safunction xfrm_del_safunction copy_to_user_statefunction copy_sec_ctxfunction xso_to_xuofunction copy_user_offloadfunction xfrm_redactfunction copy_to_user_authfunction copy_to_user_aeadfunction copy_to_user_ealgfunction copy_to_user_calgfunction copy_to_user_encapfunction xfrm_smark_putfunction copy_to_user_state_extrafunction dump_one_statefunction xfrm_dump_sa_donefunction xfrm_dump_safunction xfrm_nlmsg_multicastfunction xfrm_spdinfo_msgsizefunction build_spdinfofunction xfrm_set_spdinfofunction xfrm_get_spdinfofunction xfrm_sadinfo_msgsizefunction build_sadinfofunction xfrm_get_sadinfo
Annotated Snippet
module_init(xfrm_user_init);
module_exit(xfrm_user_exit);
MODULE_DESCRIPTION("XFRM User interface");
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_XFRM);
Annotation
- Immediate include surface: `linux/compat.h`, `linux/crypto.h`, `linux/module.h`, `linux/kernel.h`, `linux/types.h`, `linux/slab.h`, `linux/socket.h`, `linux/string.h`.
- Detected declarations: `struct xfrm_dump_info`, `function Copyright`, `function verify_one_alg`, `function verify_auth_trunc`, `function verify_aead`, `function verify_one_addr`, `function verify_sec_ctx_len`, `function verify_replay`, `function verify_mtimer_thresh`, `function verify_xfrm_family`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.