Received: by 10.223.185.116 with SMTP id b49csp5485412wrg; Tue, 27 Feb 2018 14:18:59 -0800 (PST) X-Google-Smtp-Source: AH8x226vVfJffOnajWB0hoNvMLSVq5hJ4anpCpXTS6waAd1SxXT8Kwysvhj/jfdYqJ9bClB1u4QQ X-Received: by 10.99.64.197 with SMTP id n188mr12429666pga.21.1519769939482; Tue, 27 Feb 2018 14:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519769939; cv=none; d=google.com; s=arc-20160816; b=yxFVj4nJUMy0HZIde202k/AIYRQqeB33bRlhQhix3pRMeQEtmsng1Pi3Zsnmm7plN7 QPHFpl1Rt0u5gbU7exZXd3UwAY6yp2DPtN705QgZER/Ufi6Dsavt22m/b2MTDfgGXH9P iMR8wWfMabIAbBVr/gYCpHxfRNvd+0QCfHpiKSsNf/0bKCYOrrg+SlIem3Igv+hyPzCW t2BQLiWiTgjrepgj+hyR5DBQ1AKF7HNcypbExXUZO9QhPnX6fD0uJZ8yq3wte6L3xXxc 0vkN8SLz21LRG2dgdIOUOr/O4c3Vsgnxors7N7Q9JVD6U31K0i+wxkK0Es4tbNZbvFUo ufGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=KPMA9YUQmzhb+057hTy0QkFnqENcvE38R7AfK/qwdpc=; b=v19mRpXWmhOj/O0ZoEXFWgzW8HYXQAjNeL6UzDyxidt6id2JoQZ45/E9NnNuUFovW1 cpczjlrJWSEHNSn9TDpjM2of62CNBreg7xMyeEQelzm9LDfOZlm/ofZxpd7YA4PVnRVg Th1K2IqePZYwjuvnAir6lIGNztvMh0MGs1Io8bAObFn5+ppdjkJ8JNZdHzzfv91Q8X4T JV9tlCbldd+fPxxvLgBsn3AAoSi332jr2RK4fANGHl/k3doi9u+d9HFnelTPdJ25+DmA +kfjIjrdbk9XB2xWL2PqWAAHsWlYbpoq69yji6KMvIgYuDIFWFoxP52CVvqdgryb2IQM BjHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=tNary6D0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8-v6si157660plm.9.2018.02.27.14.18.44; Tue, 27 Feb 2018 14:18:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=tNary6D0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972AbeB0WRY (ORCPT + 99 others); Tue, 27 Feb 2018 17:17:24 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:36034 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbeB0WRV (ORCPT ); Tue, 27 Feb 2018 17:17:21 -0500 Received: by mail-qk0-f194.google.com with SMTP id d206so586089qkb.3 for ; Tue, 27 Feb 2018 14:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KPMA9YUQmzhb+057hTy0QkFnqENcvE38R7AfK/qwdpc=; b=tNary6D0IMv1sVdCehtKdzdx1q9FL1CKtS0/OgvBK/P8dRtE2CDEUGYXehN4GeDI9I OMBS3m2u8E0agRByf+f9DxtzuOgLu9XGL/Rt2My5LcZKTpGI8noc0gjJqEBdnoBckU0s 0AeBzy+pzZSyv/QbbKMZ2ecU07r495lZMTW7soCMErxFmB5udDnSHlrw5AHQUDPdrOKz XEV0RJoU6sjp5nfUXeHn91sDvTBr8UA0P5T7ujQpU7CqmDydiHHsIytgS6phAM8kXEIo eCbmFiYzgAKcqDDzNdScUXkX/3xdRrjY9QAIZq/kQg/D55ju4A/mZhPCYgHD0KQj/axn jMtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KPMA9YUQmzhb+057hTy0QkFnqENcvE38R7AfK/qwdpc=; b=SBx2A6d8yr7vAaEkYtXCD8UZHqZMOAoM0lNQTkvVxAGW/O3qD2sK6rMtGHzNJvSMl/ 0YLfjxGlrlMV3rV4fZKf/nV31pEoJhu/WTi3BaUbQYmKj6XEi87865JeAzYVhlge8Zpb 17qQ9eQvAUqZ+zTq/2t2OwiUgTuMhv/5td9PF+Pru22QYlWyxkJp20z/cDVscH0+tLb3 GSQnEULqNQ3eZTkS/837hNZBTp4tENP/ChK0Nh+oq9aUmtT4Li50PvIwjjz/jzAfBXg1 YJqmutSWORpNs9pywP3M8CJSM18yJV/mOCDon0U62c/hPq60AZ970TH52LhvPKywyrng h3Ow== X-Gm-Message-State: APf1xPARHtD7LyxFKRt1rIK/xOBjU5ZvoP/UoDkH0baFsx3Coew1wWR6 ygmISVBl50sNemhLkEaRCeLD2g== X-Received: by 10.55.87.134 with SMTP id l128mr23985087qkb.162.1519769841143; Tue, 27 Feb 2018 14:17:21 -0800 (PST) Received: from hlaptop.cpe.express.com.ar ([200.3.222.253]) by smtp.gmail.com with ESMTPSA id j64sm137461qkc.22.2018.02.27.14.17.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 14:17:20 -0800 (PST) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: zohar@linux.vnet.ibm.com, jmorris@namei.org, serge@hallyn.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, hernan@vanguardiasur.com.ar Subject: [PATCH 1/2] security: evm: Move evm_hmac and evm_hash from evm_main.c to evm_crypto.c Date: Tue, 27 Feb 2018 19:16:59 -0300 Message-Id: <1519769820-20365-1-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Note: This is compile only tested. This variable was not used where it was defined, there was no point in declaring it there as extern, thus it got moved and constified saving up 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 --- security/integrity/evm/evm.h | 2 -- security/integrity/evm/evm_crypto.c | 3 +++ 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 0482539..45c4a89 100644 --- a/security/integrity/evm/evm.h +++ b/security/integrity/evm/evm.h @@ -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 diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c index 691f3e0..fdde9cb 100644 --- a/security/integrity/evm/evm_crypto.c +++ b/security/integrity/evm/evm_crypto.c @@ -37,6 +37,9 @@ static DEFINE_MUTEX(mutex); static unsigned long evm_set_key_flags; +char * const evm_hmac = "hmac(sha1)"; +char * const evm_hash = "sha1"; + /** * evm_set_key() - set EVM HMAC key from the kernel * @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 a8d5028..826926d 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c @@ -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[] = { -- 2.7.4