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: <AM0PR04MB6434A12D2DCB42ECAA7EB1FAEE010@AM0PR04MB6434.eurprd04.prod.outlook.com>
Date:   Thu, 23 May 2019 23:09:18 +0000
From:   Leonard Crestez <leonard.crestez@....com>
To:     Stephen Boyd <swboyd@...omium.org>,
        Fabiano Rosas <farosas@...ux.ibm.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jan Kiszka <jan.kiszka@...mens.com>,
        Kieran Bingham <kbingham@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jackie Liu <liuyun01@...inos.cn>
Subject: Re: [PATCH] scripts/gdb: Fix invocation when CONFIG_COMMON_CLK is not
 set

On 5/24/2019 1:46 AM, Stephen Boyd wrote:
> Quoting Fabiano Rosas (2019-05-23 12:53:11)
>> diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
>> index 1d73083da6cb..2efbec6b6b8d 100644
>> --- a/scripts/gdb/linux/constants.py.in
>> +++ b/scripts/gdb/linux/constants.py.in
>> @@ -40,7 +40,8 @@
>>   import gdb
>>   
>>   /* linux/clk-provider.h */
>> -LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
>> +if IS_BUILTIN(CONFIG_COMMON_CLK):
>> +    LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
>>   
> 
> Why is this LX_GDBPARSED() instead of LX_VALUE()? From what I can tell
> it doesn't need to be runtime evaluated, just assigned to something that
> is macro expanded by CPP.

Because CLK_GET_RATE_NOCACHE expands to BIT() which expands to a 
constant with an UL suffix which python doesn't understand.

Alternatively we could redefine the BIT macros inside constants.py.in 
but using gdb features seemed better. We could even try to strip integer 
literal suffixes with sed.

Mentioned before: https://lkml.org/lkml/2019/5/3/341

--
Regards,
Leonard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ