From: kbuild test robot <lkp@intel.com>
To: Aristeu Rozanski <aris@redhat.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] sysctl: do not allow a 64bit value write in a 32bit knob
Date: Tue, 28 Aug 2018 12:43:49 +0800 [thread overview]
Message-ID: <201808281147.bOuMfCfN%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180827202706.olt3saqjzzzyax6i@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]
Hi Aristeu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.19-rc1 next-20180827]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Aristeu-Rozanski/sysctl-do-not-allow-a-64bit-value-write-in-a-32bit-knob/20180828-043801
config: microblaze-mmu_defconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=microblaze
All warnings (new ones prefixed by >>):
kernel/sysctl.c: In function 'do_proc_dointvec_minmax_conv':
>> kernel/sysctl.c:2558:14: warning: right shift count >= width of type [-Wshift-count-overflow]
*lvalp >> (sizeof(int) * 8))
^~
vim +2558 kernel/sysctl.c
2548
2549 static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
2550 int *valp,
2551 int write, void *data)
2552 {
2553 struct do_proc_dointvec_minmax_conv_param *param = data;
2554 if (write) {
2555 int val = *negp ? -*lvalp : *lvalp;
2556 if ((param->min && *param->min > val) ||
2557 (param->max && *param->max < val) ||
> 2558 *lvalp >> (sizeof(int) * 8))
2559 return -EINVAL;
2560 *valp = val;
2561 } else {
2562 int val = *valp;
2563 if (val < 0) {
2564 *negp = true;
2565 *lvalp = -(unsigned long)val;
2566 } else {
2567 *negp = false;
2568 *lvalp = (unsigned long)val;
2569 }
2570 }
2571 return 0;
2572 }
2573
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12811 bytes --]
next prev parent reply other threads:[~2018-08-28 4:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 20:27 Aristeu Rozanski
2018-08-28 4:43 ` kbuild test robot [this message]
2018-08-28 7:21 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201808281147.bOuMfCfN%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=aris@redhat.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®