Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1624140ybp; Wed, 9 Oct 2019 17:42:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIzLIqAJPj3umuJGRobCjJPu/Q6TAqlS7XTSbRtSZDXwGow4u49eTAFEPEP9jHFrdc3r3x X-Received: by 2002:a05:6402:19bd:: with SMTP id o29mr5479196edz.42.1570668161829; Wed, 09 Oct 2019 17:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570668161; cv=none; d=google.com; s=arc-20160816; b=xtTXtnWgPabZ8Rg7xNblIcw40NvVDmnS0Gf/AILgA1KodRSH5z4fZFMqOvZDl7YZL8 ZWLNiXJ4hmxMhildrbzBL9rTMmRAwE8GTbbfTdVtT193r/smQva6XBcP6YCXZyRcmAnw N7WgDF432zk9IK4v5JXH9R0v7wng7wfDkongoifR9GN4MhRtBRXmO2dwYi6jk8FDa4/a A56k3U7aABko5HdaIOrPgmn7hL4lcpXgm/fc5r9QVaf18HbAfAw+f/Q2js9uPoLTRv3C 890FZbMorKWeUN9xxIM4pAkqE3XQJxOHKY3V5nX4KjgQgc5xsIcPzgttXXOawraSkqFq tkGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UcPd5Jny5aY5aMsPzhLMHUk3eBTerZnA6THOQx3YHYM=; b=lQUWbjlYN+P2fT1u9wtP50eWUDlerkJb6zuHbKYZmj85xY0jGMfVXAR2NI9dl/sVyk idGOBKTF/xvTSkv07qTmoHM5DuBclBUNdeigH5GWFxmj6bpExqSUsCqD+2Mqt7NyaeCJ FgC2tNR1Eem1hTJkznn2rToKQaTHzun3bjF+b4DFeUK5/Im/kfJgaG4KAUL2b0e+iCbG NShOk4MXwPNAK1k/fPVFf3WwCQnpXT47V5x5APy1n8wm0fUER1lcD6t1lKV/o1BMYTsI fu/khRaX5B2OK2HW8P5SW4oNXQTInqHRE2PL5VDpaq6osbgyNiSaY4x6XcVSr/ZJLsdZ lUzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=CQBl48C9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y64si2316118edy.434.2019.10.09.17.42.18; Wed, 09 Oct 2019 17:42:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=CQBl48C9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732476AbfJJAk0 (ORCPT + 99 others); Wed, 9 Oct 2019 20:40:26 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40847 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731155AbfJJAkZ (ORCPT ); Wed, 9 Oct 2019 20:40:25 -0400 Received: by mail-pf1-f193.google.com with SMTP id x127so2727500pfb.7 for ; Wed, 09 Oct 2019 17:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UcPd5Jny5aY5aMsPzhLMHUk3eBTerZnA6THOQx3YHYM=; b=CQBl48C9FQrJE5k703Kev1+BQ/3whfu6HOkubrefsdeM3B2i5ly4Dw9keO2geTEGUV s+Ui79CGMEi8TyPD6oEqp7cslGqZKhXLLTCoggJ/CPYtMcY9bWkjwact3xZFKaXvWZYO u5JLNe8rCmmBk2yB39UHSrBbn2Uo+Ciiic/jw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UcPd5Jny5aY5aMsPzhLMHUk3eBTerZnA6THOQx3YHYM=; b=l0GVEM/Eb6BeDe0ZpKd2APkVsZjCij73X0Lrl1rOhTTHCSs3RKoQDHMejcf+xoFqsy mzaTLm/nJ/Bi4NOWSXHaGtuIv3OeX7UnodPiiYnr7chIlIanLvErkUJYaOdFbaYCWNBu YeD2BOjJOCeWShltNiQ8hXYqNl8pHxBAFn7TwX4eituKYzLKQHaWaU2Cf56g9Oq64j5C 0pDSEGEjAFhPbKpAHWZ9/pBBjq7az9RttdAFAtd9J2Zly8O3ZCGBNGwIwYKqFDhkyQbS mAeRrznOQfjoxBSAoIknK1KI8PpGe1SQLUK5/Yb4xovyXBDBhA78QxdUp88CoWsl559z jbUA== X-Gm-Message-State: APjAAAWD/p8/SH5lKQFBsyAPnuyaU0L/3jKPzlifXeoydD6f+sQtCyPB E8yN69/iStdMd/CuxMv5a1qHGw== X-Received: by 2002:aa7:93a9:: with SMTP id x9mr6675538pff.81.1570668025033; Wed, 09 Oct 2019 17:40:25 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id 22sm3415597pfo.131.2019.10.09.17.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 17:40:24 -0700 (PDT) Date: Wed, 9 Oct 2019 20:40:23 -0400 From: Joel Fernandes To: Casey Schaufler Cc: James Morris , linux-kernel@vger.kernel.org, Peter Zijlstra , rostedt@goodmis.org, primiano@google.com, rsavitski@google.com, jeffv@google.com, kernel-team@android.com, Alexei Starovoitov , Arnaldo Carvalho de Melo , bpf@vger.kernel.org, Daniel Borkmann , Ingo Molnar , Jiri Olsa , Kees Cook , linux-security-module@vger.kernel.org, Matthew Garrett , Namhyung Kim , selinux@vger.kernel.org, Song Liu , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Yonghong Song Subject: Re: [PATCH RFC] perf_event: Add support for LSM and SELinux checks Message-ID: <20191010004023.GC96813@google.com> References: <20191009203657.6070-1-joel@joelfernandes.org> <710c5bc0-deca-2649-8351-678e177214e9@schaufler-ca.com> <2b94802d-12ea-4f2d-bb65-eda3b3542bb2@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2b94802d-12ea-4f2d-bb65-eda3b3542bb2@schaufler-ca.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 09, 2019 at 03:41:56PM -0700, Casey Schaufler wrote: > On 10/9/2019 3:14 PM, James Morris wrote: > > On Wed, 9 Oct 2019, Casey Schaufler wrote: > > > >> Please consider making the perf_alloc security blob maintained > >> by the infrastructure rather than the individual modules. This > >> will save it having to be changed later. > > Is anyone planning on using this with full stacking? > > > > If not, we don't need the extra code & complexity. Stacking should only > > cover what's concretely required by in-tree users. > > I don't believe it's any simpler for SELinux to do the allocation > than for the infrastructure to do it. I don't see anyone's head > exploding over the existing infrastructure allocation of blobs. > We're likely to want it at some point, so why not avoid the hassle > and delay by doing it the "new" way up front? > I don't see how it can be maintained by the users (assuming you meant infrastructure as perf_event subsystem). The blob contains a SID which as far as I know, is specific to SELinux. Do you have an in-tree example of this? Further, this is also exactly it is done for BPF objects which I used as a reference. thanks, - Joel