From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933178AbbJAMyc (ORCPT ); Thu, 1 Oct 2015 08:54:32 -0400 Received: from mail.kernel.org ([198.145.29.136]:56983 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbbJAMy3 (ORCPT ); Thu, 1 Oct 2015 08:54:29 -0400 Date: Thu, 1 Oct 2015 09:54:23 -0300 From: Arnaldo Carvalho de Melo To: Taeung Song Cc: Ingo Molnar , "linux-kernel@vger.kernel.org" , jolsa@redhat.com, namhyung@kernel.org, Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH v1] perf report: Fix owner error when reading perf.data Message-ID: <20151001125423.GS1944@kernel.org> References: <1443690214-1194-1-git-send-email-treeze.taeung@gmail.com> <20151001091031.GA6543@gmail.com> <9B4B7598-A70C-4497-8ADC-204A6DA570CF@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9B4B7598-A70C-4497-8ADC-204A6DA570CF@gmail.com> X-Url: http://acmel.wordpress.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 Em Thu, Oct 01, 2015 at 09:26:26PM +0900, Taeung Song escreveu: > > On Oct 1, 2015, at 6:10 PM, Ingo Molnar wrote: > > * Taeung Song wrote: > >> If perf.data file is owned by some user, > >> it can't be read even if current user is root. > > That's intentional: to keep a malicious local user from passing a perf.data to > > root who does 'perf report' accidentally or in the wrong directory. > > root can copy or chown it to himself - or we could add some --really-force flag > > for that. > I got it. > I didn’t know its intention. Feel free to transform Ingo's comment in a C source code comment right besides the code doing that check, this way when someone else thinks this is wrong, like you did, the comment will clarify things. - Arnaldo