crypto/jitterentropy-testing.c
Source file repositories/reference/linux-study-clean/crypto/jitterentropy-testing.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/jitterentropy-testing.c- Extension
.c- Size
- 7186 bytes
- Lines
- 296
- Domain
- Kernel Services
- Bucket
- crypto
- Inferred role
- Kernel Services: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/debugfs.hlinux/module.hlinux/uaccess.hjitterentropy.h
Detected Declarations
struct jent_testingfunction jent_testing_resetfunction jent_testing_data_initfunction jent_testing_finifunction jent_testing_storefunction jent_testing_have_datafunction jent_testing_readerfunction jent_testing_extract_userfunction jent_raw_hires_entropy_storefunction jent_raw_hires_entropy_readerfunction jent_raw_hires_readfunction jent_testing_initfunction jent_testing_exitexport jent_raw_hires_entropy_storeexport jent_testing_initexport jent_testing_exit
Annotated Snippet
static const struct file_operations jent_raw_hires_fops = {
.owner = THIS_MODULE,
.read = jent_raw_hires_read,
};
/******************************* Initialization *******************************/
void jent_testing_init(void)
{
jent_raw_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
debugfs_create_file_unsafe("jent_raw_hires", 0400,
jent_raw_debugfs_root, NULL,
&jent_raw_hires_fops);
}
EXPORT_SYMBOL(jent_testing_init);
void jent_testing_exit(void)
{
debugfs_remove_recursive(jent_raw_debugfs_root);
}
EXPORT_SYMBOL(jent_testing_exit);
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/module.h`, `linux/uaccess.h`, `jitterentropy.h`.
- Detected declarations: `struct jent_testing`, `function jent_testing_reset`, `function jent_testing_data_init`, `function jent_testing_fini`, `function jent_testing_store`, `function jent_testing_have_data`, `function jent_testing_reader`, `function jent_testing_extract_user`, `function jent_raw_hires_entropy_store`, `function jent_raw_hires_entropy_reader`.
- Atlas domain: Kernel Services / crypto.
- Implementation status: pattern 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.