From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 5/5] [RFC] mm: annotate memory allocation functions with their sizes
Date: Mon, 20 Jan 2020 19:57:55 +0800 [thread overview]
Message-ID: <202001201934.YqEXYoPu%lkp@intel.com> (raw)
In-Reply-To: <20200120074344.504-6-dja@axtens.net>
[-- Attachment #1: Type: text/plain, Size: 7899 bytes --]
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on next-20200117]
[cannot apply to staging/staging-testing char-misc/char-misc-testing kees/for-next/pstore linus/master v5.5-rc7 v5.5-rc6 v5.5-rc5 v5.5-rc7]
[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/Daniel-Axtens/Annotate-allocation-functions-with-alloc_size-attribute/20200120-155420
base: de970dffa7d19eae1d703c3534825308ef8d5dec
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.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.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/media//common/v4l2-tpg/v4l2-tpg-core.c: In function 'tpg_alloc':
>> drivers/media//common/v4l2-tpg/v4l2-tpg-core.c:138:4: warning: argument 1 value '4294967295' exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
vzalloc(array_size(pixelsz, max_w));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/media/tpg/v4l2-tpg.h:15:0,
from drivers/media//common/v4l2-tpg/v4l2-tpg-core.c:12:
include/linux/vmalloc.h:106:14: note: in a call to allocation function 'vzalloc' declared here
extern void *vzalloc(unsigned long size) __alloc_size(1);
^~~~~~~
vim +/4294967295 +138 drivers/media//common/v4l2-tpg/v4l2-tpg-core.c
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 111
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 112 int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 113 {
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 114 unsigned pat;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 115 unsigned plane;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 116
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 117 tpg->max_line_width = max_w;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 118 for (pat = 0; pat < TPG_MAX_PAT_LINES; pat++) {
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 119 for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
dde72bd773dfce drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-13 120 unsigned pixelsz = plane ? 2 : 4;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 121
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 122 tpg->lines[pat][plane] =
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 123 vzalloc(array3_size(max_w, 2, pixelsz));
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 124 if (!tpg->lines[pat][plane])
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 125 return -ENOMEM;
5d7c539e194af5 drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-07 126 if (plane == 0)
5d7c539e194af5 drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-07 127 continue;
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 128 tpg->downsampled_lines[pat][plane] =
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 129 vzalloc(array3_size(max_w, 2, pixelsz));
5d7c539e194af5 drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-07 130 if (!tpg->downsampled_lines[pat][plane])
5d7c539e194af5 drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-07 131 return -ENOMEM;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 132 }
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 133 }
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 134 for (plane = 0; plane < TPG_MAX_PLANES; plane++) {
dde72bd773dfce drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2015-03-13 135 unsigned pixelsz = plane ? 2 : 4;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 136
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 137 tpg->contrast_line[plane] =
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 @138 vzalloc(array_size(pixelsz, max_w));
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 139 if (!tpg->contrast_line[plane])
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 140 return -ENOMEM;
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 141 tpg->black_line[plane] =
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 142 vzalloc(array_size(pixelsz, max_w));
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 143 if (!tpg->black_line[plane])
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 144 return -ENOMEM;
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 145 tpg->random_line[plane] =
fad953ce0b22cf drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Kees Cook 2018-06-12 146 vzalloc(array3_size(max_w, 2, pixelsz));
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 147 if (!tpg->random_line[plane])
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 148 return -ENOMEM;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 149 }
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 150 return 0;
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 151 }
e07d46e7e0da86 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c Helen Mae Koike Fornazier 2016-04-08 152 EXPORT_SYMBOL_GPL(tpg_alloc);
63881df94d3ecb drivers/media/platform/vivid/vivid-tpg.c Hans Verkuil 2014-08-25 153
:::::: The code at line 138 was first introduced by commit
:::::: fad953ce0b22cfd352a9a90b070c34b8791e6868 treewide: Use array_size() in vzalloc()
:::::: TO: Kees Cook <keescook@chromium.org>
:::::: CC: Kees Cook <keescook@chromium.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 53660 bytes --]
next prev parent reply other threads:[~2020-01-20 11:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 7:43 [PATCH 0/5] Annotate allocation functions with alloc_size attribute Daniel Axtens
2020-01-20 7:43 ` [PATCH 1/5] altera-stapl: altera_get_note: prevent write beyond end of 'key' Daniel Axtens
2020-01-20 7:43 ` [PATCH 2/5] [RFC] kasan: kasan_test: hide allocation sizes from the compiler Daniel Axtens
2020-01-20 7:43 ` [PATCH 3/5] [RFC] staging: rts5208: make len a u16 in rtsx_write_cfg_seq Daniel Axtens
2020-01-20 7:43 ` [PATCH 4/5] [VERY RFC] mm: kmalloc(_node): return NULL immediately for SIZE_MAX Daniel Axtens
2020-01-20 11:14 ` Michal Hocko
2020-01-20 22:51 ` Daniel Axtens
2020-01-20 7:43 ` [PATCH 5/5] [RFC] mm: annotate memory allocation functions with their sizes Daniel Axtens
2020-01-20 11:57 ` kbuild test robot [this message]
2020-02-07 20:38 ` Daniel Micay
2020-02-07 20:38 ` Daniel Micay
2020-02-25 18:35 ` Kees Cook
2020-02-26 6:07 ` Daniel Axtens
2020-02-26 21:56 ` Kees Cook
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=202001201934.YqEXYoPu%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.