From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)'
Date: Sat, 03 Oct 2026 07:56:33 +0200 [thread overview]
Message-ID: <202610030702.Dp597k8b-lkp@intel.com> (raw)
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
next reply other threads:[~2026-10-03 5:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 5:56 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-07 8:42 drivers/gpu/drm/sysfb/corebootdrm.c:103 corebootdrm_get_address_fb() warn: impossible condition '(size > (~0)) => (0-u64max > u64max)' kernel 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=202610030702.Dp597k8b-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.