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]
Date:   Thu, 15 Apr 2021 11:39:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bhaumik Bhatt <bbhatt@...eaurora.org>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: drivers/bus/mhi/core/pm.c:740:6: warning: stack frame size of 3568
 bytes in function 'mhi_pm_st_worker'

Hi Bhaumik,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7f75285ca572eaabc028cf78c6ab5473d0d160be
commit: 556bbb442bbb44f429dbaa9f8b48e0b4cda6e088 bus: mhi: core: Separate system error and power down handling
date:   5 months ago
config: powerpc64-randconfig-r034-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=556bbb442bbb44f429dbaa9f8b48e0b4cda6e088
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 556bbb442bbb44f429dbaa9f8b48e0b4cda6e088
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64 

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

All warnings (new ones prefixed by >>):

   ^
   arch/powerpc/include/asm/io.h:522:62: note: expanded from macro '__do_outl'
   #define __do_outl(val, port)    writel(val,(PCI_IO_ADDR)_IO_BASE+port);
                                              ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:236:1: note: expanded from here
   __do_insb
   ^
   arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
   #define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:238:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:2:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:4:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:6:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/bus/mhi/core/pm.c:10:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:8:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/bus/mhi/core/pm.c:740:6: warning: stack frame size of 3568 bytes in function 'mhi_pm_st_worker' [-Wframe-larger-than=]
   void mhi_pm_st_worker(struct work_struct *work)
        ^
   13 warnings generated.


vim +/mhi_pm_st_worker +740 drivers/bus/mhi/core/pm.c

a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  738  
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  739  /* Device State Transition worker */
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 @740  void mhi_pm_st_worker(struct work_struct *work)
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  741  {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  742  	struct state_transition *itr, *tmp;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  743  	LIST_HEAD(head);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  744  	struct mhi_controller *mhi_cntrl = container_of(work,
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  745  							struct mhi_controller,
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  746  							st_worker);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  747  	struct device *dev = &mhi_cntrl->mhi_dev->dev;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  748  
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  749  	spin_lock_irq(&mhi_cntrl->transition_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  750  	list_splice_tail_init(&mhi_cntrl->transition_list, &head);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  751  	spin_unlock_irq(&mhi_cntrl->transition_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  752  
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  753  	list_for_each_entry_safe(itr, tmp, &head, node) {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  754  		list_del(&itr->node);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  755  		dev_dbg(dev, "Handling state transition: %s\n",
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  756  			TO_DEV_STATE_TRANS_STR(itr->state));
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  757  
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  758  		switch (itr->state) {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  759  		case DEV_ST_TRANSITION_PBL:
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  760  			write_lock_irq(&mhi_cntrl->pm_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  761  			if (MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state))
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  762  				mhi_cntrl->ee = mhi_get_exec_env(mhi_cntrl);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  763  			write_unlock_irq(&mhi_cntrl->pm_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  764  			if (MHI_IN_PBL(mhi_cntrl->ee))
560e3a045961ed Bhaumik Bhatt         2020-05-21  765  				mhi_fw_load_handler(mhi_cntrl);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  766  			break;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  767  		case DEV_ST_TRANSITION_SBL:
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  768  			write_lock_irq(&mhi_cntrl->pm_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  769  			mhi_cntrl->ee = MHI_EE_SBL;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  770  			write_unlock_irq(&mhi_cntrl->pm_lock);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  771  			/*
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  772  			 * The MHI devices are only created when the client
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  773  			 * device switches its Execution Environment (EE) to
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  774  			 * either SBL or AMSS states
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  775  			 */
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  776  			mhi_create_devices(mhi_cntrl);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  777  			break;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  778  		case DEV_ST_TRANSITION_MISSION_MODE:
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  779  			mhi_pm_mission_mode_transition(mhi_cntrl);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  780  			break;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  781  		case DEV_ST_TRANSITION_READY:
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  782  			mhi_ready_state_transition(mhi_cntrl);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  783  			break;
bc7ccce5a5192c Hemant Kumar          2020-05-21  784  		case DEV_ST_TRANSITION_SYS_ERR:
556bbb442bbb44 Bhaumik Bhatt         2020-11-09  785  			mhi_pm_sys_error_transition(mhi_cntrl);
bc7ccce5a5192c Hemant Kumar          2020-05-21  786  			break;
3c1bd0047124f5 Hemant Kumar          2020-05-21  787  		case DEV_ST_TRANSITION_DISABLE:
3c1bd0047124f5 Hemant Kumar          2020-05-21  788  			mhi_pm_disable_transition
3c1bd0047124f5 Hemant Kumar          2020-05-21  789  				(mhi_cntrl, MHI_PM_SHUTDOWN_PROCESS);
3c1bd0047124f5 Hemant Kumar          2020-05-21  790  			break;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  791  		default:
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  792  			break;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  793  		}
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  794  		kfree(itr);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  795  	}
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  796  }
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20  797  

:::::: The code at line 740 was first introduced by commit
:::::: a6e2e3522f29141b95c1ef8580c665a3582b3e66 bus: mhi: core: Add support for PM state transitions

:::::: TO: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
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" (28998 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ