Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4036941ybl; Mon, 3 Feb 2020 11:17:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxvw2GxhmFdVtIxlzHfEAJbULsHPmquL+/FnSwEU2MDyPHZs5pen6KGBxsaX4H/SsWW7xiU X-Received: by 2002:aca:cf07:: with SMTP id f7mr405691oig.5.1580757453359; Mon, 03 Feb 2020 11:17:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580757453; cv=none; d=google.com; s=arc-20160816; b=RxApairC9gJz0Mb3ZjeJsDJ/IywMAmqNaFR+A/jnbVZfJNn6IRl0k+Sa4TjUis2CeY wl3MGlnxG1ykMrwvrcT+aVUWhT0LMSX7Q2H/tYENBPPTKiiWtjbc7H46aasmcbuGSae3 6uXzHmlRsajaRBgqE7uYuj1QcWHyW1NITvShOlvnTKlDn4pvbPjF+hXsyAKM7RpfAMzg RfWw30ILCLLh2EGS9czhS5xCvarep2QGLjb99adlNeLqUn9uuOjJJKctgqkfNTTh9n5T gVBVrS5LZ70tD+xJdp1YxG1izQDC9+FbECbU844zaoyhPyV1POyEIjwlFhpS7h1uejgD vYaA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ErJjOAXCt0KEHKIPakEtncelMJpRVmf4EoDGnP6sGLA=; b=DdC7LIaPLhnKQSX3SDq1hm8N4H2zJ6ax7gBbiOZlBzixHS85Vqjl0H6FI+Hzro7H/g ncm4kfNWn5NUPn0dRfDhQSE69DfPv7c5WIf7ESEpHFB2cqPXew1vaCcC3JItJbkBoAer q16eRo5TZOhvj3JqFfSgC03WPTO+35y2ABb/63IxZt5AkxffXrRsURzADnDvqmZFb9qA n9xiJdvJ41zNcOsWtohw3HB0pWbb173wpcHFwOYGh5WxF4GQiN02UEW9JbIQGARVURQD o0/o9UYcvwQjpYlTfW1lv2oLD4h4vwyvES5ZSJIUE0pu+CQ8Jx0DMkHj7tntY2B0E5eu 8TfA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si10471665otu.166.2020.02.03.11.17.21; Mon, 03 Feb 2020 11:17:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727164AbgBCTEL (ORCPT + 99 others); Mon, 3 Feb 2020 14:04:11 -0500 Received: from smtprelay0024.hostedemail.com ([216.40.44.24]:50008 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727073AbgBCTEL (ORCPT ); Mon, 3 Feb 2020 14:04:11 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 94C4D8383F91; Mon, 3 Feb 2020 19:04:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2892:2894:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4031:4321:5007:6119:7903:9040:10004:10400:11232:11658:11914:12043:12048:12296:12297:12740:12760:12895:13069:13095:13311:13357:13439:14659:14721:21080:21212:21324:21433:21451:21611:21627:21740:30054:30070:30075:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: cloth99_5e4a75d69f62c X-Filterd-Recvd-Size: 3039 Received: from XPS-9350.home (unknown [47.151.135.224]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Mon, 3 Feb 2020 19:04:07 +0000 (UTC) Message-ID: <94cf0aee8fd8b78718e252488458cfea105c0469.camel@perches.com> Subject: Re: [PATCH] security/integrity: Include __func__ in messages for easier debug From: Joe Perches To: Shuah Khan , Mimi Zohar , jmorris@namei.org, serge@hallyn.com, mpe@ellerman.id.au, erichte@linux.ibm.com, nayna@linux.ibm.com, yuehaibing@huawei.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 03 Feb 2020 11:02:57 -0800 In-Reply-To: <475ab05c-300b-fdbe-5de0-6fce8d1a360d@linuxfoundation.org> References: <20200130020129.15328-1-skhan@linuxfoundation.org> <1580736077.5585.4.camel@linux.ibm.com> <475ab05c-300b-fdbe-5de0-6fce8d1a360d@linuxfoundation.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-02-03 at 11:55 -0700, Shuah Khan wrote: > On 2/3/20 6:21 AM, Mimi Zohar wrote: > > On Wed, 2020-01-29 at 19:08 -0800, Joe Perches wrote: > > > On Wed, 2020-01-29 at 19:01 -0700, Shuah Khan wrote: > > > > Change messages to messages to make it easier to debug. The following > > > > error message isn't informative enough to figure out what failed. > > > > Change messages to include function information. > > > > > > > > Signed-off-by: Shuah Khan > > > > --- > > > > .../integrity/platform_certs/load_powerpc.c | 14 ++++++++------ > > > > security/integrity/platform_certs/load_uefi.c | 17 ++++++++++------- > > > > 2 files changed, 18 insertions(+), 13 deletions(-) > > > > > > > > diff --git a/security/integrity/platform_certs/load_powerpc.c b/security/integrity/platform_certs/load_powerpc.c > > > > > > perhaps instead add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > so all the pr_ logging is more specific. > > > > > > This would prefix all pr_ output with "integrity: " > > Joe! Sorry for the delay in getting back to you. > > > Agreed. Joe, could you post a patch with a proper patch description > > for this? > > > > I have been looking into this a bit more and there is an opportunity > here to add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt to integrity.h > and get rid of duplicate defines. That might work but: $ git grep --name-only 'integrity\.h' security | xargs grep pr_fmt security/integrity/digsig.c:#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt security/integrity/digsig_asymmetric.c:#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt security/integrity/evm/evm_main.c:#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt security/security.c:#define pr_fmt(fmt) "LSM: " fmt Here security.c already uses "LSM: " Does anyone care about the LSM: prefix?