Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2387880ybv; Fri, 14 Feb 2020 17:49:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyS038zZSrlyyB6jV9sXqd0OIWiHWthHUDkKuwH66cvT/awk7Z+Trcdyrk0ra312UashHkh X-Received: by 2002:a54:4595:: with SMTP id z21mr3854712oib.136.1581731351873; Fri, 14 Feb 2020 17:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581731351; cv=none; d=google.com; s=arc-20160816; b=BT8qsAxh3nc6Kd+zv12sybLzzNbcYl5iblTE7mH8pUFeeLE9/Vz1UC512lnJcqyfrj NoKtOC0yX7/Xe0vbV2AVqh94VKpRVrkj+y/Re9XSAC/791M9rkdDkA19JX6F3/J6hEsp W0oozTauWgVLAg902v5zYz1us+C1o5dyYJyj4g3XPatx0DEezPp6s9Yzb3W1jCxm8G44 CViQwRZ2ZeShTb9a8fWyCVTKO5lpameKTViNtuLkRnyOiiS6Uu3txCHPouUwdVVGgU8y 6Bm5nnxEgt3bh4RhUQetVEcCvp6wUoUXV0AG9QMy7qh6mMbDFww1ktiY1zgh+YM+FwlI Iyew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=gheApcamLsI0c+q9A7msGcmf+VN3q+eHMy9K2vxEMxQ=; b=BmmW1Kw1FVCNsKPIcz3GLFCAeht2sFsb2OAy9YaQdvzdJGtCyPWlOxT1GaehIA4V9e kjE/yGJ8ZtS8q9dhZk8cLNC7YAd31C1sW+4PBsyr6iQMoeD3rxkiN+fpdtkw/l/plC90 npKWsnDhXc7IrbxL5c4sqgRKNF11OxVON3+P+pVuTSarY3CRMx4TlTykU25V9skCL1W1 wqCrQB9ZPSmvzcPAgfnIE6hlXrq7rpJOF3oV7JySUHzYP95fVnYuEO1WfyKwZksvgCZG xRL4TY2eiRuw3CGorhNjx0Il/0WdOdovSC5UxYTLMHbYR+9+ByjeTorI/59nBNMRQpVL HTvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=hvL1YLAh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si3692534oif.92.2020.02.14.17.49.00; Fri, 14 Feb 2020 17:49:11 -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=@linux.microsoft.com header.s=default header.b=hvL1YLAh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbgBOBsP (ORCPT + 99 others); Fri, 14 Feb 2020 20:48:15 -0500 Received: from linux.microsoft.com ([13.77.154.182]:57484 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbgBOBrt (ORCPT ); Fri, 14 Feb 2020 20:47:49 -0500 Received: from tusharsu-Ubuntu.corp.microsoft.com (unknown [131.107.147.225]) by linux.microsoft.com (Postfix) with ESMTPSA id 46079200889D; Fri, 14 Feb 2020 17:47:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 46079200889D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1581731269; bh=gheApcamLsI0c+q9A7msGcmf+VN3q+eHMy9K2vxEMxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hvL1YLAhKmpNI7mEI19hcJDdmGUUbDOr1E0nINyUnuTAelZg7MI4mw9ONe+DseXpJ 2j8geTps/l9pkUN8H2guZcjxJs/zOUoBJAAST1hhtqkQ98ssNKLVxrL3epXttrtH1O fXtOsyTIF57B3D1KdNfH49IfOEQRN2SbQQ/qMLbk= 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 v4 2/3] IMA: Add log statements for failure conditions Date: Fri, 14 Feb 2020 17:47:08 -0800 Message-Id: <20200215014709.3006-3-tusharsu@linux.microsoft.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200215014709.3006-1-tusharsu@linux.microsoft.com> References: <20200215014709.3006-1-tusharsu@linux.microsoft.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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..aac1c44fb11b 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_devel("%s: failed, result: %d\n", __func__, ret); + return; } -- 2.17.1