Skip to content

Commit

Permalink
crypto: aes-generic - unexport last-round AES tables
Browse files Browse the repository at this point in the history
The versions of the AES lookup tables that are only used during the last
round are never used outside of the driver, so there is no need to
export their symbols.

Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and herbertx committed Jul 26, 2019
1 parent 571c47a commit 1e25ca0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions crypto/aes_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ __visible const u32 crypto_ft_tab[4][256] ____cacheline_aligned = {
}
};

__visible const u32 crypto_fl_tab[4][256] ____cacheline_aligned = {
static const u32 crypto_fl_tab[4][256] ____cacheline_aligned = {
{
0x00000063, 0x0000007c, 0x00000077, 0x0000007b,
0x000000f2, 0x0000006b, 0x0000006f, 0x000000c5,
Expand Down Expand Up @@ -856,7 +856,7 @@ __visible const u32 crypto_it_tab[4][256] ____cacheline_aligned = {
}
};

__visible const u32 crypto_il_tab[4][256] ____cacheline_aligned = {
static const u32 crypto_il_tab[4][256] ____cacheline_aligned = {
{
0x00000052, 0x00000009, 0x0000006a, 0x000000d5,
0x00000030, 0x00000036, 0x000000a5, 0x00000038,
Expand Down Expand Up @@ -1121,9 +1121,7 @@ __visible const u32 crypto_il_tab[4][256] ____cacheline_aligned = {
};

EXPORT_SYMBOL_GPL(crypto_ft_tab);
EXPORT_SYMBOL_GPL(crypto_fl_tab);
EXPORT_SYMBOL_GPL(crypto_it_tab);
EXPORT_SYMBOL_GPL(crypto_il_tab);

/**
* crypto_aes_set_key - Set the AES key.
Expand Down
2 changes: 0 additions & 2 deletions include/crypto/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ struct crypto_aes_ctx {
};

extern const u32 crypto_ft_tab[4][256] ____cacheline_aligned;
extern const u32 crypto_fl_tab[4][256] ____cacheline_aligned;
extern const u32 crypto_it_tab[4][256] ____cacheline_aligned;
extern const u32 crypto_il_tab[4][256] ____cacheline_aligned;

int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len);
Expand Down

0 comments on commit 1e25ca0

Please sign in to comment.