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=-17.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham 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 10370C3B187 for ; Tue, 11 Feb 2020 23:14:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C069C2082F for ; Tue, 11 Feb 2020 23:14:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="RY0jWAqc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727912AbgBKXO1 (ORCPT ); Tue, 11 Feb 2020 18:14:27 -0500 Received: from linux.microsoft.com ([13.77.154.182]:36386 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbgBKXO1 (ORCPT ); Tue, 11 Feb 2020 18:14:27 -0500 Received: from tusharsu-Ubuntu.corp.microsoft.com (unknown [131.107.147.225]) by linux.microsoft.com (Postfix) with ESMTPSA id A17422010ADD; Tue, 11 Feb 2020 15:14:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A17422010ADD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1581462866; bh=v/89WOXLO/d+H6Z62W0I37EIbuMATJH4Hf50Leyxn5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RY0jWAqcb4fz7CmUheh+dsU9vasyPY+GxNMUlo4eUA3evCoLB8XEnp6pn61v9CV28 Id/oORvPkvzZBBPWkCVkC+GTXn+gepgLuc71HxiNNN/xb9U4PEU1gMh5pMX7L6wlIP 6cyi53mF2dwvmaJpZQLmia11iqjGISgA+/A8rGj4= From: Tushar Sugandhi To: zohar@linux.ibm.com, joe@perches.com, skhan@linuxfoundation.org, linux-integrity@vger.kernel.org Cc: sashal@kernel.org, nramas@linux.microsoft.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] IMA: Add log statements for failure conditions. Date: Tue, 11 Feb 2020 15:14:13 -0800 Message-Id: <20200211231414.6640-3-tusharsu@linux.microsoft.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200211231414.6640-1-tusharsu@linux.microsoft.com> References: <20200211231414.6640-1-tusharsu@linux.microsoft.com> Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org process_buffer_measurement() does not have log messages for failure conditions. This change adds a log statement in the above function. Signed-off-by: Tushar Sugandhi Reviewed-by: Lakshmi Ramasubramanian Suggested-by: Joe Perches --- security/integrity/ima/ima_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 9fe949c6a530..6e1576d9eb48 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -757,6 +757,9 @@ void process_buffer_measurement(const void *buf, int size, ima_free_template_entry(entry); out: + if (ret < 0) + pr_err("%s: failed, result: %d\n", __func__, ret); + return; } -- 2.17.1