Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp260117pxa; Fri, 21 Aug 2020 06:40:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy2Oc2sLxrWlHvzO087T6+t3ePTzKoGYCIt2ixKy2n7HHAEhi6nVDiiz3U2pl/dWwNoi3H X-Received: by 2002:a17:906:c143:: with SMTP id dp3mr2862487ejc.504.1598017225974; Fri, 21 Aug 2020 06:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598017225; cv=none; d=google.com; s=arc-20160816; b=09VlaXD0Nj+NlRXfvXNbdCOupzQvnTZ6Vugr/YF7KeA60bvUnUssJr8pSJt6Kd1L9C +mcGLgBmdy+qCJLfySlyexWdbFM1XvM+u5+zdBynsmLekuffkxcJWP6U/kBuPqJ0uVtT 2evmSKXbwJWHMPcPjoJ8QosYTu0NxOElCO4TocRmmLi5OuXi5kiyt6NAup20wkJj4c2i W51usg5cpQDVfUIJ5cIxmaV56b5e/ZmoP/ukgXAWO5JnrgcLI6CTIIqUihX75jtD/PvB b0UMYkzbPNggSILqdfo3YlvrzBs08dxrXILbDuPD120EgKbGCZMsVsTjo+IwvYDV481+ A9Iw== 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=U0rIn7bRRYeyMeXgfXImLi5sx4pBAXDGna8m6SBj44I=; b=fpA0pgjO2rfuuDcC5KBC2CNkgfCphfc2UzlAAZHav5Xq6B+ucUjxf1GxqJPEKP2YcS Pr4W9ApaFyBjfAmKt2tnVsjBR6Wrmkjwvn0vfyC8lYjs1aT7oNCtDiKXKpfogUdA0SGO Hf5EOp9en78VW1qwFeBqRSgn8Arogw/0sEipJH8UZ+K8pduUprI9g0yPdfoMceI1NktE QooRAAhUSCPUpi6PMFvg2ajTd9BeBRwvj8rEc3h3P9eOdTpNdKg7NHMywhKkWhjd5nab dbVEkyfN9n3Xd8b6e7r5aO0jNbgt5ZgbmhS8J5DQpBkjy4vqM/FyTkj9W5N5oq+8rQSG 2LQQ== 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 gq5si1144481ejb.162.2020.08.21.06.40.01; Fri, 21 Aug 2020 06:40:25 -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 S1728796AbgHUNjS (ORCPT + 99 others); Fri, 21 Aug 2020 09:39:18 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:1973 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727870AbgHUNjP (ORCPT ); Fri, 21 Aug 2020 09:39:15 -0400 Subject: Re: [PATCH v3 3/3] selinux: add permission names to trace event To: Paul Moore , Stephen Smalley CC: Steven Rostedt , =?UTF-8?Q?Thi=c3=a9baud_Weksteen?= , Nick Kralevich , Eric Paris , Ingo Molnar , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , linux-kernel , SElinux list References: <20200817170729.2605279-1-tweek@google.com> <20200817170729.2605279-4-tweek@google.com> <0bb62de9-1020-a7c4-3a7f-48ae2f78e3b7@gmail.com> <20200817162933.79f69c66@oasis.local.home> <20200818120948.1a428da9@oasis.local.home> <66e6d84e-20b5-1bd3-e107-322f42ce35d3@gmail.com> <20200820223136.162850ce@oasis.local.home> From: peter enderborg Message-ID: <5a545bde-0158-b7f8-94d7-525591db23a1@sony.com> Date: Fri, 21 Aug 2020 15:39:11 +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: 7bit 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=pGLkceISAAAA:8 a=meVymXHHAAAA:8 a=ibUXxvZku06OJSsJHzUA:9 a=QEXdDO2ut3YA:10 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/21/20 3:19 PM, Paul Moore wrote: > On Fri, Aug 21, 2020 at 8:29 AM Stephen Smalley > wrote: >> On Thu, Aug 20, 2020 at 10:31 PM Steven Rostedt wrote: >>> On Wed, 19 Aug 2020 09:11:08 -0400 >>> Stephen Smalley wrote: >>> >>>> So we'll need to update this plugin whenever we modify >>>> security/selinux/include/classmap.h to keep them in sync. Is that a >>>> concern? I don't suppose the plugin could directly include classmap.h? >>>> I guess we'd have to export it as a public header. It isn't considered >>>> to be part of the kernel API/ABI and can change anytime (but in practice >>>> changes are not that frequent, and usually just additive in nature). >>> Yes, it would require some stability between userspace and the plugin. >>> If the value indexes don't change then that would work fine. If you add >>> new ones, that too should be OK, just have a way to state "unknown" in >>> the plugin. >> Since we introduced the dynamic class/perm mapping support, it has >> been possible for the values of existing classes/permissions to >> change, and that has happened at time, e.g. when we added watch >> permissions to the common file perms, that shifted the values of the >> class file perms like entrypoint, when we added the process2 class >> right after the process class, it shifted the values of all the >> subsequent classes in the classmap.h. So you can't rely on those >> values remaining stable across kernel versions. > I think it is becoming increasingly clear that generating the > permission set string in userspace isn't really workable without > breaking the dynamic class/permission mapping to some degree. > Unfortunately I don't see these perf changes as a big enough "win" to > offset the loss of the dynamic mapping loss. > > I'm okay with merging patches 1/3 and 2/3 wth the changes Stephen > suggested, but I think we will need to leave patch 3/3 out of this for > now. > Ok.