Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5259272pxj; Wed, 26 May 2021 06:37:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8QfeBe+z6qFNfUOE65G5Gk/ua7B7alOGsBBpcO+6WOJsq8S101Br6dhwxdiwBYa62uLbO X-Received: by 2002:a05:6602:1815:: with SMTP id t21mr26038496ioh.193.1622036263228; Wed, 26 May 2021 06:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622036263; cv=none; d=google.com; s=arc-20160816; b=Et9tt8T4jcnfDDPQSENpW+JBQ0KgB1IBe45wV+RwzxXLXUh/i/X1Z4W7OSiM5oZxG7 sGAMNRZ2vdtZCNwsErR+HE0WLae2/5QYv/A9lF18SXfKmgW9iZZhP0QHtq1QcoSeZsVT qLVNggt0wlynVEjH6o9vyF6nCKlenWwDZPSWwxmHp2lLv7JHyiK1IfAhSy3prjQnLEPi jhSwoZjNHbGUk9qupMy5CoNg5IIJZTnaiTKQrZJM1X957S3RkSdGwmi4l6p7r76RLPBP C2eo3EZeFimChn7nDrVegNaVvegLo6QhQIV/VpSaPrFGJdM8ZHvDnVYJ6lDJ6laBeNbt PudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9WCBRFuYHxMf7i6wQ0xLlcgZlabSDpnjWFq+yblGoTc=; b=KI+3a2HEYXdw1HleyuUMNJ/bDCTMcUVE0HJ68IND02clYHcMdScH5jPdBM7dd9pxY5 WA7pbxYMr55hVGwz56K1bGvc9iH9hxdhRX0zRDfAJMkdiGDyHSnzjoh1X7OJHPivCPC7 1vZZw4ZWs3cN175h10lFGrcbzO75iuBgyE51hUW4z8OKlqqTkijxbaOAz6zDTGC4e18Z 7gMhb9Ui3E1mfCESVAMsGvNYnBnW+/ZQyDwdLa7vGEzK2Sj8J+jzMPdyXyqI3HMoXTvz 95Nbqk9ayO4lTYvcP0Uuyo1xK/EYJt42X3gJ/kegXL8pzQFHcJhrRDVUyaLvB7BJ7ky4 zIVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o8+8KqKH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si22262154jat.59.2021.05.26.06.37.29; Wed, 26 May 2021 06:37:43 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o8+8KqKH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232773AbhEZNSX (ORCPT + 99 others); Wed, 26 May 2021 09:18:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:41954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231174AbhEZNSW (ORCPT ); Wed, 26 May 2021 09:18:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAB0E613B9; Wed, 26 May 2021 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622035011; bh=LXobja8LB8VO3c7Zu/EJvpMV/chTpzUwIFAvo7VkUo4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=o8+8KqKHcCohw74SaIRiCSvUii4D11QGetAyKuAJo5lpXWEF5Q17G0GUseaKPFAW0 uendXzieCizlb510GuvCFxNPX72cPRjhZKi4SFY1U2E909xbbpw/klvhk9TauBc73l rJ5889/HMZPlLOcobHkEt8g4vUX76XDuwsv7+xmqFVc9EjqcQ3YETxzYfp+XlMm2xO DNJXFP5FU2j0ENO7eIgIvshS07YKt4UgepfEn0eoVTyGhjhlMuvzbKj6cNPvlnwd1b Wa1s8whBOkXFN0RWeJjvDQ7ssMai8kdteBWBey8bmiIZBMwIczBzvOyeBwlpHL1h5n kk0CxKTZ5C9VQ== Date: Wed, 26 May 2021 22:16:47 +0900 From: Masami Hiramatsu To: Ravi Bangoria Cc: Jiri Olsa , jolsa@redhat.com, linux-kernel@vger.kernel.org, "Aneesh Kumar K . V" , Arnaldo Carvalho de Melo , acme@kernel.org Subject: Re: [PATCH] tools/perf: doc: Add permission and sysctl notice Message-Id: <20210526221647.972ffffddc88c1b08c19a024@kernel.org> In-Reply-To: References: <20210525043744.193297-1-ravi.bangoria@linux.ibm.com> <162201967838.287555.4257117900130102987.stgit@devnote2> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 May 2021 15:20:58 +0530 Ravi Bangoria wrote: > > > On 5/26/21 2:31 PM, Masami Hiramatsu wrote: > > Add a section to notify the permission and sysctl setting > > for perf probe. And fix some indentations. > > Yes, it makes sense to have this detail in man page. > > Few minor points below ... > > > > > +PERMISSIONS AND SYSCTL > > +---------------------- > > +Since perf probe depends on ftrace (tracefs) and kallsyms (/proc/kallsyms), you have to care about the permission and some sysctl knobs. > > + > > + - Since tracefs and kallsyms requires root or privileged user to access it, the following perf probe commands also require it; --add, --del, --list (except for --cache option) > > + > > + - /proc/sys/kernel/kptr_restrict = 2 (restrict all users) also prevents perf probe to retrieve the important information from kallsyms. You also need to set to 1 (restrict non CAP_SYSLOG users) for the above commands. > > + > > + - Since the perf probe commands read the vmlinux and/or the debuginfo file, you need to ensure that you can read those files. > > 1) Last two points are applicable to kprobes only, not uprobes. Would > it make sense to clarify that? Ah, right. And the last one may be also related to uprobes. > 2) For 3rd point, simple perf probe on function entry will work without > vmlinux/debuginfo (by using kallsyms). Should we mention that? Hmm, that depends on the options. If we use -k option, it will get the symbols from the given vmlinux. > > In any case, > > Acked-by: Ravi Bangoria Thanks! I'll update it for uprobe. > > Ravi -- Masami Hiramatsu