[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202012042033.uEmgNBVJ-lkp@intel.com>
Date: Fri, 4 Dec 2020 20:11:47 +0800
From: kernel test robot <lkp@...el.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
Subject: drivers/android/binder.c:5015:13: warning: stack frame size of 2160
bytes in function 'binder_ioctl'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb
commit: ee0a49a6870ea75e25b4d4984c1bb6b3b7c65f2b powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()
date: 3 months ago
config: powerpc-randconfig-r016-20201204 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee0a49a6870ea75e25b4d4984c1bb6b3b7c65f2b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ee0a49a6870ea75e25b4d4984c1bb6b3b7c65f2b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
>> drivers/android/binder.c:5015:13: warning: stack frame size of 2160 bytes in function 'binder_ioctl' [-Wframe-larger-than=]
static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
^
1 warning generated.
vim +/binder_ioctl +5015 drivers/android/binder.c
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5014
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 @5015 static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5016 {
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5017 int ret;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5018 struct binder_proc *proc = filp->private_data;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5019 struct binder_thread *thread;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5020 unsigned int size = _IOC_SIZE(cmd);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5021 void __user *ubuf = (void __user *)arg;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5022
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5023 /*pr_info("binder_ioctl: %d:%d %x %lx\n",
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5024 proc->pid, current->pid, cmd, arg);*/
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5025
4175e2b46fd4b9 drivers/android/binder.c Sherry Yang 2017-08-23 5026 binder_selftest_alloc(&proc->alloc);
4175e2b46fd4b9 drivers/android/binder.c Sherry Yang 2017-08-23 5027
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5028 trace_binder_ioctl(cmd, arg);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5029
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5030 ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5031 if (ret)
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5032 goto err_unlocked;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5033
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5034 thread = binder_get_thread(proc);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5035 if (thread == NULL) {
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5036 ret = -ENOMEM;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5037 goto err;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5038 }
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5039
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5040 switch (cmd) {
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5041 case BINDER_WRITE_READ:
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5042 ret = binder_ioctl_write_read(filp, cmd, arg, thread);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5043 if (ret)
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5044 goto err;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5045 break;
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5046 case BINDER_SET_MAX_THREADS: {
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5047 int max_threads;
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5048
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5049 if (copy_from_user(&max_threads, ubuf,
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5050 sizeof(max_threads))) {
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5051 ret = -EINVAL;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5052 goto err;
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5053 }
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5054 binder_inner_proc_lock(proc);
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5055 proc->max_threads = max_threads;
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5056 binder_inner_proc_unlock(proc);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5057 break;
b3e6861283790d drivers/android/binder.c Todd Kjos 2017-06-29 5058 }
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5059 case BINDER_SET_CONTEXT_MGR_EXT: {
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5060 struct flat_binder_object fbo;
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5061
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5062 if (copy_from_user(&fbo, ubuf, sizeof(fbo))) {
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5063 ret = -EINVAL;
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5064 goto err;
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5065 }
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5066 ret = binder_ioctl_set_ctx_mgr(filp, &fbo);
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5067 if (ret)
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5068 goto err;
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5069 break;
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5070 }
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5071 case BINDER_SET_CONTEXT_MGR:
ec74136ded792d drivers/android/binder.c Todd Kjos 2019-01-14 5072 ret = binder_ioctl_set_ctx_mgr(filp, NULL);
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5073 if (ret)
78260ac625e91d drivers/staging/android/binder.c Tair Rzayev 2014-06-03 5074 goto err;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5075 break;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5076 case BINDER_THREAD_EXIT:
56b468fc709b2b drivers/staging/android/binder.c Anmol Sarma 2012-10-30 5077 binder_debug(BINDER_DEBUG_THREADS, "%d:%d exit\n",
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5078 proc->pid, thread->pid);
7a4408c6bd3eb1 drivers/android/binder.c Todd Kjos 2017-06-29 5079 binder_thread_release(proc, thread);
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5080 thread = NULL;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5081 break;
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5082 case BINDER_VERSION: {
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5083 struct binder_version __user *ver = ubuf;
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5084
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5085 if (size != sizeof(struct binder_version)) {
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5086 ret = -EINVAL;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5087 goto err;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5088 }
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5089 if (put_user(BINDER_CURRENT_PROTOCOL_VERSION,
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5090 &ver->protocol_version)) {
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5091 ret = -EINVAL;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5092 goto err;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5093 }
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5094 break;
36c89c0a6bebaf drivers/staging/android/binder.c Mathieu Maret 2014-04-15 5095 }
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5096 case BINDER_GET_NODE_INFO_FOR_REF: {
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5097 struct binder_node_info_for_ref info;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5098
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5099 if (copy_from_user(&info, ubuf, sizeof(info))) {
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5100 ret = -EFAULT;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5101 goto err;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5102 }
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5103
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5104 ret = binder_ioctl_get_node_info_for_ref(proc, &info);
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5105 if (ret < 0)
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5106 goto err;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5107
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5108 if (copy_to_user(ubuf, &info, sizeof(info))) {
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5109 ret = -EFAULT;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5110 goto err;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5111 }
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5112
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5113 break;
b7e6a8961b5d6d drivers/android/binder.c Martijn Coenen 2018-09-07 5114 }
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5115 case BINDER_GET_NODE_DEBUG_INFO: {
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5116 struct binder_node_debug_info info;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5117
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5118 if (copy_from_user(&info, ubuf, sizeof(info))) {
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5119 ret = -EFAULT;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5120 goto err;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5121 }
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5122
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5123 ret = binder_ioctl_get_node_debug_info(proc, &info);
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5124 if (ret < 0)
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5125 goto err;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5126
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5127 if (copy_to_user(ubuf, &info, sizeof(info))) {
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5128 ret = -EFAULT;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5129 goto err;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5130 }
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5131 break;
abcc61537e3566 drivers/android/binder.c Colin Cross 2017-08-31 5132 }
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5133 default:
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5134 ret = -EINVAL;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5135 goto err;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5136 }
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5137 ret = 0;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5138 err:
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5139 if (thread)
08dabceefee0ed drivers/android/binder.c Todd Kjos 2017-06-29 5140 thread->looper_need_return = false;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5141 wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2);
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5142 if (ret && ret != -ERESTARTSYS)
56b468fc709b2b drivers/staging/android/binder.c Anmol Sarma 2012-10-30 5143 pr_info("%d:%d ioctl %x %lx returned %d\n", proc->pid, current->pid, cmd, arg, ret);
975a1ac9a9fe65 drivers/staging/android/binder.c Arve Hjønnevåg 2012-10-16 5144 err_unlocked:
975a1ac9a9fe65 drivers/staging/android/binder.c Arve Hjønnevåg 2012-10-16 5145 trace_binder_ioctl_done(ret);
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5146 return ret;
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5147 }
355b0502f6efea drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 5148
:::::: The code at line 5015 was first introduced by commit
:::::: 78260ac625e91d2402d72dd2f8c7109f98c1d19a staging: android: binder.c: binder_ioctl() cleanup
:::::: TO: Tair Rzayev <tair.rzayev@...il.com>
:::::: 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" (21848 bytes)
Powered by blists - more mailing lists