From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54DB7C433DF for ; Mon, 22 Jun 2020 22:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3937C2075A for ; Mon, 22 Jun 2020 22:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731140AbgFVW2F (ORCPT ); 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  From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91676C433E0 for ; Tue, 23 Jun 2020 02:36:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38A0320771 for ; Tue, 23 Jun 2020 02:36:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FQ9wP11z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38A0320771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592879789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YQvB28soo+D2XixASe72jq2AHUcSZZvpuhIs+1B2JGQ=; b=FQ9wP11zzszjD51krgrHELQBC1dak4kUty2kxTa8DvxY3SAzyZud4QWLFJQGHDYaoIvH3o bHHmVAKNoPP+f/ZFQ8C2oIL+DMjsPaGmUNsSZXDRMPYGebLqLTDgcZY9j0iVvDyPIUrSpL svzHBSAZDPcbg9kKzycf6onD1VCKznA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-IDVRTHzDMgGfEBmab1-XKQ-1; Mon, 22 Jun 2020 22:36:27 -0400 X-MC-Unique: IDVRTHzDMgGfEBmab1-XKQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1558107ACF6; Tue, 23 Jun 2020 02:36:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BBE35F9DC; Tue, 23 Jun 2020 02:36:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EFA2B180954D; Tue, 23 Jun 2020 02:36:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05MMRr0a002236 for ; Mon, 22 Jun 2020 18:27:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3832D215688E; Mon, 22 Jun 2020 22:27:53 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33D3C2156A54 for ; Mon, 22 Jun 2020 22:27:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2BA9280028B for ; Mon, 22 Jun 2020 22:27:50 +0000 (UTC) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-47-DidJV7N6MEuXrzj_Dr7gbQ-1; Mon, 22 Jun 2020 18:27:44 -0400 X-MC-Unique: DidJV7N6MEuXrzj_Dr7gbQ-1 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 05MM2Pui067897; 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 31tytuhyg2-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 05MMPkRY126086; 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 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> Mime-Version: 1.0 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 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id 05MM2Pui067897 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 05MMRr0a002236 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Mon, 22 Jun 2020 22:36:20 -0400 Cc: rgb@redhat.com, linux-integrity@vger.kernel.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 T24gVGh1LCAyMDIwLTA2LTE4IGF0IDE0OjEwIC0wNzAwLCBMYWtzaG1pIFJhbWFzdWJyYW1hbmlh biB3cm90ZToKPiBFcnJvciBjb2RlIGlzIG5vdCBpbmNsdWRlZCBpbiB0aGUgYXVkaXQgbWVzc2Fn ZXMgbG9nZ2VkIGJ5Cj4gdGhlIGludGVncml0eSBzdWJzeXN0ZW0uCj4gCj4gRGVmaW5lIGEgbmV3 IGZ1bmN0aW9uIGludGVncml0eV9hdWRpdF9tZXNzYWdlKCkgdGhhdCB0YWtlcyBlcnJvciBjb2Rl Cj4gaW4gdGhlICJlcnJubyIgcGFyYW1ldGVyLiBBZGQgImVycm5vIiBmaWVsZCBpbiB0aGUgYXVk aXQgbWVzc2FnZXMgbG9nZ2VkCj4gYnkgdGhlIGludGVncml0eSBzdWJzeXN0ZW0gYW5kIHNldCB0 aGUgdmFsdWUgcGFzc2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