Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3116534ybt; Mon, 22 Jun 2020 15:38:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4AWDL00hSZcAQDGGH+gPUW8oxmB7o16jfEvdPMNBmexoMYyjg5X+rjqGhfD9DDHUqzA0j X-Received: by 2002:a17:906:cd03:: with SMTP id oz3mr18644257ejb.391.1592865515596; Mon, 22 Jun 2020 15:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592865515; cv=none; d=google.com; s=arc-20160816; b=icWo4A3dj0OB1l95h9Qog1XhLFw1B7zo8Wg+LQ9YVW+i0Y1P/ByCMzjxtk90WT8bea lzLNqv4enAKXrWCd6qKYGhZ5z2Z856AucZOTCu/qMGSpUyxjS5gBb+16yQjMRFqo7OCq UCV15nM2yLtev8mdfys0vjcEa7EUptSvAMVdF22vw/Br3boZFhb+fkL9D1ItT4LmCfCv W3fngBGP/jSRB2OpAcDU1qMsiANR/RyCOHviCHW6N1d+NCj9lNjF3bklYRxl9Nohd+db R8ekg9Cwh/bANHXj6ThTJ3s2tpgGe0CpGlCHkxMnWD0Zc3vgyBdj+7+02sLnnWRrM2Pm OXsw== 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=6iB54NRtsZLrhU/mElkpfrgl3cf4Y26DsRgHPgtf1zM=; b=VR6zUatlS7sqyqGvJi76uHqm6HsmTgMsSkAxPge60tQiQHkkgqnAg9oNAv2TXFEVVC 7mu3VchG4eiMVVIQ1FyYswdikCfQk16M8n3u/KFpHhIc05slPieLmE3qx8oQbI142jmj SgoAPUZA1sdJI0pR7CTYb0ETOAwbBhttzq8mLk5tdoxaZ3Ic1qNIQK1lkoOTCUKJGl8S Shfo7JRYM0TeEt4tPxsZgfiuFe//Uyj+d80srcV8+lx2rzYso2NNNi96kMxf2iXfMCS3 76ql281eLADLaByyC9LrL4QNO6/FgxD3CqjzzRMlUOzP76Gq+5UtG904uuAvGPyUGykX I66g== 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 b15si9833859eje.741.2020.06.22.15.33.34; Mon, 22 Jun 2020 15:38:35 -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 S1731132AbgFVW2F (ORCPT + 99 others); Mon, 22 Jun 2020 18:28:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59932 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731046AbgFVW1q (ORCPT ); Mon, 22 Jun 2020 18:27:46 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05MM2OiS067839; Mon, 22 Jun 2020 18:27:44 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31tytuhyg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jun 2020 18:27:43 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05MMPkRX126086; Mon, 22 Jun 2020 18:27:43 -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 31tytuhyfh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jun 2020 18:27:43 -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 05MMOV2x029015; Mon, 22 Jun 2020 22:27:41 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 31sa37v1wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jun 2020 22:27:41 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05MMRdQg63635496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jun 2020 22:27:39 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4343B4C05A; Mon, 22 Jun 2020 22:27:39 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 338FF4C05E; Mon, 22 Jun 2020 22:27:38 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.202.125]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 22 Jun 2020 22:27:38 +0000 (GMT) Message-ID: <1592864857.4987.48.camel@linux.ibm.com> Subject: Re: [PATCH v3 1/2] integrity: Add errno field in audit message From: Mimi Zohar To: Lakshmi Ramasubramanian , sgrubb@redhat.com, paul@paul-moore.com Cc: rgb@redhat.com, linux-integrity@vger.kernel.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Date: Mon, 22 Jun 2020 18:27:37 -0400 In-Reply-To: <20200618211012.2823-1-nramas@linux.microsoft.com> References: <20200618211012.2823-1-nramas@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: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-22_15:2020-06-22,2020-06-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 cotscore=-2147483648 lowpriorityscore=0 clxscore=1015 mlxscore=0 malwarescore=0 bulkscore=0 spamscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006220138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-06-18 at 14:10 -0700, Lakshmi Ramasubramanian wrote: > Error code is not included in the audit messages logged by > the integrity subsystem. > > Define a new function integrity_audit_message() that takes error code > in the "errno" parameter. Add "errno" field in the audit messages logged > by the integrity subsystem and set the value passed in the "errno" > parameter. > > [ 6.303048] audit: type=1804 audit(1592506281.627:2): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel op=measuring_key cause=ENOMEM comm="swapper/0" name=".builtin_trusted_keys" res=0 errno=-12 > > [ 7.987647] audit: type=1802 audit(1592506283.312:9): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=policy_update cause=completed comm="systemd" res=1 errno=0 > > [ 8.019432] audit: type=1804 audit(1592506283.344:10): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=measuring_kexec_cmdline cause=hashing_error comm="systemd" name="kexec-cmdline" res=0 errno=-22 > > Signed-off-by: Lakshmi Ramasubramanian > Suggested-by: Steve Grubb > Suggested-by: Mimi Zohar Thanks, Lakshmi.  Steve, Paul, because of the code changes, your tags were dropped. Mimi