Received: by 10.192.165.156 with SMTP id m28csp1659753imm; Thu, 12 Apr 2018 00:57:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx48yn4/mQJW8vUHgAiK/2/DQBnp93WFu255edOHgTRcIgs5JHOM4VPIkJ6On0H2z0rxpE/nG X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr8593787pld.379.1523519846904; Thu, 12 Apr 2018 00:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523519846; cv=none; d=google.com; s=arc-20160816; b=ccxyPxZibTzVOeUYmfTlI/I4iBEgZbydLWX9FNumuhZkCer1eGOh2LS94df+zDlXg6 22Jdly8NnT2Kt8AgudJiBFGzKALcckSCx9UNXrGp2wYQr5DYQJx+pZS9tbmq2bdIblPy tS57eUSieTb6bIPwD898LbnaGfLk28wiAjdnkwXNLilwahowU58y1oVTahi6ctIaFeAd fIb800U3EYNDs5GOb4/8AAJ2p+Vy5TUiHbwQNCFyFfn7zWmoj/DjkY+/HwTtLh1duwjj Anyp91KzHwcFX5dFhQRLwI3RjbZJHXn/uBVd4o5NsfT2PBlG6xrObn9LeWgtkDhRn5yS DmHg== 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:arc-authentication-results; bh=qxEfdugJe41Tao1hW08M1xtgFInqMkqa1cY31nKgSsQ=; b=siIG+FM5WTV64fHbixd58MV/nwqrJ4h7H7bb+yD0/oZ7uxgn1i159Jb5So5rbUZ8qx u/DFh9NPL6NBQukWk04cSWESElTgewe9XKvrhKYmrk4ubFKBED++RP35ND8wLRULEGPX 7bf4PPJv61dHjsx0FtoS90E5ti8MiSYSUt3uRdJpCPbYxmoFB6TURMky0GSkSXcv8RcQ sI/fM1C08lPDZilj+nLZ+OLEOstIBlAOEodBoCNlVRTu0wc85wzek423CzXvEUFp3rX6 7rnCedflLLqdP66yNvKo1bfzqK172FyzV2bkn03ll3iWUsn5JQ49bbD6eshsd/IrF1A5 dGdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bSbQylAH; 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 ba7-v6si2935216plb.347.2018.04.12.00.56.50; Thu, 12 Apr 2018 00:57:26 -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=fail header.i=@gmail.com header.s=20161025 header.b=bSbQylAH; 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 S1752656AbeDLHxn (ORCPT + 99 others); Thu, 12 Apr 2018 03:53:43 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:36632 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752291AbeDLHxl (ORCPT ); Thu, 12 Apr 2018 03:53:41 -0400 Received: by mail-wr0-f182.google.com with SMTP id q13so675837wre.3 for ; Thu, 12 Apr 2018 00:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qxEfdugJe41Tao1hW08M1xtgFInqMkqa1cY31nKgSsQ=; b=bSbQylAHVQK4sZCdsQq3YPInsBqQqHV6RsUMjNTJPtuxb4yStkFxd0otgDkbyabWmy nJHdDxnwIQ4m0AG6K2kVp5TIfF69I9Drkij8lEr5mHS200tGzUj3CGmJD3dFUDoEkDqU 3hpndVRzDPoQOwjWl6gQ/e43/FRWnlPz4gPhYf9COQFv8xblZKM17BcFYZiWSA+qdtHj qHrBJfxBEclPI80+ywODOkR0YA+pxjuzbL/HSNzUBtK/OZKVKmlldRGi7Cl1TzB54Vjm iDMwxwC5FxuUEyG9TqW5/2a9Tx8XyRq5GLmFUmSnf67ryNNYx7Wp4QUAmG6ZnXItwvqv XwFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=qxEfdugJe41Tao1hW08M1xtgFInqMkqa1cY31nKgSsQ=; b=YQT1dBedt9ADVVjT25Pfxe/OGwrpVbVQj9urscjzFnNybFnKSK2GI4kCRz50y5K42J 6xMpNshe2f9anuA+RmzXu3D/NYWUy81Wnm8ckACvaEPirGdiJ72lP7dnHp748ioVfqiH CjU7X+fCMXPflBUwYkxPg2OFYlriTwv/IeIP80vXY1WpnzucNF23Dbla/d8rEJDlad/Q gsf7MPpWyy0Es40MhHXHnTyloP92Rh7xoNFEf7oDUHTDjYCyUlGDJ/PJwvudY59LIn1g OAYvoMlRafX+34Pb00yzmve/5vQBA5iXeeNPhhXgB0P8nDvWEZQFDDk44UUbA7uUZo9I oxZg== X-Gm-Message-State: ALQs6tDJ1pQgt+6lyO/6ShNU4b8c3RUjJRYFvm8IDYOjywkOHp5iSKCH aTxbf1ArHJqSoF4wdO6TvVg= X-Received: by 10.223.225.198 with SMTP id l6mr5692049wri.111.1523519620727; Thu, 12 Apr 2018 00:53:40 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id l41sm6012407wrl.2.2018.04.12.00.53.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 00:53:40 -0700 (PDT) Date: Thu, 12 Apr 2018 09:53:38 +0200 From: Ingo Molnar To: Song Liu Cc: Vince Weaver , "linux-kernel@vger.kernel.org" , Peter Zijlstra Subject: Re: perf: fuzzer leads to trace_kprobe: Could not insert message flood Message-ID: <20180412075338.tsu36qh2wcrcp36k@gmail.com> References: <20180411120447.2gzrwijrtayjv3eg@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Song Liu wrote: > diff --git a/kernel/events/core.c b/kernel/events/core.c > index d7af828..2d5fe26 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -8400,6 +8400,10 @@ static int perf_kprobe_event_init(struct perf_event *event) > > if (event->attr.type != perf_kprobe.type) > return -ENOENT; > + > + if (!capable(CAP_SYS_ADMIN)) > + return -EACCES; > + > /* > * no branch sampling for probe events > */ > @@ -8437,6 +8441,10 @@ static int perf_uprobe_event_init(struct perf_event *event) > > if (event->attr.type != perf_uprobe.type) > return -ENOENT; > + > + if (!capable(CAP_SYS_ADMIN)) > + return -EACCES; This is seriously whitespace damaged: all tabs are spaces ... Thanks, Ingo