Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp656486pxu; Fri, 11 Dec 2020 11:00:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxawwqJybjmC195jLa+LDXGFV+LSQ7FSY23obL6qS4H+JBpMWvfmUTqOTh7buAaK59hytpJ X-Received: by 2002:a05:6402:491:: with SMTP id k17mr13300037edv.370.1607713200661; Fri, 11 Dec 2020 11:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607713200; cv=none; d=google.com; s=arc-20160816; b=TxJmLa2oSMFkuaoJQSKxwwlxbiaPXaObkiPtRlAZZ3mkof/cgB9pjI7DSOLbYEnBUT 2+JR0XNefVKE3/RYDK+OJlTeGQaSGPsnHTa3/nYzxDvZ1vMeIOgKwej62rn/AtUpKJTq BMc0hsFgwMaFo5Rth+nLTnMuselNAf1cu+JApmY9CnNV7hbcyzL5c4lK3Je7lb47sdt+ TMvZH9EdDYtYB5g/hE6LrLkJgRY15c+l+ayTOgAXrkfLz8W1vQxbWhf4o9zxUmfijm+H VzDm4FmMDVY6EjuBUn4Y9mjSKIJDMiZHvCa6/9lAD4G74ks7ay1YIBhYPyAdQDdCnlDc VEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=Hk+1o6qAUkRmm64fM9bJ/clQ0i7hDtiKdMK/UvrH55s=; b=zNQbIT9/kVJr04wcIvJ8yP3YdPrkaYFChwenXu9s4aJLs4KUvER9ndL+UxXtpr5OtV WuPC4CjzmwnqXnaiurjMM15Msc+ZcoLXti78LkpU5WXAX4eeBeoHP2yrJa+DbqNLcwpU Y8FJI8Z59s3RK0OGO+86VWewR6JG5Pd8zd0BglP8uVW9ZP9+3zX1APO3B++/qWFOAg1a Pns6b1hskaHjvtonWJVnknxeTsjUOxfg745ebwpf2ohwrCE1AfFiZDohAu8T1JV15r8L stCKdIZawiYdaRtaiap7ax4UjRQ9aB30nAdoJCuZY4h0Dbam8aNiPRMFrm6UQCpjNhZo Ph3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=j7w4kZQD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h14si5324133eje.325.2020.12.11.10.59.37; Fri, 11 Dec 2020 11:00:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=j7w4kZQD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2395246AbgLKR3N (ORCPT + 99 others); Fri, 11 Dec 2020 12:29:13 -0500 Received: from linux.microsoft.com ([13.77.154.182]:33958 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394616AbgLKR2x (ORCPT ); Fri, 11 Dec 2020 12:28:53 -0500 Received: from [192.168.86.31] (c-71-197-163-6.hsd1.wa.comcast.net [71.197.163.6]) by linux.microsoft.com (Postfix) with ESMTPSA id 1616220B717A; Fri, 11 Dec 2020 09:28:12 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1616220B717A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1607707692; bh=Hk+1o6qAUkRmm64fM9bJ/clQ0i7hDtiKdMK/UvrH55s=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=j7w4kZQDQ8Gvuat3uH0J0qoskfgEj4aQHWIxWqJqU8/B+7j1ul13OO27hzYKusDXB tPeW18Zc43ck5wwPkskxx9pTUoKXKvNKRZnNTwpJ7D/t2ANjBHoeXiGpxkfQQvXmD7 PUYSLBTZbDNmFs3EYvyfvZ3YWucpvLgkq1XHiAKU= Subject: Re: [PATCH v7 3/8] IMA: define a hook to measure kernel integrity critical data To: Tyler Hicks Cc: zohar@linux.ibm.com, stephen.smalley.work@gmail.com, casey@schaufler-ca.com, agk@redhat.com, snitzer@redhat.com, gmazyland@gmail.com, paul@paul-moore.com, sashal@kernel.org, jmorris@namei.org, nramas@linux.microsoft.com, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com References: <20201209194212.5131-1-tusharsu@linux.microsoft.com> <20201209194212.5131-4-tusharsu@linux.microsoft.com> <20201210230218.GH489768@sequoia> From: Tushar Sugandhi Message-ID: Date: Fri, 11 Dec 2020 09:28:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201210230218.GH489768@sequoia> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> + */ >> +void ima_measure_critical_data(const char *event_name, >> + const void *buf, int buf_len, >> + bool measure_buf_hash) >> +{ >> + if (!event_name || !buf || !buf_len) { >> + pr_err("Invalid arguments passed to %s().\n", __func__); > > This is a problem for the developer making use of the > ima_measure_critical_data() API and shouldn't be logged, IMO, because a > user/admin can do nothing about it. I think the error message should be > dropped. > Thanks Tyler. Will drop the message.