From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbbJHGWC (ORCPT ); Thu, 8 Oct 2015 02:22:02 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36783 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752006AbbJHGV7 (ORCPT ); Thu, 8 Oct 2015 02:21:59 -0400 Date: Thu, 8 Oct 2015 08:21:55 +0200 From: Ingo Molnar To: Alexei Starovoitov Cc: Kees Cook , Daniel Borkmann , "David S. Miller" , Andy Lutomirski , Hannes Frederic Sowa , Eric Dumazet , Linux API , Network Development , LKML Subject: Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Message-ID: <20151008062155.GA18452@gmail.com> References: <1444078101-29060-1-git-send-email-ast@plumgrid.com> <1444078101-29060-2-git-send-email-ast@plumgrid.com> <5612F639.2050305@iogearbox.net> <56131B1F.80002@plumgrid.com> <5613C261.4080302@iogearbox.net> <56158CAF.9030209@plumgrid.com> <561597A6.4000203@iogearbox.net> <5615AF92.50402@plumgrid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5615AF92.50402@plumgrid.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Alexei Starovoitov wrote: > As far as sysctl we can look at two with similar purpose: > sysctl_perf_event_paranoid and modules_disabled. > First one is indeed multi level, but not because of the fear of bugs, > but because of real security implications. It serves both purposes flexibly, and note that most people and distros will use the default value. > [...] Like raw events on hyperthreaded cpu or uncore events can extract data > from other user processes. So it controls these extra privileges. It also controls the generally increased risk caused by a larger attack surface, which some users may not want to carry and which they can thus shrink. With a static keys approach there would be no runtime overhead worth speaking of, so I see no reason why unprivileged eBPF couldn't have a sysctl too - with the default value set to permissive. Thanks, Ingo