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>] [day] [month] [year] [list]
Message-ID: <0e2ef91b-a72d-b997-c7de-db8cc5b18137@intel.com>
Date:   Tue, 14 Sep 2021 14:21:57 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
CC:     <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
        <linux-kernel@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: drivers/gpio/gpio-virtio.c:23:8: warning: Excessive padding in
 'struct virtio_gpio_line' (122 padding bytes, where 58 is optimal).

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   78e709522d2c012cb0daad2e668506637bffb7c2
commit: 3a29355a22c0275fe864100794fee58a73175d93 gpio: Add virtio-gpio driver
date:   3 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 weeks ago
config: x86_64-randconfig-c007-20210911 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3a29355a22c0275fe864100794fee58a73175d93
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 3a29355a22c0275fe864100794fee58a73175d93
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/gpio/gpio-virtio.c:23:8: warning: Excessive padding in 'struct virtio_gpio_line' (122 padding bytes, where 58 is optimal).
    Optimal fields order:
    res,
    rxlen,
    completion,
    lock,
    req,
    consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]


vim +23 drivers/gpio/gpio-virtio.c

3a29355a22c027 Viresh Kumar 2021-08-19  22
3a29355a22c027 Viresh Kumar 2021-08-19 @23  struct virtio_gpio_line {
3a29355a22c027 Viresh Kumar 2021-08-19  24  	struct mutex lock; /* Protects line operation */
3a29355a22c027 Viresh Kumar 2021-08-19  25  	struct completion completion;
3a29355a22c027 Viresh Kumar 2021-08-19  26  	struct virtio_gpio_request req ____cacheline_aligned;
3a29355a22c027 Viresh Kumar 2021-08-19  27  	struct virtio_gpio_response res ____cacheline_aligned;
3a29355a22c027 Viresh Kumar 2021-08-19  28  	unsigned int rxlen;
3a29355a22c027 Viresh Kumar 2021-08-19  29  };
3a29355a22c027 Viresh Kumar 2021-08-19  30

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (31692 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ