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: <202105161848.bZbeZmlw-lkp@intel.com>
Date:   Sun, 16 May 2021 18:09:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ronnie Sahlberg <lsahlber@...hat.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, Steve French <stfrench@...rosoft.com>
Subject: fs/cifs/sess.c:78:5: warning: stack frame size of 1168 bytes in
 function 'cifs_try_adding_channels'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   63d1cb53e26a9a4168b84a8981b225c0a9cfa235
commit: 387ec58f339b0c45e3767395f11fa8dd3772131e cifs: simplify handling of cifs_sb/ctx->local_nls
date:   5 months ago
config: powerpc64-randconfig-r023-20210516 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
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=387ec58f339b0c45e3767395f11fa8dd3772131e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 387ec58f339b0c45e3767395f11fa8dd3772131e
        # 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 >>):

>> fs/cifs/sess.c:78:5: warning: stack frame size of 1168 bytes in function 'cifs_try_adding_channels' [-Wframe-larger-than=]
   int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
       ^
   1 warning generated.


vim +/cifs_try_adding_channels +78 fs/cifs/sess.c

    76	
    77	/* returns number of channels added */
  > 78	int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
    79	{
    80		int old_chan_count = ses->chan_count;
    81		int left = ses->chan_max - ses->chan_count;
    82		int i = 0;
    83		int rc = 0;
    84		int tries = 0;
    85		struct cifs_server_iface *ifaces = NULL;
    86		size_t iface_count;
    87	
    88		if (left <= 0) {
    89			cifs_dbg(FYI,
    90				 "ses already at max_channels (%zu), nothing to open\n",
    91				 ses->chan_max);
    92			return 0;
    93		}
    94	
    95		if (ses->server->dialect < SMB30_PROT_ID) {
    96			cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
    97			return 0;
    98		}
    99	
   100		/*
   101		 * Make a copy of the iface list at the time and use that
   102		 * instead so as to not hold the iface spinlock for opening
   103		 * channels
   104		 */
   105		spin_lock(&ses->iface_lock);
   106		iface_count = ses->iface_count;
   107		if (iface_count <= 0) {
   108			spin_unlock(&ses->iface_lock);
   109			cifs_dbg(VFS, "no iface list available to open channels\n");
   110			return 0;
   111		}
   112		ifaces = kmemdup(ses->iface_list, iface_count*sizeof(*ifaces),
   113				 GFP_ATOMIC);
   114		if (!ifaces) {
   115			spin_unlock(&ses->iface_lock);
   116			return 0;
   117		}
   118		spin_unlock(&ses->iface_lock);
   119	
   120		/*
   121		 * Keep connecting to same, fastest, iface for all channels as
   122		 * long as its RSS. Try next fastest one if not RSS or channel
   123		 * creation fails.
   124		 */
   125		while (left > 0) {
   126			struct cifs_server_iface *iface;
   127	
   128			tries++;
   129			if (tries > 3*ses->chan_max) {
   130				cifs_dbg(FYI, "too many channel open attempts (%d channels left to open)\n",
   131					 left);
   132				break;
   133			}
   134	
   135			iface = &ifaces[i];
   136			if (is_ses_using_iface(ses, iface) && !iface->rss_capable) {
   137				i = (i+1) % iface_count;
   138				continue;
   139			}
   140	
   141			rc = cifs_ses_add_channel(cifs_sb, ses, iface);
   142			if (rc) {
   143				cifs_dbg(FYI, "failed to open extra channel on iface#%d rc=%d\n",
   144					 i, rc);
   145				i = (i+1) % iface_count;
   146				continue;
   147			}
   148	
   149			cifs_dbg(FYI, "successfully opened new channel on iface#%d\n",
   150				 i);
   151			left--;
   152		}
   153	
   154		kfree(ifaces);
   155		return ses->chan_count - old_chan_count;
   156	}
   157	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ