[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16924163.rk3kQpxnsR@positron.chronox.de>
Date: Wed, 13 Nov 2019 00:13:09 +0100
From: Stephan Müller <smueller@...onox.de>
To: kbuild test robot <lkp@...el.com>
Cc: kbuild-all@...ts.01.org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-crypto@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
linux-api@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"Alexander E. Patrakov" <patrakov@...il.com>,
"Ahmed S. Darwish" <darwish.07@...il.com>,
"Theodore Y. Ts'o" <tytso@....edu>, Willy Tarreau <w@....eu>,
Matthew Garrett <mjg59@...f.ucam.org>,
Vito Caputo <vcaputo@...garu.com>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Jan Kara <jack@...e.cz>, Ray Strode <rstrode@...hat.com>,
William Jon McCann <mccann@....edu>,
zhangjs <zachary@...shancloud.com>,
Andy Lutomirski <luto@...nel.org>,
Florian Weimer <fweimer@...hat.com>,
Lennart Poettering <mzxreary@...inter.de>,
Nicolai Stange <nstange@...e.de>,
"Peter, Matthias" <matthias.peter@....bund.de>,
Marcelo Henrique Cerri <marcelo.cerri@...onical.com>,
Roman Drahtmueller <draht@...altsekun.de>,
Neil Horman <nhorman@...hat.com>
Subject: Re: [PATCH v24 12/12] LRNG - add interface for gathering of raw entropy
Am Dienstag, 12. November 2019, 21:55:10 CET schrieb kbuild test robot:
Hi kbuild,
> Hi "Stephan,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on char-misc/char-misc-testing]
> [also build test WARNING on v5.4-rc7 next-20191111]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system. BTW, we also suggest to use '--base' option to
> specify the base tree in git format-patch, please see
> https://stackoverflow.com/a/37406982]
>
> url:
> https://github.com/0day-ci/linux/commits/Stephan-M-ller/dev-random-a-new-ap
> proach-with-full-SP800-90B-compliance/20191113-040847 base:
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> 01b59c763fe2de845b65900485b141fdd7bbf93e config: sh-allmodconfig (attached
> as .config)
> compiler: sh4-linux-gcc (GCC) 7.4.0
> reproduce:
> wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> ~/bin/make.cross chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=sh
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@...el.com>
>
> All warnings (new ones prefixed by >>):
>
> drivers/char/lrng/lrng_testing.c: In function 'lrng_raw_extract_user':
> >> drivers/char/lrng/lrng_testing.c:237:1: warning: the frame size of 1076
> >> bytes is larger than 1024 bytes [-Wframe-larger-than=]
> }
> ^
>
> vim +237 drivers/char/lrng/lrng_testing.c
>
> 196
>
> 197 /**********************************************************************
> **** 198 * Debugfs interface
> 199
> **************************************************************************/
> 200 static int lrng_raw_extract_user(void __user *buf, size_t nbytes) 201 {
> 202 u8 tmp[LRNG_TESTING_RINGBUFFER_SIZE]
__aligned(sizeof(u32));
This is the offending line.
I will need to kzalloc the code here.
Thank you.
> 203 int ret = 0, large_request = (nbytes > 256);
> 204
> 205 while (nbytes) {
> 206 int i;
> 207
> 208 if (large_request && need_resched()) {
> 209 if (signal_pending(current)) {
> 210 if (ret == 0)
> 211 ret = -ERESTARTSYS;
> 212 break;
> 213 }
> 214 schedule();
> 215 }
> 216
> 217 i = min_t(int, nbytes, sizeof(tmp));
> 218 i = lrng_raw_entropy_reader(tmp, i);
> 219 if (i <= 0) {
> 220 if (i < 0)
> 221 ret = i;
> 222 break;
> 223 }
> 224 if (copy_to_user(buf, tmp, i)) {
> 225 ret = -EFAULT;
> 226 break;
> 227 }
> 228
> 229 nbytes -= i;
> 230 buf = (u8 *)buf + i;
> 231 ret += i;
> 232 }
> 233
> 234 memzero_explicit(tmp, sizeof(tmp));
> 235
> 236 return ret;
>
> > 237 }
>
> 238
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology
> Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel
> Corporation
Ciao
Stephan
Powered by blists - more mailing lists