crypto/lrw.c
Source file repositories/reference/linux-study-clean/crypto/lrw.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/lrw.c- Extension
.c- Size
- 10769 bytes
- Lines
- 430
- Domain
- Kernel Services
- Bucket
- crypto
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
crypto/internal/skcipher.hcrypto/scatterwalk.hlinux/err.hlinux/init.hlinux/kernel.hlinux/module.hlinux/scatterlist.hlinux/slab.hcrypto/b128ops.hcrypto/gf128mul.h
Detected Declarations
struct lrw_tfm_ctxstruct lrw_request_ctxfunction lrw_setbit128_bbefunction lrw_setkeyfunction lrw_next_indexfunction twicefunction lrw_xor_tweak_prefunction lrw_xor_tweak_postfunction lrw_crypt_donefunction lrw_init_cryptfunction lrw_encryptfunction lrw_decryptfunction lrw_init_tfmfunction lrw_exit_tfmfunction lrw_free_instancefunction lrw_createfunction lrw_module_initfunction lrw_module_exitmodule init lrw_module_init
Annotated Snippet
module_init(lrw_module_init);
module_exit(lrw_module_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LRW block cipher mode");
MODULE_ALIAS_CRYPTO("lrw");
MODULE_SOFTDEP("pre: ecb");
Annotation
- Immediate include surface: `crypto/internal/skcipher.h`, `crypto/scatterwalk.h`, `linux/err.h`, `linux/init.h`, `linux/kernel.h`, `linux/module.h`, `linux/scatterlist.h`, `linux/slab.h`.
- Detected declarations: `struct lrw_tfm_ctx`, `struct lrw_request_ctx`, `function lrw_setbit128_bbe`, `function lrw_setkey`, `function lrw_next_index`, `function twice`, `function lrw_xor_tweak_pre`, `function lrw_xor_tweak_post`, `function lrw_crypt_done`, `function lrw_init_crypt`.
- Atlas domain: Kernel Services / crypto.
- Implementation status: integration 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.