Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2917950pxa; Tue, 18 Aug 2020 01:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPtYXTljUb/yPXdgX/YEoLxu8buEnPQqxMfMpQXHduxX6HsS8BOfDSqdKKZL3EqnsdM5Ay X-Received: by 2002:a17:906:3493:: with SMTP id g19mr19918705ejb.253.1597738448181; Tue, 18 Aug 2020 01:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597738448; cv=none; d=google.com; s=arc-20160816; b=qkExDW7zRizpAoIoM7nj73Cc9G9OYZDaoJTy6VUq06x3E+ejObuvGY9TEN9iTvp5uR zgCnvEYspY1MmF9Tv3/Z9BPDZDWilP1YgRcPYIGOZHg3aP00xgR0NnKP0JqhRnFVmWvW aAPhuRusXmmz/GV4u21fiXepGrlNztAL1j7Zl9RSluLg8Wi7sSpM2YHZPZdnAdqqtxGb tpPF4YfKoY1SWMkYIRsZoIUqR3UMPLDxDNhifdaOGVJr+pPPwvXhH+gp4E51OHDs9dyP kwxGd80qlbtGTaWZUbqxeLMVjct1KgkSTbDxBtmnUEg335z/t2Nn9gTEy2F5TzDBWshC Foow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DdGcuNH8trk/g3loq3Yr1AfL/eX4mzA4cS8+LEikW8Y=; b=OS09DPVKrFgkpMz88WEGDUwclwANX+RUp/jRnwuNEv9x8pzcZ8PzG+aFn4tQFyGDU8 IyPS53ulQtPyG/CEV9P6iNI27q+7460tEuf68n/E/NG8UH4BC5lAK+Vn4Hz7nyv0G8Cg oP5XQMEI5E0p+DUOLNEoKRY6OlQF6qcyDxY1riE7MrCYvGTITkke+GopEWdatktKLMon sks8bKIvlHrgEkPcn38fV1PtEeVX8b94fc11fV5QCb+6exlDd23nIZTs54UVZr5u25wS qKx2J/6jmOzrVsNG4yrddliUnSW0LvX5RJUa4z98IXDFqQFcqz55QkJrI82Xzk31R1IT JAjw== 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=sony.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si12242998ejx.474.2020.08.18.01.13.43; Tue, 18 Aug 2020 01:14:08 -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=sony.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726398AbgHRIL2 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Aug 2020 04:11:28 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:18255 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgHRIL1 (ORCPT ); Tue, 18 Aug 2020 04:11:27 -0400 Subject: Re: [PATCH v3 3/3] selinux: add permission names to trace event To: Stephen Smalley , =?UTF-8?Q?Thi=c3=a9baud_Weksteen?= , Paul Moore CC: Nick Kralevich , Steven Rostedt , Eric Paris , Ingo Molnar , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , , References: <20200817170729.2605279-1-tweek@google.com> <20200817170729.2605279-4-tweek@google.com> From: peter enderborg Message-ID: <6730ec4a-d11b-5c05-b64f-380104a86dab@sony.com> Date: Tue, 18 Aug 2020 10:11:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Content-Language: en-GB X-SEG-SpamProfiler-Analysis: v=2.3 cv=frmim2wf c=1 sm=1 tr=0 a=Jtaq2Av1iV2Yg7i8w6AGMw==:117 a=IkcTkHD0fZMA:10 a=y4yBn9ojGxQA:10 a=z6gsHLkEAAAA:8 a=meVymXHHAAAA:8 a=pGLkceISAAAA:8 a=1XWaLZrsAAAA:8 a=G-ZDcuA8YNwbPKHdF2YA:9 a=QEXdDO2ut3YA:10 a=d-OLMTCWyvARjPbQ-enb:22 a=2JgSa4NbpEOStq-L5dxp:22 X-SEG-SpamProfiler-Score: 0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/17/20 10:16 PM, Stephen Smalley wrote: > On 8/17/20 1:07 PM, Thiébaud Weksteen wrote: > >> From: Peter Enderborg >> >> In the print out add permissions, it will look like: >>      <...>-1042  [007] ....   201.965142: selinux_audited: >>      requested=0x4000000 denied=0x4000000 audited=0x4000000 >>      result=-13 >>      scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 >>      tcontext=system_u:object_r:bin_t:s0 >>      tclass=file permissions={ !entrypoint } >> >> This patch is adding the "permissions={ !entrypoint }". >> The permissions preceded by "!" have been denied and the permissions >> without have been accepted. >> >> Note that permission filtering is done on the audited, denied or >> requested attributes. >> >> Suggested-by: Steven Rostedt >> Suggested-by: Stephen Smalley >> Reviewed-by: Thiébaud Weksteen >> Signed-off-by: Peter Enderborg >> --- >>   include/trace/events/avc.h | 11 +++++++++-- >>   security/selinux/avc.c     | 36 ++++++++++++++++++++++++++++++++++++ >>   2 files changed, 45 insertions(+), 2 deletions(-) >> >> diff --git a/security/selinux/avc.c b/security/selinux/avc.c >> index 7de5cc5169af..d585b68c2a50 100644 >> --- a/security/selinux/avc.c >> +++ b/security/selinux/avc.c >> @@ -695,6 +695,7 @@ static void avc_audit_pre_callback(struct audit_buffer *ab, void *a) >>       audit_log_format(ab, " } for "); >>   } >>   + >>   /** >>    * avc_audit_post_callback - SELinux specific information >>    * will be called by generic audit code > > Also, drop the spurious whitespace change above. > > Is there any other things we need to fix? A part 1&2 now OK?