All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)'
@ 2026-10-03  5:56 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-10-03  5:56 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Thomas Zimmermann <tzimmermann@suse.de>
CC: Javier Martinez Canillas <javierm@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e767a4ea70a3992c37ed604157d32f0dfbf9b1e3
commit: a29a1f0ec8d69ee917a9d4c84b844df0decff0ef drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers
date:   8 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 8 months ago
config: powerpc-randconfig-r2201-20261003 (https://download.01.org/0day-ci/archive/20261003/202610030702.Dp597k8b-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: a29a1f0ec8d6 ("drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202610030702.Dp597k8b-lkp@intel.com/

smatch warnings:
drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)'

vim +103 drivers/gpu/drm/sysfb/corebootdrm.c

a29a1f0ec8d69e Thomas Zimmermann 2026-02-17   99  
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  100  static phys_addr_t corebootdrm_get_address_fb(struct drm_device *dev, resource_size_t size,
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  101  					      const struct lb_framebuffer *fb)
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  102  {
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17 @103  	if (size > PHYS_ADDR_MAX)
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  104  		return 0;
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  105  	if (!fb->physical_address)
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  106  		return 0;
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  107  	if (fb->physical_address > (PHYS_ADDR_MAX - size))
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  108  		return 0;
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  109  
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  110  	return fb->physical_address;
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  111  }
a29a1f0ec8d69e Thomas Zimmermann 2026-02-17  112  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread
* drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)'
@ 2026-06-07  8:42 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-06-07  8:42 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Thomas Zimmermann <tzimmermann@suse.de>
CC: Javier Martinez Canillas <javierm@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8e65320d91cdc3b241d4b94855c88459b91abf66
commit: a29a1f0ec8d69ee917a9d4c84b844df0decff0ef drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers
date:   4 months ago
:::::: branch date: 32 hours ago
:::::: commit date: 4 months ago
config: arm-randconfig-r072-20260606 (https://download.01.org/0day-ci/archive/20260607/202606071621.XimUx4xM-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 7917772d7d61384696c61102c08c2ea158e610fa)
smatch: v0.5.0-9185-gbcc58b9c

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: a29a1f0ec8d6 ("drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202606071621.XimUx4xM-lkp@intel.com/

smatch warnings:
drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)'

vim +103 drivers/gpu/drm/sysfb/corebootdrm.c

a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17   99  
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  100  static phys_addr_t corebootdrm_get_address_fb(struct drm_device *dev, resource_size_t size,
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  101  					      const struct lb_framebuffer *fb)
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  102  {
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17 @103  	if (size > PHYS_ADDR_MAX)
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  104  		return 0;
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  105  	if (!fb->physical_address)
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  106  		return 0;
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  107  	if (fb->physical_address > (PHYS_ADDR_MAX - size))
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  108  		return 0;
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  109  
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  110  	return fb->physical_address;
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  111  }
a29a1f0ec8d69ee Thomas Zimmermann 2026-02-17  112  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-03  5:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03  5:56 drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-07  8:42 kernel test robot

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.