mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
crypto: ccp - Rearrange structure members to minimize size
The AES GCM function (in ccp-ops) requires a fair amount of stack space, which elicits a complaint when KASAN is enabled. Rearranging and packing a few structures eliminates the warning. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
51de7dd02d
commit
2d15839106
1 changed files with 4 additions and 4 deletions
|
@ -427,33 +427,33 @@ enum ccp_memtype {
|
||||||
};
|
};
|
||||||
#define CCP_MEMTYPE_LSB CCP_MEMTYPE_KSB
|
#define CCP_MEMTYPE_LSB CCP_MEMTYPE_KSB
|
||||||
|
|
||||||
|
|
||||||
struct ccp_dma_info {
|
struct ccp_dma_info {
|
||||||
dma_addr_t address;
|
dma_addr_t address;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
enum dma_data_direction dir;
|
enum dma_data_direction dir;
|
||||||
};
|
} __packed __aligned(4);
|
||||||
|
|
||||||
struct ccp_dm_workarea {
|
struct ccp_dm_workarea {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct dma_pool *dma_pool;
|
struct dma_pool *dma_pool;
|
||||||
unsigned int length;
|
|
||||||
|
|
||||||
u8 *address;
|
u8 *address;
|
||||||
struct ccp_dma_info dma;
|
struct ccp_dma_info dma;
|
||||||
|
unsigned int length;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ccp_sg_workarea {
|
struct ccp_sg_workarea {
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
int nents;
|
int nents;
|
||||||
|
unsigned int sg_used;
|
||||||
|
|
||||||
struct scatterlist *dma_sg;
|
struct scatterlist *dma_sg;
|
||||||
struct device *dma_dev;
|
struct device *dma_dev;
|
||||||
unsigned int dma_count;
|
unsigned int dma_count;
|
||||||
enum dma_data_direction dma_dir;
|
enum dma_data_direction dma_dir;
|
||||||
|
|
||||||
unsigned int sg_used;
|
|
||||||
|
|
||||||
u64 bytes_left;
|
u64 bytes_left;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue