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: <422ade1b-8e88-d6dc-ae4e-799e729932b7@intel.com>
Date:   Thu, 19 Aug 2021 22:49:13 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Matti Vaittinen <mazziesaccount@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Cristian Marussi <cristian.marussi@....com>
CC:     <clang-built-linux@...glegroups.com>, <kbuild-all@...ts.01.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning:
 Excessive padding in 'struct bd718xx_regulator_data' (8 padding bytes, where
 0 is optimal).

Hi,

On 8/19/2021 1:34 PM, Matti Vaittinen wrote:
> Hi,
> 
> On Thu, Aug 19, 2021 at 6:26 AM kernel test robot <yujie.liu@...el.com> wrote:
>>   >> drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive
>> padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is
>> optimal).
>>      Optimal fields order:
>>      dvs,
>>      additional_inits,
>>      additional_init_amnt,
>>      init,
>>      desc,
>>      consider reordering the fields or adding explicit padding members
>> [clang-analyzer-optin.performance.Padding]
>>      struct bd718xx_regulator_data {
>>      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
>>      drivers/regulator/bd718x7-regulator.c:531:8: note: Excessive padding
>> in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is
>> optimal). Optimal fields order: dvs, additional_inits,
>> additional_init_amnt, init, desc, consider reordering the fields or
>> adding explicit padding members
>>      struct bd718xx_regulator_data {
>>      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> 
> I don't have a good feeling about these checks. Especially when a
> struct is composed of other structs - which may be modified
> independently of the code we are looking at here. Any unrelated
> addition of a member to any of the structs (well, maybe not the one at
> the bottom). I guess fixing all the users of these structs when
> something changes would cause quite a churn of changes... What is
> expected to be done as a result from these mails?
> 
> Best Regards
>      -- Matti
> 

Sorry for bothering, we'll ignore struct padding warnings next time.

Best Regards,
Yujie Liu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ