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] [day] [month] [year] [list]
Date:	Tue, 1 Sep 2015 18:40:46 +0000 (UTC)
From:	Keith Busch <keith.busch@...el.com>
To:	Mark Brown <broonie@...nel.org>
cc:	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Keith Busch <keith.busch@...el.com>,
	linux-kernel@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH] Regulator: Suppress compiler warnings

On Tue, 1 Sep 2015, Mark Brown wrote:
> On Tue, Sep 01, 2015 at 09:52:13AM +0900, Krzysztof Kozlowski wrote:
>> 2015-09-01 1:41 GMT+09:00 Keith Busch <keith.busch@...el.com>:
>>>  int regulator_is_enabled_regmap(struct regulator_dev *rdev)
>>>  {
>>> -       unsigned int val;
>>> +       unsigned int uninitialized_var(val);
>>>         int ret;
>>>
>>>         ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val);
>
>> This is quite common pattern so such work-around should be added to
>> many other functions leading to code obfuscation. Which compiler do
>> you have in mind?
>
> Right, plus this will shut up valid compiler warnings which is poor
> practice anyway.  I'd say this is a bug in the compiler.

Using gcc 4.7.2 with '-Os'. The warning does not happen when that option
is not used, i.e. disable CONFIG_CC_OPTIMIZE_FOR_SIZE.

I will certainly try other gcc versions with the same config and see
what happens.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ