RE: [RESEND PATCH] tools/power/x86/intel_pstate_tracer: Adjust directory permissions

From: Doug Smythies
Date: Mon Apr 17 2017 - 20:12:08 EST


On 2107.04.16 15:57 Rafael J. Wysocki wrote:
> On Sun, Apr 16, 2017 at 5:17 PM, Doug Smythies <doug.smythies@xxxxxxxxx> 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