include/crypto/acompress.h
Source file repositories/reference/linux-study-clean/include/crypto/acompress.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/acompress.h- Extension
.h- Size
- 16118 bytes
- Lines
- 559
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- 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/atomic.hlinux/args.hlinux/compiler_types.hlinux/container_of.hlinux/crypto.hlinux/err.hlinux/scatterlist.hlinux/slab.hlinux/spinlock_types.hlinux/types.h
Detected Declarations
struct acomp_reqstruct foliostruct acomp_req_chainstruct acomp_reqstruct crypto_acompfunction crypto_acomp_reqsizefunction acomp_request_set_tfmfunction acomp_is_asyncfunction crypto_free_acompfunction crypto_has_acompfunction acomp_request_alloc_extrafunction acomp_request_alloc_extrafunction acomp_req_on_stackfunction acomp_request_freefunction acomp_request_set_callbackfunction acomp_request_set_paramsfunction acomp_request_set_src_sgfunction acomp_request_set_src_dmafunction acomp_request_set_src_nondmafunction acomp_request_set_src_foliofunction acomp_request_set_dst_sgfunction acomp_request_set_dst_dmafunction acomp_request_set_dst_nondmafunction acomp_request_set_dst_folio
Annotated Snippet
struct acomp_req_chain {
crypto_completion_t compl;
void *data;
struct scatterlist ssg;
struct scatterlist dsg;
union {
const u8 *src;
struct folio *sfolio;
};
union {
u8 *dst;
struct folio *dfolio;
};
u32 flags;
};
/**
* struct acomp_req - asynchronous (de)compression request
*
* @base: Common attributes for asynchronous crypto requests
* @src: Source scatterlist
* @dst: Destination scatterlist
* @svirt: Source virtual address
* @dvirt: Destination virtual address
* @slen: Size of the input buffer
* @dlen: Size of the output buffer and number of bytes produced
* @chain: Private API code data, do not use
* @__ctx: Start of private context data
*/
struct acomp_req {
struct crypto_async_request base;
union {
struct scatterlist *src;
const u8 *svirt;
};
union {
struct scatterlist *dst;
u8 *dvirt;
};
unsigned int slen;
unsigned int dlen;
struct acomp_req_chain chain;
void *__ctx[] CRYPTO_MINALIGN_ATTR;
};
/**
* struct crypto_acomp - user-instantiated objects which encapsulate
* algorithms and core processing logic
*
* @compress: Function performs a compress operation
* @decompress: Function performs a de-compress operation
* @reqsize: Context size for (de)compression requests
* @fb: Synchronous fallback tfm
* @base: Common crypto API algorithm data structure
*/
struct crypto_acomp {
int (*compress)(struct acomp_req *req);
int (*decompress)(struct acomp_req *req);
unsigned int reqsize;
struct crypto_tfm base;
};
#define COMP_ALG_COMMON { \
struct crypto_alg base; \
}
struct comp_alg_common COMP_ALG_COMMON;
/**
* DOC: Asynchronous Compression API
*
* The Asynchronous Compression API is used with the algorithms of type
* CRYPTO_ALG_TYPE_ACOMPRESS (listed as type "acomp" in /proc/crypto)
*/
/**
* crypto_alloc_acomp() -- allocate ACOMPRESS tfm handle
* @alg_name: is the cra_name / name or cra_driver_name / driver name of the
* compression algorithm e.g. "deflate"
* @type: specifies the type of the algorithm
* @mask: specifies the mask for the algorithm
*
* Allocate a handle for a compression algorithm. The returned struct
* crypto_acomp is the handle that is required for any subsequent
* API invocation for the compression operations.
*
* Return: allocated handle in case of success; IS_ERR() is true in case
* of an error, PTR_ERR() returns the error code.
*/
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/args.h`, `linux/compiler_types.h`, `linux/container_of.h`, `linux/crypto.h`, `linux/err.h`, `linux/scatterlist.h`, `linux/slab.h`.
- Detected declarations: `struct acomp_req`, `struct folio`, `struct acomp_req_chain`, `struct acomp_req`, `struct crypto_acomp`, `function crypto_acomp_reqsize`, `function acomp_request_set_tfm`, `function acomp_is_async`, `function crypto_free_acomp`, `function crypto_has_acomp`.
- Atlas domain: Repository Root And Misc / include.
- 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.