From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED9D5C47096 for ; Thu, 3 Jun 2021 17:48:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6752613E3 for ; Thu, 3 Jun 2021 17:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbhFCRuA (ORCPT ); Thu, 3 Jun 2021 13:50:00 -0400 Received: from linux.microsoft.com ([13.77.154.182]:37362 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbhFCRt7 (ORCPT ); Thu, 3 Jun 2021 13:49:59 -0400 Received: from nramas-ThinkStation-P520 (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id C024620B7178; Thu, 3 Jun 2021 10:48:14 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C024620B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1622742494; bh=/O+3cuUTwyhVTBRpRJNun3gW8d6RZECOYc6LABWyTOM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=sR0EiqivNr6/CHvpvyEaC0bb4nYshSaC7upldcWL9S0Mm74+dPRhcpfohglhJWniy OtEfViVOC1d6wRNBDeLqlyWcyYdELLwmAaFFUdvu8uKqRK3AQK7ujuxajecmjzRbLi 65H77bmVpXgS8c+1FPgzYpvECX1gIZ8+cXisMsGk= Message-ID: Subject: Re: [RFC PATCH 2/2] evm: output EVM digest calculation info needed for debugging From: nramas To: Mimi Zohar , linux-integrity@vger.kernel.org Cc: Roberto Sassu , Stefan Berger , Russell Coker Date: Thu, 03 Jun 2021 10:48:14 -0700 In-Reply-To: References: <20210603151819.242247-1-zohar@linux.ibm.com> <20210603151819.242247-3-zohar@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Thu, 2021-06-03 at 12:55 -0400, Mimi Zohar wrote: > > On Thu, 2021-06-03 at 09:34 -0700, nramas wrote: > > > +void evm_bin2hex_print(const char *prefix, const void *src, > > > size_t > > > count); > > > > > > > For evm_bin2hex_print() can we could do the following in evm.h? > > > > #ifdef DEBUG > > void evm_bin2hex_print(const char *prefix, const void *src, size_t > > count); > > #else > > void evm_bin2hex_print(const char *prefix, const void *src, size_t > > count) {} > > #endif /* DEBUG */ > > Yes, if we decide that it needs to be based on DEBUG, this would be > the > proper way of doing it. However, since there's nothing really > private > here, it's just displaying the security xattrs and other file > metadata, > should enabling/disabling the debugging be runtime > configurable? Kind > of like how print_hex_dump() relies on loglevel. Or should it be > more > granular? > I read "Documentation/admin-guide/dynamic-debug-howto.rst". I think dynamically enabling/disabling, like how print_hex_dump() does, would be better for evm_bin2hex_print() as well. thanks, -lakshmi