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: <20220706134523.00000555@Huawei.com>
Date:   Wed, 6 Jul 2022 13:45:23 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     kernel test robot <lkp@...el.com>
CC:     <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
        <linux-kernel@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: drivers/iio/adc/ad7476.c:29:8: warning: Excessive padding in
 'struct ad7476_chip_info' (10 padding bytes, where 2 is optimal). Optimal
 fields order: reset, channel, convst_channel, int_vref_uv, has_vref,
 has_vdrive, consider reordering the fields or addin...



>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    21 warnings generated.
> >> drivers/iio/adc/ad7476.c:29:8: warning: Excessive padding in 'struct ad7476_chip_info' (10 padding bytes, where 2 is optimal). Optimal fields order: reset, channel, convst_channel, int_vref_uv, has_vref, has_vdrive, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]  
>    struct ad7476_chip_info {
>    ~~~~~~~^~~~~~~~~~~~~~~~~~
>    drivers/iio/adc/ad7476.c:29:8: note: Excessive padding in 'struct ad7476_chip_info' (10 padding bytes, where 2 is optimal). Optimal fields order: reset, channel, convst_channel, int_vref_uv, has_vref, has_vdrive, consider reordering the fields or adding explicit padding members
>    struct ad7476_chip_info {
>    ~~~~~~~^~~~~~~~~~~~~~~~~~
> >> drivers/iio/adc/ad7476.c:39:8: warning: Excessive padding in 'struct ad7476_state' (472 padding bytes, where 216 is optimal). Optimal fields order: data, spi, chip_info, ref_reg, convst_gpio, msg, xfer, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]  
>    struct ad7476_state {

For this one and I'm guessing some of the other IIO cases, if there is any way to suppress the warning where we have specific
alignments specified then that would be great. These are padded to ensure the buffers are DMA safe.

Thanks,

Jonathan


>    ~~~~~~~^~~~~~~~~~~~~~
>    drivers/iio/adc/ad7476.c:39:8: note: Excessive padding in 'struct ad7476_state' (472 padding bytes, where 216 is optimal). Optimal fields order: data, spi, chip_info, ref_reg, convst_gpio, msg, xfer, consider reordering the fields or adding explicit padding members
>    struct ad7476_state {
>    ~~~~~~~^~~~~~~~~~~~~~
>    Suppressed 19 warnings (7 in non-user code, 12 with check filters).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    20 warnings generated.
>    drivers/iio/adc/ad7766.c:35:8: warning: Excessive padding in 'struct ad7766' (392 padding bytes, where 136 is optimal). Optimal fields order: data, chip_info, spi, mclk, pd_gpio, trig, reg, msg, xfer, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
>    struct ad7766 {
>    ~~~~~~~^~~~~~~~
>    drivers/iio/adc/ad7766.c:35:8: note: Excessive padding in 'struct ad7766' (392 padding bytes, where 136 is optimal). Optimal fields order: data, chip_info, spi, mclk, pd_gpio, trig, reg, msg, xfer, consider reordering the fields or adding explicit padding members
>    struct ad7766 {
>    ~~~~~~~^~~~~~~~
>    Suppressed 19 warnings (7 in non-user code, 12 with check filters).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    20 warnings generated.
>    drivers/iio/adc/ad7768-1.c:154:8: warning: Excessive padding in 'struct ad7768_state' (388 padding bytes, where 132 is optimal). Optimal fields order: data, mclk_freq, spi, vref, mclk, trig, gpio_sync_in, labels, lock, completion, samp_freq, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
>    struct ad7768_state {
>    ~~~~~~~^~~~~~~~~~~~~~
>    drivers/iio/adc/ad7768-1.c:154:8: note: Excessive padding in 'struct ad7768_state' (388 padding bytes, where 132 is optimal). Optimal fields order: data, mclk_freq, spi, vref, mclk, trig, gpio_sync_in, labels, lock, completion, samp_freq, consider reordering the fields or adding explicit padding members
>    struct ad7768_state {
>    ~~~~~~~^~~~~~~~~~~~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ