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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 61ED9C433E1 for ; Thu, 18 Jun 2020 18:05:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35A39208C3 for ; Thu, 18 Jun 2020 18:05:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="iAm4hbN2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729796AbgFRSFb (ORCPT ); Thu, 18 Jun 2020 14:05:31 -0400 Received: from linux.microsoft.com ([13.77.154.182]:49410 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729599AbgFRSF1 (ORCPT ); Thu, 18 Jun 2020 14:05:27 -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 C614F20B4781; Thu, 18 Jun 2020 11:05:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C614F20B4781 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1592503527; bh=sL6hcuThhVlHuBMI1R5XXlVfp3rl8Nu7Pmmyg2na388=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iAm4hbN2nhtIGzZ5XO3MZc/TQ4Uy595TOYLca61C28dJBLuikMuWEbsF3kdqgVH6o JIpd5S5cPLiGdO8EQiNgoKQlOwGRH0CshPfdyrvc57dJ8hunRPIBaNhE8vdaT8o6v6 LGaiFOKsn8mTPE7rnd9lspXZxBVgZfCHcO/ZGIHA= Subject: Re: [PATCH 2/2] integrity: Add errno field in audit message To: Mimi Zohar , bauerman@linux.ibm.com, nayna@linux.ibm.com, 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 References: <20200617204436.2226-1-nramas@linux.microsoft.com> <20200617204436.2226-2-nramas@linux.microsoft.com> <1592502095.4615.42.camel@linux.ibm.com> From: Lakshmi Ramasubramanian Message-ID: <8b3c99b9-6691-5ae2-a287-a22a2c801c59@linux.microsoft.com> Date: Thu, 18 Jun 2020 11:05:22 -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: <1592502095.4615.42.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/20 10:41 AM, Mimi Zohar wrote: > > For the reasons that I mentioned previously, unless others are willing > to add their Reviewed-by tag not for the audit aspect in particular, > but IMA itself, I'm not comfortable making this change all at once. > > Previously I suggested making the existing integrity_audit_msg() a > wrapper for a new function with errno.  Steve said, "We normally do > not like to have fields that swing in and out ...", but said setting > errno to 0 is fine.  The original integrity_audit_msg() function would > call the new function with errno set to 0. If the original integrity_audit_msg() always calls the new function with errno set to 0, there would be audit messages where "res" field is set to "0" (fail) because "result" was non-zero, but errno set to "0" (success). Wouldn't this be confusing? In PATCH 1/2 I've made changes to make the "result" parameter to integrity_audit_msg() consistent - i.e., it is always an error code (0 for success and a negative value for error). Would that address your concerns? thanks, -lakshmi