Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a82cee3 authored by Hernán Gonzalez's avatar Hernán Gonzalez Committed by Mimi Zohar
Browse files

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: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
Tested-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
parent 0834136a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@
		       EVM_ALLOW_METADATA_WRITES)

extern int evm_initialized;
extern char *evm_hmac;
extern char *evm_hash;

#define EVM_ATTR_FSUUID		0x0001

+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ static DEFINE_MUTEX(mutex);

static unsigned long evm_set_key_flags;

static char * const evm_hmac = "hmac(sha1)";
static char * const evm_hash = "sha1";

/**
 * evm_set_key() - set EVM HMAC key from the kernel
 * @key: pointer to a buffer with the key data
+0 −2
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@ int evm_initialized;
static char *integrity_status_msg[] = {
	"pass", "pass_immutable", "fail", "no_label", "no_xattrs", "unknown"
};
char *evm_hmac = "hmac(sha1)";
char *evm_hash = "sha1";
int evm_hmac_attrs;

char *evm_config_xattrnames[] = {