lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b65b1063-941b-2838-4564-f6a6c40509c6@linux.vnet.ibm.com>
Date:   Mon, 14 Oct 2019 15:08:48 +0530
From:   Abhishek <huntbag@...ux.vnet.ibm.com>
To:     shuah <shuah@...nel.org>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     trenn@...e.com, ego@...ux.vnet.ibm.com
Subject: Re: [PATCH v2] cpupower : Handle set and info subcommands correctly

Hi Shuah,


On 10/04/2019 03:45 AM, shuah wrote:
> Hi Abhishek,
>
> On 10/3/19 8:38 AM, shuah wrote:
>> On 9/13/19 2:07 AM, Abhishek Goel wrote:
>>> Cpupower tool has set and info options which are being used only by
>>> x86 machines. This patch removes support for these two subcommands
>>> from generic cpupower utility. Thus, these two subcommands will now be
>>> available only for intel.
>>> This removes the ambiguous error message while using set option in case
>>> of using non-intel systems.
>>>
>>> Without this patch on a non-intel box:
>>>
>>> root@...ntu:~# cpupower info
>>> System does not support Intel's performance bias setting
>>>
>>> root@...ntu:~# cpupower set -b 10
>>> Error setting perf-bias value on CPU
>>>
>>> With this patch on a non-intel box:
>>>
>>> root@...ntu:~# cpupower info
>>> Supported commands are:
>>>          frequency-info
>>>          frequency-set
>>>          idle-info
>>>          idle-set
>>>          monitor
>>>          help
>>>
>>> Same result for set subcommand.
>>>
>>> This patch does not affect results on a intel box.
>>>
>>> Signed-off-by: Abhishek Goel <huntbag@...ux.vnet.ibm.com>
>>> Acked-by: Thomas Renninger <trenn@...e.de>
>>> ---
>>>
>>> changes from v1:
>>>     Instead of bailing out early in set and info commands, in V2, we
>>>     are cutting out support for these two commands for non-intel
>>>     systems.
>>
>> thanks. I will get this in for 5.4-rc3 veru likely. Definitely in 5.4
>>
>
> Okay I almost applied this and decided it needs improvements.
>
> I don't like using #if defined(__x86_64__) || defined(__i386__)
>
> tools/power/cpupower/utils/cpupower.c main() already does this
> dynamically using uname(). Please use the same logic do this,
> instead of adding compile time code.
>
> thanks,
> -- Shuah

Do you want the decision to be taken in cpupower-set and cpupower-info
file as was done in v1 but using uname() by identifying the architecture
there itself?

Thanks,
--Abhishek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ