From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2FD7C3A5A3 for ; Wed, 28 Aug 2019 00:38:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B73E2217F5 for ; Wed, 28 Aug 2019 00:38:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EuAImDaN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726152AbfH1AiR (ORCPT ); Tue, 27 Aug 2019 20:38:17 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40972 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfH1AiR (ORCPT ); Tue, 27 Aug 2019 20:38:17 -0400 Received: by mail-pg1-f195.google.com with SMTP id x15so388126pgg.8; Tue, 27 Aug 2019 17:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1ba+Tj/p7u7dF9gT2DPoxWMYhBdJGqnWmgBcPXbvr14=; b=EuAImDaNHOYpRgdhagSiKgYNhmNmXJdCTP3fLpXHBHQpp343ylLK/oKJ6MdMz3Ejcr yfXQ4rN/V5FZDhY9h+mAHTD9VOE4m0HVZ1ZvMaJp29fvUjpTklgybEEi9GWPxb6uP3ub eu85+ArD//4dsaUJODceY+yb5i9Wq3OmwSy8N/HAi5EY7Wa+NNik/bTXrdvJ4fL2VYK9 mI5W8RF95b7kHsYfzW8yfM15Y5neScXt2ZBJxLiVuoGDUO/7DoaaDs3KkadzFZ4Fqg3K 8k/8hUo+TBpswgl9zP2k4JbxPlKmsSmK0etIR3buToz2k7TZUow2Bc8Oj3iAuT+PsNGP NaOw== 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=1ba+Tj/p7u7dF9gT2DPoxWMYhBdJGqnWmgBcPXbvr14=; b=BDG/CgaBB26KOUCRS1J7aYoAMt2aF/W0UWyn0myAOcEb2N0FQ6+DKXe9qntsKZxelV TNsksShXAvdsMYqT5CHG3p3eHvwunf31Q7pzBpKn/uvhYSbv93Pwg04/cYWIB3OYxTkX E7yxPnCRKzJs/N3HB7TPZKERb+e7ezOeDV0+FIp29hBjd0e7Pw8qMdyfXxNdDzx17Get hhJ5PAr5EZ36zP+bN2pwY49lJZCFB9Vm+bEi58IYJx6qscDzhy8Navh5ARdrlVc3qzzO Fs+QLDvOemj9TOPApRBTLMBrllDmgxUjYnJ4qHiqnDZDkyCvh06C38ujUv4vbECM4GoX WTtg== X-Gm-Message-State: APjAAAV4CFuD2d9q0gWw1lIhJVsdUtdEbxTJv8G5V1ugpOku6KwnVVpQ W7pjC/5Sa9VauFlI/0ifIyM= X-Google-Smtp-Source: APXvYqwK1bmDF8lgmWn4bYWNqNrM7VBHCr6ZUjQu4F1qkVwqvCdXVJbrGBgKWYztG7XYLV5L+XaJzw== X-Received: by 2002:a63:e14d:: with SMTP id h13mr1050987pgk.431.1566952696173; Tue, 27 Aug 2019 17:38:16 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::3:d1e9]) by smtp.gmail.com with ESMTPSA id a4sm509004pfi.55.2019.08.27.17.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Aug 2019 17:38:15 -0700 (PDT) Date: Tue, 27 Aug 2019 17:38:14 -0700 From: Alexei Starovoitov To: Steven Rostedt Cc: Andy Lutomirski , Alexei Starovoitov , Kees Cook , LSM List , James Morris , Jann Horn , Peter Zijlstra , Masami Hiramatsu , "David S. Miller" , Daniel Borkmann , Network Development , bpf , kernel-team , Linux API Subject: Re: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF Message-ID: <20190828003813.fkar6udy5vq4loe5@ast-mbp.dhcp.thefacebook.com> References: <20190827205213.456318-1-ast@kernel.org> <20190827192144.3b38b25a@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190827192144.3b38b25a@gandalf.local.home> User-Agent: NeoMutt/20180223 Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Archived-At: List-Archive: List-Post: On Tue, Aug 27, 2019 at 07:21:44PM -0400, Steven Rostedt wrote: > > At least for CAP_TRACING (if it were to allow read/write access > to /sys/kernel/tracing), that would be very useful. It would be useful > to those that basically own their machines, and want to trace their > applications all the way into the kernel without having to run as full > root. +1 The proposal is to have CAP_TRACING to control perf and ftrace. perf and trace-cmd binaries could be installed with CAP_TRACING and that's all they need to do full tracing. I can craft a patch for perf_event_open side and demo CAP_TRACING. Once that cap bit is ready you can use it on ftrace side? > Should we allow CAP_TRACING access to /proc/kallsyms? as it is helpful > to convert perf and trace-cmd's function pointers into names. Once you > allow tracing of the kernel, hiding /proc/kallsyms is pretty useless. yep.