Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2442605ybg; Fri, 5 Jun 2020 14:11:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz32ejshPSb0F+v07FriKYDiDZ1XZfV0I0QRBhv9/VNOBfftQdk0I2N1wClOe9oxdmAaOlz X-Received: by 2002:a50:8467:: with SMTP id 94mr10933158edp.249.1591391499584; Fri, 05 Jun 2020 14:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591391499; cv=none; d=google.com; s=arc-20160816; b=uu0BhHvA9U6Y4eOIYW565kDeWvrFIHmEBabw77MsysEgZJKp4hY9lPfUnfstXVyfNJ axp8D4dZp2sXu1N+Fd8fc8GXiwIJN/CMuiVP1QMd0XGgP11BDKn63E8rpJMoO9vUlejR Qj09dUl/HDJyHuIF9P3kUOf7oj0qTU/wua3KJ558iNewvDLA9R7irzJvEc/Gw4yFwVmU vtMtR5kFDcBOtaWMvjRKpZyboLIjTVV0jbyYR7pp8y0lOfdwyE9RjV063o1Nz7xPI4ZM bCI6fdNVUUjhmDfxVONIOSb8eKs7RMwCwqIjgCjBXlU/moQRNHQ6U+XAJbqLVWdOfC1g zuvw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=i39FaZtY2X+kPAkTUw9+JdMbvXH6kXdMemItCH/9QYg=; b=l9aJFFQiw/vj6VUaoYUhCwWqaNZQT1JwHeHzpNL8Y9N4tNe4/oWT8C2VJgm+5SASBL 6tmxQSAWX9VpaGc9I3ZP+XFHWZrzcPwRCyozp/JQvgOJhroY3GFE14/r7E2Ag5YyJ7wh 0As0gyQr6JvbfBk/nthPgyXxR5AmaI2Jo9rWt7/SrUlsL2Hd+w6+GImMzIXXZx/KKAz8 rpQLfSbj8LAjtehfX5DRNIQNJ8A0bqqLid8dGVyROiWRBUdi6xWttlm2apLQsLlaOA2R C8LwU2N/PoQu9RKiWuFd/4/B66OOt+e+eC4fpq0LTwpSOsqEyx03bRANHW3s9DFuqzVd X28Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=H8+UL+o0; 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 u23si4335516ejx.512.2020.06.05.14.11.14; Fri, 05 Jun 2020 14:11:39 -0700 (PDT) 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=H8+UL+o0; 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 S1728198AbgFEVJK (ORCPT + 99 others); Fri, 5 Jun 2020 17:09:10 -0400 Received: from linux.microsoft.com ([13.77.154.182]:57316 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727888AbgFEVJK (ORCPT ); Fri, 5 Jun 2020 17:09:10 -0400 Received: from [192.168.0.104] (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id 921A220B7185; Fri, 5 Jun 2020 14:09:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 921A220B7185 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1591391349; bh=i39FaZtY2X+kPAkTUw9+JdMbvXH6kXdMemItCH/9QYg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=H8+UL+o0s1ovdZmsSenHvljW70R+sD7tC/FyO+IktV1H/0jkcnoL6TxRShse5RtBx TnDqTHhp0IPI4e4ox1kS+pXCGj5yrduev0crKSSIqJkIltRXf7V5s8ws0KXQWa3NHv HfNSFN/I5lFhmpQ2uW1B5fGVjDejG/lq5j/4PZrE= Subject: Re: [PATCH] IMA: Add log statements for failure conditions To: Paul Moore Cc: Mimi Zohar , linux-integrity@vger.kernel.org, tusharsu@linux.microsoft.com, linux-kernel@vger.kernel.org, linux-audit@redhat.com References: <20200604163243.2575-1-nramas@linux.microsoft.com> <1591382782.5816.36.camel@linux.ibm.com> <8dfb3fa6-5c1f-d644-7d21-72a9448c52cc@linux.microsoft.com> From: Lakshmi Ramasubramanian Message-ID: <48ff60f1-df93-5ce7-a254-8bfd1dba2ade@linux.microsoft.com> Date: Fri, 5 Jun 2020 14:09:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/5/20 1:49 PM, Paul Moore wrote: > >> Since a pr_xyz() call was already present, I just wanted to change the >> log level to keep the code change to the minimum. But if audit log is >> the right approach for this case, I'll update. > > Generally we reserve audit for things that are required for various > security certifications and/or "security relevant". From what you > mentioned above, it seems like this would fall into the second > category if not the first. > > Looking at your patch it doesn't look like you are trying to record > anything special so you may be able to use the existing > integrity_audit_msg(...) helper. Of course then the question comes > down to the audit record type (the audit_msgno argument), the > operation (op), and the comm/cause (cause). > > Do you feel that any of the existing audit record types are a good fit for this? > Maybe I can use the audit_msgno "AUDIT_INTEGRITY_PCR" with appropriate strings for "op" and "cause". Mimi - please let me know if you think this audit_msgno would be ok to use. I see this code used, for instance, for boot aggregate measurement. integrity_audit_msg(AUDIT_INTEGRITY_PCR, NULL, boot_aggregate_name, op, audit_cause, result, 0); thanks, -lakshmi