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]
Date:   Wed, 14 Jun 2017 08:23:23 +0100
From:   Ian Arkver <ian.arkver.dev@...il.com>
To:     Ramesh Shanmugasundaram <ramesh.shanmugasundaram@...renesas.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "hverkuil@...all.nl" <hverkuil@...all.nl>,
        "mattw@...eaurora.org" <mattw@...eaurora.org>,
        "mitchelh@...eaurora.org" <mitchelh@...eaurora.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "yamada.masahiro@...ionext.com" <yamada.masahiro@...ionext.com>
Cc:     "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        Chris Paterson <Chris.Paterson2@...esas.com>
Subject: Re: [PATCH v2 0/2] Avoid namespace collision within macros & tidyup

On 14/06/17 08:18, Ramesh Shanmugasundaram wrote:
>> Subject: Re: [PATCH v2 0/2] Avoid namespace collision within macros &
>> tidyup
>>
>> On 13/06/17 14:33, Ramesh Shanmugasundaram wrote:
>>> Hi All,
>>>
>>> The readx_poll_timeout & similar macros defines local variable that
>>> can cause name space collision with the caller. Fixed this issue by
>>> prefixing them with underscores.
>>
>> The compound statement has a local variable scope, so these won't collide
>> with the caller I believe.
> 
> But xxx_poll_timeout is a macro??
> 
> Usage regmap_read_poll_timeout(..., timeout) with variable name "timeout" in the caller results in
> 
> include/linux/regmap.h:123:20: warning: 'timeout' is used uninitialized in this function [-Wuninitialized]
>    ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \
> 

Oh right, collide with a passed in variable, yes. Sorry.

>>
>>> Also tidied couple of instances where the macro arguments are used in
>>> expressions without paranthesis.
>>>
>>> This patchset is based on top of today's linux-next repo.
>>> commit bc4c75f41a1c ("Add linux-next specific files for 20170613")
>>>
>>> Change history:
>>>
>>> v2:
>>>    - iopoll.h:
>>> 	- Enclosed timeout_us & sleep_us arguments with paranthesis
>>>    - regmap.h:
>>> 	- Enclosed timeout_us & sleep_us arguments with paranthesis
>>> 	- Renamed pollret to __ret
>>>
>>> Note: timeout_us cause spare check warning as identified here [1].
>>>
>>> [1]
>>> https://www.mail-archive.com/linux-renesas-soc@vger.kernel.org/msg1513
>>> 8.html
>>>
>>> Thanks,
>>> Ramesh
>>>
>>> Ramesh Shanmugasundaram (2):
>>>     iopoll: Avoid namespace collision within macros & tidyup
>>>     regmap: Avoid namespace collision within macro & tidyup
>>>
>>>    include/linux/iopoll.h | 12 +++++++-----
>>>    include/linux/regmap.h | 17 +++++++++--------
>>>    2 files changed, 16 insertions(+), 13 deletions(-)
>>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ