From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ondrej Mosnacek Subject: [PATCH v3 0/4] Report raw context in AVCs + refactoring Date: Fri, 25 Jan 2019 11:06:47 +0100 Message-ID: <20190125100651.21753-1-omosnace@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E686C16EC2 for ; Fri, 25 Jan 2019 10:07:46 +0000 (UTC) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D9598C7A35 for ; Fri, 25 Jan 2019 10:07:45 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id 49so3458882wra.14 for ; Fri, 25 Jan 2019 02:07:45 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: selinux@vger.kernel.org, Paul Moore Cc: linux-audit@redhat.com, Stephen Smalley List-Id: linux-audit@redhat.com Changes in v3: - do some minor refactoring while there - move new fields to the end of the record - introduce a new security_sid_to_context_inval() function to get the raw context instead of (ab)using strcmp() to check if the raw context is different from the effective one v2: https://lore.kernel.org/selinux/20190121153605.26847-1-omosnace@redhat.com/T/ Changes in v2: - rename new fields to *rawcon v1: https://lore.kernel.org/selinux/20190118100429.11703-1-omosnace@redhat.com/T/ Ondrej Mosnacek (4): selinux: inline some AVC functions used only once selinux: replace some BUG_ON()s with a WARN_ON() selinux: remove some useless BUG_ONs selinux: log invalid contexts in AVCs security/selinux/avc.c | 159 +++++++++++++--------------- security/selinux/include/security.h | 3 + security/selinux/ss/services.c | 37 ++++++- 3 files changed, 109 insertions(+), 90 deletions(-) -- 2.20.1