Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2530256ybk; Mon, 18 May 2020 01:10:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydaOc639qF1WBykyz3nKuPapxIm3EfUKtygshib6WRqvYkN8gH8K/pTJO4BYTW92V20uv/ X-Received: by 2002:aa7:c1c5:: with SMTP id d5mr11747758edp.183.1589789434394; Mon, 18 May 2020 01:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589789434; cv=none; d=google.com; s=arc-20160816; b=R025hoGWt94IXFpIxG3UEkPrfhHUg5liH/eN10NFYz176OPfgSjmBOpKatylN8PZeF ZSLIk8dkj6p9J40tq1+n9j0+XISlP1ogp9UjwRkmdeOfrZhZu4bCgSr40yh6gvZ5sNNa 4qBUH+8QBPmB/qbycYdvCMusZNqYAVWyMJuznjTax2wVQ9aRyCAQIAu0muK/GjjNBDDv erHC2skmG8Pp1p0R+qnWACVAjKkyAdhbwkJAvU57y/DW9oxy1GzGIcVTtU+rmoz4gMqR +bN56cxYcTBMG6XL820KCksq4PRdRfKRjm7DCwUjw8xT1FxqDXcpCxUru5kqYfiwVJ2v gHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject:ironport-sdr :ironport-sdr; bh=z3kiw0AANQDcc6llO8X0MPDoCGOAg99ITAUx7ePSHYk=; b=PIQQxmR9AYavIGsLMnRt1RfYYnTkRRurWDjdQT6xaYZ2ZgIs0YeWosrZ807r9wk4r9 x/1HsEcpRD6aHxbpH2a7Pvs3C1FSrF2fUfUqZ2/we7riY4j2zcJ+W2Lf0zF05lr6T/3v EWdbhBntdJiz4LwEHnYrstKhncdHqO+gDaxom3d+CRUW9Gv9O22N7ey+ZyVV8fK/7eWj 0pVnNZ+hrARl/76eQUcmXGLwMzjBhVwErNz4IFsnSABOPdzqtpiSLOIau9dS2ckGRhYN W/H7g1LN00DKs9Yw1i2X+bGjDwClH2sMyJA6WKJeWIsynBvOfjtcQlQXTccaF4lIWdte hSCw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si6474039ejv.260.2020.05.18.01.10.11; Mon, 18 May 2020 01:10:34 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727840AbgERIIB (ORCPT + 99 others); Mon, 18 May 2020 04:08:01 -0400 Received: from mga05.intel.com ([192.55.52.43]:39327 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERIIB (ORCPT ); Mon, 18 May 2020 04:08:01 -0400 IronPort-SDR: JCZMkKKJR4Kr23QXcpe8XWVa+tVi59ElZjkFlgzjldeqO2TzY19XQudIL718wDPxFMnJWVCMkT MdfhpHrh5dOg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 01:08:00 -0700 IronPort-SDR: Fxj0lLv4iFb/AfQRyiua2C4SMA0we5GzREgkDRBDWvaBVNhNCHRSeAwkOwGunlQqYRQXxLFkg+ QPXD6wR9x7Kw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,406,1583222400"; d="scan'208";a="288485760" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 18 May 2020 01:08:00 -0700 Received: from [10.249.230.167] (abudanko-mobl.ccr.corp.intel.com [10.249.230.167]) by linux.intel.com (Postfix) with ESMTP id 638A85803C5; Mon, 18 May 2020 01:07:56 -0700 (PDT) Subject: Re: [PATCH v3 0/3] perf: make Perf tool aware of SELinux access control From: Alexey Budankov To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel , "selinux@vger.kernel.org" , "linux-security-module@vger.kernel.org" References: <0fffd9e2-1f22-a0c2-c2e3-cb7f4bb89d66@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Mon, 18 May 2020 11:07:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <0fffd9e2-1f22-a0c2-c2e3-cb7f4bb89d66@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Is there anything else that could be done from my side to move this forward? Thanks, Alexey On 30.04.2020 10:06, Alexey Budankov wrote: > > Changes in v3: > - mention "CAP_PERFMON or CAP_SYS_ADMIN" instead of sole CAP_PERFMON or > CAP_SYS_ADMIN capability in the docs and messages to support use case > of newer Perf tool on kernel w/o CAP_PERFMON > - reverted double new line in "No permission to enable %s event.\n\n" > - updated security.txt content with new messages wording > > v2: https://lore.kernel.org/lkml/66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com/ > > Changes in v2: > - implemented minor doc and code changes to substitute CAP_SYS_ADMIN > with CAP_PERFMON capability; > - introduced Perf doc file with instructions on how to enable and use > perf_event LSM hooks for mandatory access control to perf_event_open() > syscall; > > v1: https://lore.kernel.org/lkml/b8a0669e-36e4-a0e8-fd35-3dbd890d2170@linux.intel.com/ > > repo: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core > sha1: ee097e8ee56f8867cbbf45fe2a06f6b9e660c39c > > > Extend Perf tool with the check of /sys/fs/selinux/enforce value and notify > in case access to perf_event_open() syscall is restricted by the enforced > SELinux policy settings. See new added security.txt file for exact steps > how the changes look like and how to test the patch set. > > --- > Alexey Budankov (3): > perf docs: extend CAP_SYS_ADMIN with CAP_PERFMON where needed > perf tool: make Perf tool aware of SELinux access control > perf docs: introduce security.txt file to document related issues > > tools/perf/Documentation/perf-intel-pt.txt | 2 +- > tools/perf/Documentation/security.txt | 237 +++++++++++++++++++++ > tools/perf/util/cloexec.c | 4 +- > tools/perf/util/evsel.c | 39 ++-- > 4 files changed, 264 insertions(+), 18 deletions(-) > create mode 100644 tools/perf/Documentation/security.txt >