Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp213471pxa; Fri, 21 Aug 2020 05:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdeUQtZ7fzSRSkywDxJte39TTMqZ0+lOMYbt5uthlbJhbWWwxFtdOKBf48+eKMnXGaVQrO X-Received: by 2002:a17:906:dbf4:: with SMTP id yd20mr2513785ejb.369.1598013085741; Fri, 21 Aug 2020 05:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598013085; cv=none; d=google.com; s=arc-20160816; b=UY7VG0VxHy4vOnnVxq06lMDHDqcvYFPP0oJQYfIJ79RSs7knQDw+oNKyYKkxwqnsQd T5gAmmG1dbSaW3M8jYFUiquaUBPC+zpjmUUzUKc52kwq/9jDTpKJlSQRoX5dH9/GpQfw /AByBMjbHwTcZ2ViEDQjMuus/6n+Hgi4SJP3SF7KjIVho3i/crsmRmdTDyKX5RyQZcfM jCjDLsH9TuRjHQ3UoYCwXjYC6fqiOH9G8crbstM1DFKxINFIgqK2VCAdGcM3P9HTTmZm qhL5M0G7YXgSpZy3hPj7dnQEi/L84jaygHX9nwLbj2MFLhHvkBiIP/Qlumok7V+K1Da1 Ux2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DyfadVWLMqawJRTIbPVn1xuWVw5c4WH7SQfS+lYvwdM=; b=o4vlDV/laeOBtK5msquRn2Vc4qp6GC7cV8Z6a6jn/NLweCIcPXd63TzonKp6IUl5Hv oi4NoQ1SFoF95yAmP48nr5VrKtcYnO/9FEXV+p0WOZPzOwIuAsy33tMKYUDo5pzPwpHY U7k6jUFAwyMGOlIe/9LVr3SHEf/2C51tF+ltoClFOc49ZdZsI7LgKi7tNwBmw+mxp1Jq yHzQkD1XcUdcqWAxxIMGmJGD/YwnByoCjZyYMw17cmXGOFg3JMr22npxUPmlY8NVvirt 3C3cYt9WmQxSjyZFNGVN42iuibL7KwYQX27Q85PKsBEqmFZ8gdkpBObToz8teGsq2LOX yqoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BbDNvTes; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si1274163edb.159.2020.08.21.05.31.02; Fri, 21 Aug 2020 05:31: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BbDNvTes; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728577AbgHUM3k (ORCPT + 99 others); Fri, 21 Aug 2020 08:29:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727104AbgHUM3d (ORCPT ); Fri, 21 Aug 2020 08:29:33 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3306C061385; Fri, 21 Aug 2020 05:29:32 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id h22so1397230otq.11; Fri, 21 Aug 2020 05:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DyfadVWLMqawJRTIbPVn1xuWVw5c4WH7SQfS+lYvwdM=; b=BbDNvTesofn8kb5rMLokT9pvAZZXAgWUM1MHYxRmsPcqjXYpgLIf039WcB6UFAofOr CBCk0jf+xUOSP0TOjzqfMqi0Zo3gFgkJILaFwb7maHuUuigsvt7p4FSJUUxQ6PJ6RkAW QJUkXudVAUI6gnFu19PH+o77TdBIyxtkzmmMyhFkIxt4HayX78B0GPKmnUuBPiZS90dx P8455Hmh5kvv9c8t1GbClSJY4DW0LhYxNKxI8aCSXJGs4vpK+k/cqbpaWEmdO/tUGEaY z66UKPKQ4nA3zRfy9vtanh4M/vhu/dkN4iKsOjQdnP5XFDlvbVDjDRK14s2OzH3I1tWf zAww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DyfadVWLMqawJRTIbPVn1xuWVw5c4WH7SQfS+lYvwdM=; b=Zz9IhIFve1DRwq2jfHilY6ZVeIXQGKN6X3TEou+aK4GpGevIa0zveJqKN+3jKxU3Tx DeM4aPfHkyha2wSb6xJ0/id0HqanjoW9Z16+ONk2qq6vycZoBvPvl2c4wph/q7ruZyqT sT0jKAxWyd0Zy8+OAfvKELpYWcLlmAG5aBeGFIGJEYfdMpbI91zOUUGCDn+ldr1f7fpb O5iXCIxJwVt8aTDNzL63NIw4E/Lh0m00CNvKJWM8ggzcDxuuxLBfVWWKUb1Ut6yhV1ta Jj1SHaWEX7y3dYNcQW77JxZBqwAATtVAIFn+ezWg5Pl5gsiSjF+Z6v7t4vYvIkzurEJ5 7iJA== X-Gm-Message-State: AOAM533yvwcZhskMGaBdwGjVP5f45DmWBcmXGY3UoI3iZ/XZcrO1hojT Je4HLFOsk1t8fD4mNVJtyya2fQUVmto4QfoAvdw= X-Received: by 2002:a9d:67d3:: with SMTP id c19mr1770333otn.162.1598012972298; Fri, 21 Aug 2020 05:29:32 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20200820223136.162850ce@oasis.local.home> From: Stephen Smalley Date: Fri, 21 Aug 2020 08:29:21 -0400 Message-ID: Subject: Re: [PATCH v3 3/3] selinux: add permission names to trace event To: Steven Rostedt Cc: =?UTF-8?Q?Thi=C3=A9baud_Weksteen?= , Paul Moore , Nick Kralevich , Peter Enderborg , Eric Paris , Ingo Molnar , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , linux-kernel , SElinux list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.