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,
jani.nikula@intel.com, llvm@lists.linux.dev,
dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk,
airlied@linux.ie, matthew.auld@intel.com, mchehab@kernel.org,
nirmoy.das@intel.com
Subject: Re: [Intel-gfx] [PATCH v3 5/7] drm/i915: Check if the size is too big while creating shmem file
Date: Sat, 16 Jul 2022 11:12:00 +0800 [thread overview]
Message-ID: <202207161058.dmOZoQzg-lkp@intel.com> (raw)
In-Reply-To: <20220714090807.2340818-6-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]
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/20220714-171019
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220716/202207161058.dmOZoQzg-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 2da550140aa98cf6a3e96417c87f1e89e3a26047)
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
# https://github.com/intel-lab-lkp/linux/commit/2938379499047baf3189503913f438fda6ea92eb
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/20220714-171019
git checkout 2938379499047baf3189503913f438fda6ea92eb
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/gem/i915_gem_shmem.c:550:11: warning: result of comparison of constant 17592186040320 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
if (size > MAX_LFS_FILESIZE)
~~~~ ^ ~~~~~~~~~~~~~~~~
1 warning generated.
vim +550 drivers/gpu/drm/i915/gem/i915_gem_shmem.c
534
535 static int __create_shmem(struct drm_i915_private *i915,
536 struct drm_gem_object *obj,
537 resource_size_t size)
538 {
539 unsigned long flags = VM_NORESERVE;
540 struct file *filp;
541
542 drm_gem_private_object_init(&i915->drm, obj, size);
543
544 /* XXX: The __shmem_file_setup() function returns -EINVAL if size is
545 * greater than MAX_LFS_FILESIZE.
546 * To handle the same error as other code that returns -E2BIG when
547 * the size is too large, we add a code that returns -E2BIG when the
548 * size is larger than the size that can be handled.
549 */
> 550 if (size > MAX_LFS_FILESIZE)
551 return -E2BIG;
552
553 if (i915->mm.gemfs)
554 filp = shmem_file_setup_with_mnt(i915->mm.gemfs, "i915", size,
555 flags);
556 else
557 filp = shmem_file_setup("i915", size, flags);
558 if (IS_ERR(filp))
559 return PTR_ERR(filp);
560
561 obj->filp = filp;
562 return 0;
563 }
564
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-07-16 14:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 9:08 [Intel-gfx] [PATCH v3 0/7] Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation Gwan-gyeong Mun
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 1/7] drm: Move and add a few utility macros into drm util header Gwan-gyeong Mun
2022-07-14 11:19 ` Mauro Carvalho Chehab
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 2/7] drm/i915/gem: Typecheck page lookups Gwan-gyeong Mun
2022-07-14 11:23 ` Mauro Carvalho Chehab
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 3/7] drm/i915: Check for integer truncation on scatterlist creation Gwan-gyeong Mun
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 4/7] drm/i915: Check for integer truncation on the configuration of ttm place Gwan-gyeong Mun
2022-07-14 11:26 ` Mauro Carvalho Chehab
2022-07-16 3:01 ` kernel test robot
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 5/7] drm/i915: Check if the size is too big while creating shmem file Gwan-gyeong Mun
2022-07-16 3:01 ` kernel test robot
2022-07-16 3:12 ` kernel test robot [this message]
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 6/7] drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large Gwan-gyeong Mun
2022-07-14 9:08 ` [Intel-gfx] [PATCH v3 7/7] drm/i915: Remove truncation warning for large objects Gwan-gyeong Mun
2022-07-14 11:44 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation (rev4) Patchwork
2022-07-15 8:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation (rev5) Patchwork
2022-07-15 8:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-15 10:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=202207161058.dmOZoQzg-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--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=llvm@lists.linux.dev \
--cc=matthew.auld@intel.com \
--cc=mchehab@kernel.org \
--cc=nirmoy.das@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/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