diff options
author | Hernán Gonzalez <hernan@vanguardiasur.com.ar> | 2018-02-27 17:16:59 -0500 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2018-03-23 06:31:37 -0400 |
commit | 1a82cee3e69d8dc89dc2e9995770e7cab0a4c9d8 (patch) | |
tree | 1817a71aafa5c945a1d8f7e316c0580ab0b88412 | |
parent | 0834136aeaf0e79fc428bfae78340e16719a2a20 (diff) |
evm: Move evm_hmac and evm_hash from evm_main.c to evm_crypto.c
These variables are not used where they are was defined. There is no
point in declaring them there as extern. Move and constify them, saving
2 bytes.
Function old new delta
init_desc 273 271 -2
Total: Before=2112094, After=2112092, chg -0.00%
Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
-rw-r--r-- | security/integrity/evm/evm.h | 2 | ||||
-rw-r--r-- | security/integrity/evm/evm_crypto.c | 3 | ||||
-rw-r--r-- | security/integrity/evm/evm_main.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/security/integrity/evm/evm.h b/security/integrity/evm/evm.h index 04825393facb..45c4a89c02ff 100644 --- a/security/integrity/evm/evm.h +++ b/security/integrity/evm/evm.h | |||
@@ -31,8 +31,6 @@ | |||
31 | EVM_ALLOW_METADATA_WRITES) | 31 | EVM_ALLOW_METADATA_WRITES) |
32 | 32 | ||
33 | extern int evm_initialized; | 33 | extern int evm_initialized; |
34 | extern char *evm_hmac; | ||
35 | extern char *evm_hash; | ||
36 | 34 | ||
37 | #define EVM_ATTR_FSUUID 0x0001 | 35 | #define EVM_ATTR_FSUUID 0x0001 |
38 | 36 | ||
diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c index 691f3e09154c..a46fba322340 100644 --- a/security/integrity/evm/evm_crypto.c +++ b/security/integrity/evm/evm_crypto.c | |||
@@ -37,6 +37,9 @@ static DEFINE_MUTEX(mutex); | |||
37 | 37 | ||
38 | static unsigned long evm_set_key_flags; | 38 | static unsigned long evm_set_key_flags; |
39 | 39 | ||
40 | static char * const evm_hmac = "hmac(sha1)"; | ||
41 | static char * const evm_hash = "sha1"; | ||
42 | |||
40 | /** | 43 | /** |
41 | * evm_set_key() - set EVM HMAC key from the kernel | 44 | * evm_set_key() - set EVM HMAC key from the kernel |
42 | * @key: pointer to a buffer with the key data | 45 | * @key: pointer to a buffer with the key data |
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index a8d502827270..826926da7395 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -33,8 +33,6 @@ int evm_initialized; | |||
33 | static char *integrity_status_msg[] = { | 33 | static char *integrity_status_msg[] = { |
34 | "pass", "pass_immutable", "fail", "no_label", "no_xattrs", "unknown" | 34 | "pass", "pass_immutable", "fail", "no_label", "no_xattrs", "unknown" |
35 | }; | 35 | }; |
36 | char *evm_hmac = "hmac(sha1)"; | ||
37 | char *evm_hash = "sha1"; | ||
38 | int evm_hmac_attrs; | 36 | int evm_hmac_attrs; |
39 | 37 | ||
40 | char *evm_config_xattrnames[] = { | 38 | char *evm_config_xattrnames[] = { |