Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3738994ybv; Sun, 16 Feb 2020 04:42:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzcE6qIARlXsT07f6xDUz4xCahmQ0p6/72bsfF5Ehtvw8GmHt3GezWdB9K0zn8fegOa7wX1 X-Received: by 2002:aca:37c3:: with SMTP id e186mr7455010oia.155.1581856941991; Sun, 16 Feb 2020 04:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581856941; cv=none; d=google.com; s=arc-20160816; b=xdmHvh0lNO41lRCUJtzpF4aMxPoA8OiFpWkUw5w05VgnhltDqWW1UHGOdJ0SLVCD6C wo7+iTl2GfcV+vK2aguuu4mJxBzEMt6oXZD1TE8Mi250qlPQoFJHM0LJygkqyHRQXxfz kBfUG7RgUXsvp3OBKOtFF7/eJ36IUGYiDWixy4sVEA01Vs/tnnTVnGv4Gi+3oOVkT9AW sJEAtNJ5mjcUnUY7fnY/N2D0o3hwenUqV+lo36CHf/QRhCaZjjCR1jNSnooRkwmAJXLZ oX9ZYwKxdBfE0tLdsblAD5CLYOZPZQwCz7OZDxNBYoiPhBLjKFxxDxw2VvB4P5dC31RV jbSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=hVTS6w4RH+k+WXcPkfq7DCwGeOfACppymJUDqRKESn8=; b=E800ToYjAUBVSp9rxJ0RIsR3IEqHNBLzCYALjxv4vciSOlOFYt5wsh+c53718CBBUr 5pbxAMxeIn8iQ3drMvaQ3D9KaBF6TwM1JbU/Pj5LcvM1Icg0OHOZSnylcPdiKdXcnOz+ 3LFCW2ZiT2Eumo5SlVU0ZPReSDbvVNnCgSNjMaJVM7fwwviwstOHkVpiOzhjsTi6EC0/ oSAtZF9gFLtBD2cgODvcT9RjTOXJH1kctsNuliS8+uOIUvGhagO40ATk70aA6udbSxSB 5iCpJHuv+L4GCf7XD/03nL8k6s/psLj7Vo8Q+tSjbRcIQOtOHC/XuNN7Uf3FFIpXgEIK ld7Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si5614725otn.174.2020.02.16.04.42.10; Sun, 16 Feb 2020 04:42:21 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbgBPMlB (ORCPT + 99 others); Sun, 16 Feb 2020 07:41:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50102 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbgBPMlA (ORCPT ); Sun, 16 Feb 2020 07:41:00 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01GCZID3008488 for ; Sun, 16 Feb 2020 07:41:00 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y6buk79sh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 16 Feb 2020 07:40:59 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 16 Feb 2020 12:40:57 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 16 Feb 2020 12:40:54 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01GCerp441746562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Feb 2020 12:40:53 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E4FEAE04D; Sun, 16 Feb 2020 12:40:53 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E86BAE051; Sun, 16 Feb 2020 12:40:52 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.138.53]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sun, 16 Feb 2020 12:40:52 +0000 (GMT) Subject: Re: [PATCH v4 3/3] IMA: Remove duplicate pr_fmt definitions From: Mimi Zohar To: Tushar Sugandhi , joe@perches.com, skhan@linuxfoundation.org, linux-integrity@vger.kernel.org Cc: sashal@kernel.org, nramas@linux.microsoft.com, linux-kernel@vger.kernel.org Date: Sun, 16 Feb 2020 07:40:51 -0500 In-Reply-To: <20200215014709.3006-4-tusharsu@linux.microsoft.com> References: <20200215014709.3006-1-tusharsu@linux.microsoft.com> <20200215014709.3006-4-tusharsu@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 20021612-0020-0000-0000-000003AA9E7C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021612-0021-0000-0000-0000220291FF Message-Id: <1581856851.8515.169.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-16_02:2020-02-14,2020-02-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 clxscore=1015 phishscore=0 mlxscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002160115 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-02-14 at 17:47 -0800, Tushar Sugandhi wrote: > The #define for formatting log messages, pr_fmt, is duplicated in the > files under security/integrity. > > This change moves the definition to security/integrity/integrity.h and > removes the duplicate definitions in the other files under > security/integrity. A number of files under security/integrity, "pr_fmt" was not defined.  As a result of this patch, messages in those files did change.  Please include in this patch description a list of the updated messages.  This includes messages in iint.c and under integrity/evm. thanks, Mimi > > Signed-off-by: Tushar Sugandhi > Reviewed-by: Lakshmi Ramasubramanian > Suggested-by: Joe Perches > Suggested-by: Shuah Khan > --- > security/integrity/digsig.c | 2 -- > security/integrity/digsig_asymmetric.c | 2 -- > security/integrity/evm/evm_crypto.c | 2 -- > security/integrity/evm/evm_main.c | 2 -- > security/integrity/evm/evm_secfs.c | 2 -- > security/integrity/ima/ima_asymmetric_keys.c | 2 -- > security/integrity/ima/ima_crypto.c | 2 -- > security/integrity/ima/ima_fs.c | 2 -- > security/integrity/ima/ima_init.c | 2 -- > security/integrity/ima/ima_kexec.c | 1 - > security/integrity/ima/ima_main.c | 2 -- > security/integrity/ima/ima_policy.c | 2 -- > security/integrity/ima/ima_queue.c | 2 -- > security/integrity/ima/ima_queue_keys.c | 2 -- > security/integrity/ima/ima_template.c | 2 -- > security/integrity/ima/ima_template_lib.c | 2 -- > security/integrity/integrity.h | 6 ++++++ > 17 files changed, 6 insertions(+), 31 deletions(-) > > diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c > index ea1aae3d07b3..e9cbadade74b 100644 > --- a/security/integrity/digsig.c > +++ b/security/integrity/digsig.c > @@ -6,8 +6,6 @@ > * Dmitry Kasatkin > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c > index 55aec161d0e1..4e0d6778277e 100644 > --- a/security/integrity/digsig_asymmetric.c > +++ b/security/integrity/digsig_asymmetric.c > @@ -6,8 +6,6 @@ > * Dmitry Kasatkin > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c > index d485f6fc908e..35682852ddea 100644 > --- a/security/integrity/evm/evm_crypto.c > +++ b/security/integrity/evm/evm_crypto.c > @@ -10,8 +10,6 @@ > * Using root's kernel master key (kmk), calculate the HMAC > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c > index f9a81b187fae..d361d7fdafc4 100644 > --- a/security/integrity/evm/evm_main.c > +++ b/security/integrity/evm/evm_main.c > @@ -11,8 +11,6 @@ > * evm_inode_removexattr, and evm_verifyxattr > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/evm/evm_secfs.c b/security/integrity/evm/evm_secfs.c > index c11c1f7b3ddd..39ad1038d45d 100644 > --- a/security/integrity/evm/evm_secfs.c > +++ b/security/integrity/evm/evm_secfs.c > @@ -10,8 +10,6 @@ > * - Get the key and enable EVM > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_asymmetric_keys.c b/security/integrity/ima/ima_asymmetric_keys.c > index 7678f0e3e84d..aaae80c4e376 100644 > --- a/security/integrity/ima/ima_asymmetric_keys.c > +++ b/security/integrity/ima/ima_asymmetric_keys.c > @@ -9,8 +9,6 @@ > * create or update. > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include "ima.h" > > diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c > index 7967a6904851..423c84f95a14 100644 > --- a/security/integrity/ima/ima_crypto.c > +++ b/security/integrity/ima/ima_crypto.c > @@ -10,8 +10,6 @@ > * Calculates md5/sha1 file hash, template hash, boot-aggreate hash > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c > index 2000e8df0301..a71e822a6e92 100644 > --- a/security/integrity/ima/ima_fs.c > +++ b/security/integrity/ima/ima_fs.c > @@ -12,8 +12,6 @@ > * current measurement list and IMA statistics > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c > index 195cb4079b2b..567468188a61 100644 > --- a/security/integrity/ima/ima_init.c > +++ b/security/integrity/ima/ima_init.c > @@ -11,8 +11,6 @@ > * initialization and cleanup functions > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c > index 9e94eca48b89..121de3e04af2 100644 > --- a/security/integrity/ima/ima_kexec.c > +++ b/security/integrity/ima/ima_kexec.c > @@ -6,7 +6,6 @@ > * Thiago Jung Bauermann > * Mimi Zohar > */ > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > #include > #include > diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c > index aac1c44fb11b..9d0abedeae77 100644 > --- a/security/integrity/ima/ima_main.c > +++ b/security/integrity/ima/ima_main.c > @@ -15,8 +15,6 @@ > * and ima_file_check. > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c > index 453427048999..c334e0dc6083 100644 > --- a/security/integrity/ima/ima_policy.c > +++ b/security/integrity/ima/ima_policy.c > @@ -7,8 +7,6 @@ > * - initialize default measure policy rules > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include > diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c > index 1ce8b1701566..8753212ddb18 100644 > --- a/security/integrity/ima/ima_queue.c > +++ b/security/integrity/ima/ima_queue.c > @@ -15,8 +15,6 @@ > * ever removed or changed during the boot-cycle. > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include "ima.h" > diff --git a/security/integrity/ima/ima_queue_keys.c b/security/integrity/ima/ima_queue_keys.c > index c87c72299191..cb3e3f501593 100644 > --- a/security/integrity/ima/ima_queue_keys.c > +++ b/security/integrity/ima/ima_queue_keys.c > @@ -8,8 +8,6 @@ > * Enables deferred processing of keys > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include > #include "ima.h" > diff --git a/security/integrity/ima/ima_template.c b/security/integrity/ima/ima_template.c > index 6aa6408603e3..062d9ad49afb 100644 > --- a/security/integrity/ima/ima_template.c > +++ b/security/integrity/ima/ima_template.c > @@ -9,8 +9,6 @@ > * Helpers to manage template descriptors. > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include > #include "ima.h" > #include "ima_template_lib.h" > diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c > index 32ae05d88257..9cd1e50f3ccc 100644 > --- a/security/integrity/ima/ima_template_lib.c > +++ b/security/integrity/ima/ima_template_lib.c > @@ -9,8 +9,6 @@ > * Library of supported template fields. > */ > > -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > - > #include "ima_template_lib.h" > > static bool ima_template_hash_algo_allowed(u8 algo) > diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h > index 73fc286834d7..298b73794d8b 100644 > --- a/security/integrity/integrity.h > +++ b/security/integrity/integrity.h > @@ -6,6 +6,12 @@ > * Mimi Zohar > */ > > +#ifdef pr_fmt > +#undef pr_fmt > +#endif > + > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #include > #include > #include