Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754968AbdDRAMF (ORCPT ); Mon, 17 Apr 2017 20:12:05 -0400 Received: from cmta19.telus.net ([209.171.16.92]:34581 "EHLO cmta19.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdDRAMD (ORCPT ); Mon, 17 Apr 2017 20:12:03 -0400 X-Authority-Analysis: v=2.2 cv=KM61NBNo c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=L50RfCvD9m0vuGvvl1cA:9 a=QEXdDO2ut3YA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 From: "Doug Smythies" To: "'Rafael J. Wysocki'" Cc: "'Srinivas Pandruvada'" , "'Rafael J. Wysocki'" , "'Len Brown'" , "'Linux Kernel Mailing List'" , "'Linux PM'" , "Doug Smythies" References: <1492355834-7793-1-git-send-email-dsmythies@telus.net> zt6UczvfGopZnzt6WcBT3m In-Reply-To: zt6UczvfGopZnzt6WcBT3m Subject: RE: [RESEND PATCH] tools/power/x86/intel_pstate_tracer: Adjust directory permissions Date: Mon, 17 Apr 2017 17:11:57 -0700 Message-ID: <001801d2b7d8$662b7a30$32826e90$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdK3BMiTJm+nMfU8RW+ITzJpEmpDoAA0exXQ Content-Language: en-ca X-CMAE-Envelope: MS4wfBo4gX0sNeQAdIT0epLZ0G9Qb1Ah1CHsA8Gz6FkF2n7kAqGkvqmFCffMm2WYxqYZk04UYQfaVQNoKptT6IjyQD2U+agHBddk6HpSs6JfNY1alL7NkzdJ 3ZA0w9F28aTeUrrrULs0AdNkhhOl3UMgJ3bbYi6Th47IpNTucuONQnNQWV8Hwhw3Z4++tKa4IAfvgxd/WljTPeYj1Lj7UjW8GdZW7AFZX/LRwF2UQ5gkrCsA 8sKEfgIF1f+qhLuIU59Dr+64ZvTRraVI5yyI0GaSN7aVhOJ/XlCUevZRo8YFC/XhlW9TZaZczMdTxnrrU7pvhTVucZae7FXDoEFVhe3VMsU67uR3t0YpbNcN RGcAffDJxkskkav+tA0FpUwIJ13tlA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 30 On 2107.04.16 15:57 Rafael J. Wysocki wrote: > On Sun, Apr 16, 2017 at 5:17 PM, Doug Smythies wrote: >> Depending on what is being done, the intel_pstate_tracer.py script >> needs to be run as root, or can be run as a regular user. >> If run the first time as root the results directory will be >> incorrect for any subsequent run as a regular user. > > Which is OK. > > For security reasons, non-root should not be able to modify root-owned > directories. Hi Rafael, I do not see a security issue here. The objective was to merge what used to be two steps (with the old, never released, post processing tools) into one step. The only reason "root" was ever needed was for the actual trace step. In the past everything else could be done as a regular user. Even when the two step method is used and we are processing a previously acquired (as "root"), it is preferred to do so as a regular user. Anyway, in a minute I will send a version 2 of the patch, where the user and group IDs are changed to regular user, rather than changing permissions. ... Doug