Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2459212ybg; Fri, 5 Jun 2020 14:38:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR6+N/n+jOAZUQzckwuD0trZ0Ydv3/eLIKBik7UC2qUAheBD50Gca7Jbxd4m+ux2qI/Pet X-Received: by 2002:a05:6402:3c1:: with SMTP id t1mr11471343edw.350.1591393112410; Fri, 05 Jun 2020 14:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591393112; cv=none; d=google.com; s=arc-20160816; b=0uHKTYH7FQur2ARDWsidUd47XM2l457+QNYPh1Orh4ODxc5VJEr9WVKtyJLu/I/4BZ s1wuec2XA0c/JTObXQiPlh6Vh7lKqHi7MW+bK/C9uLrVsPNL4x3zWSxRvy2ik98owA+s NntFAAyCcclCkeJRdnQUc5l8EsQIVmUiwKNhhRr1xJUngKd+0ZkHTjIwVFEZd6Jed0uy BaXZMzPQMdF+X7YIdg2iOFEODTpMz1lH6DOAZ/6eE74lZGg3pGhYLAZBG0cDPyDTPlRN CnCWoj3gkFP6VYgcIEp2hmAekcAz/z6HroG8y2eZGt3twed77/3Ri2A9Yy5/KSBJK3wT BTfw== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Gvn41e4TsVAN3Cs8MsulzbSsru6irvhKECe6/Xk3tPU=; b=IBzhooFPDgn2OrsLgAR2De+JyGmFtDrz+WlQGDR/tl47Mv2wuFjqy8dv8pUxF+ULu9 TyOEgjbE05QGheXjQVO7Y8ZRqVY7AM2rC+9H711aD1D8io2HXB3LxjorCjvMPs3BcFvQ qaH12FQCtSzK5lxNpFuq1yqchcF4tqvnrpfjkb4v51am26GqCG421kCGvLt7h3R54tBu lcBoajNqAvywHwqeyZ0n0Cnj4TP1ICoLbNEGQ1yb8++2IVC+xySdfc2r0ZMj/gTfhOKk wRWS/XHnNiAvkVbww5Tz3XiSPHw2vhY3dcJbO3U+ltjMrW9yfpEhkQG/bCYe/9B0gKIE cxMw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si4188407eja.118.2020.06.05.14.38.09; Fri, 05 Jun 2020 14:38:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728552AbgFEVen (ORCPT + 99 others); Fri, 5 Jun 2020 17:34:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:64890 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728323AbgFEVem (ORCPT ); Fri, 5 Jun 2020 17:34:42 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 055LWl6m155451; Fri, 5 Jun 2020 17:34:40 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31fr7rta5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jun 2020 17:34:40 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 055LWs8r156433; Fri, 5 Jun 2020 17:34:39 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 31fr7rta52-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jun 2020 17:34:39 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 055LGgRe006768; Fri, 5 Jun 2020 21:34:37 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 31bf484xr4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jun 2020 21:34:37 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 055LYZij65536072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Jun 2020 21:34:35 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F38F8AE045; Fri, 5 Jun 2020 21:34:34 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11EE5AE055; Fri, 5 Jun 2020 21:34:34 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.234.64]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 5 Jun 2020 21:34:33 +0000 (GMT) Message-ID: <1591392867.4615.20.camel@linux.ibm.com> Subject: Re: [PATCH] IMA: Add log statements for failure conditions From: Mimi Zohar To: Lakshmi Ramasubramanian , Paul Moore Cc: linux-integrity@vger.kernel.org, tusharsu@linux.microsoft.com, linux-kernel@vger.kernel.org, linux-audit@redhat.com Date: Fri, 05 Jun 2020 17:34:27 -0400 In-Reply-To: <48ff60f1-df93-5ce7-a254-8bfd1dba2ade@linux.microsoft.com> References: <20200604163243.2575-1-nramas@linux.microsoft.com> <1591382782.5816.36.camel@linux.ibm.com> <8dfb3fa6-5c1f-d644-7d21-72a9448c52cc@linux.microsoft.com> <48ff60f1-df93-5ce7-a254-8bfd1dba2ade@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-05_07:2020-06-04,2020-06-05 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 cotscore=-2147483648 suspectscore=0 spamscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006050157 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-06-05 at 14:09 -0700, Lakshmi Ramasubramanian wrote: > 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); Yes, AUDIT_INTEGRITY_PCR is also used for failures to add to the measurement list. thanks, Mimi