From: kernel test robot <lkp@intel.com>
To: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: thomas.hellstrom@linux.intel.com, kbuild-all@lists.01.org,
keescook@chromium.org, jani.nikula@intel.com,
ndesaulniers@google.com, dlatypov@google.com,
linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk,
andrzej.hajda@intel.com, matthew.auld@intel.com, daniel@ffwll.ch,
airlied@redhat.com, mchehab@kernel.org, vitor@massaru.org,
nirmoy.das@intel.com
Subject: Re: [Intel-gfx] [PATCH v10 2/9] overflow: Move and add few utility macros into overflow
Date: Sun, 18 Sep 2022 07:31:20 +0800 [thread overview]
Message-ID: <202209180742.kE2Xbxqz-lkp@intel.com> (raw)
In-Reply-To: <20220909105913.752049-3-gwan-gyeong.mun@intel.com>
Hi Gwan-gyeong,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on linus/master v6.0-rc5]
[cannot apply to drm-intel/for-linux-next kees/for-next/hardening next-20220916]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Gwan-gyeong-Mun/Fixes-integer-overflow-or-integer-truncation-issues-in-page-lookups-ttm-place-configuration-and-scatterlist-creation/20220909-190301
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220918/202209180742.kE2Xbxqz-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/8d39d691758034d1082773e43b9cb4738b1f4387
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Gwan-gyeong-Mun/Fixes-integer-overflow-or-integer-truncation-issues-in-page-lookups-ttm-place-configuration-and-scatterlist-creation/20220909-190301
git checkout 8d39d691758034d1082773e43b9cb4738b1f4387
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/i915_user_extensions.c:56:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct i915_user_extension [noderef] __user *ext @@ got void *[noderef] __user @@
drivers/gpu/drm/i915/i915_user_extensions.c:56:21: sparse: expected struct i915_user_extension [noderef] __user *ext
drivers/gpu/drm/i915/i915_user_extensions.c:56:21: sparse: got void *[noderef] __user
vim +56 drivers/gpu/drm/i915/i915_user_extensions.c
15
16 int i915_user_extensions(struct i915_user_extension __user *ext,
17 const i915_user_extension_fn *tbl,
18 unsigned int count,
19 void *data)
20 {
21 unsigned int stackdepth = 512;
22
23 while (ext) {
24 int i, err;
25 u32 name;
26 u64 next;
27
28 if (!stackdepth--) /* recursion vs useful flexibility */
29 return -E2BIG;
30
31 err = check_user_mbz(&ext->flags);
32 if (err)
33 return err;
34
35 for (i = 0; i < ARRAY_SIZE(ext->rsvd); i++) {
36 err = check_user_mbz(&ext->rsvd[i]);
37 if (err)
38 return err;
39 }
40
41 if (get_user(name, &ext->name))
42 return -EFAULT;
43
44 err = -EINVAL;
45 if (name < count) {
46 name = array_index_nospec(name, count);
47 if (tbl[name])
48 err = tbl[name](ext, data);
49 }
50 if (err)
51 return err;
52
53 if (get_user(next, &ext->next_extension))
54 return -EFAULT;
55
> 56 if (check_assign_user_ptr(next, ext))
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-09-17 23:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 10:59 [Intel-gfx] [PATCH v10 0/9] Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 1/9] overflow: Allow mixed type arguments Gwan-gyeong Mun
2022-09-11 10:31 ` Andi Shyti
2022-09-12 8:38 ` Andrzej Hajda
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 2/9] overflow: Move and add few utility macros into overflow Gwan-gyeong Mun
2022-09-13 11:53 ` Kees Cook
2022-09-17 23:31 ` kernel test robot [this message]
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 3/9] compiler_types.h: Add assert_type to catch type mis-match while compiling Gwan-gyeong Mun
2022-09-11 11:04 ` Andi Shyti
2022-09-12 9:52 ` Rasmus Villemoes
2022-09-12 10:21 ` Andi Shyti
2022-09-13 12:01 ` Kees Cook
2022-09-21 14:10 ` Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 4/9] drm/i915/gem: Typecheck page lookups Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 5/9] drm/i915: Check for integer truncation on scatterlist creation Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 6/9] drm/i915: Check for integer truncation on the configuration of ttm place Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 7/9] drm/i915: Check if the size is too big while creating shmem file Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 8/9] drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large Gwan-gyeong Mun
2022-09-09 10:59 ` [Intel-gfx] [PATCH v10 9/9] drm/i915: Remove truncation warning for large objects Gwan-gyeong Mun
2022-09-09 11:24 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation Patchwork
2022-09-11 11:22 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation (rev2) Patchwork
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=202209180742.kE2Xbxqz-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@redhat.com \
--cc=andrzej.hajda@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dlatypov@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gwan-gyeong.mun@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=matthew.auld@intel.com \
--cc=mchehab@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nirmoy.das@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=vitor@massaru.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