From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: kernel test robot <lkp@intel.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
oe-kbuild-all@lists.linux.dev, Lee Jones <lee@kernel.org>,
Pavel Machek <pavel@kernel.org>
Subject: Re: [PATCH v1 1/1] leds: pca955x: Avoid potential overflow when filling default_label
Date: Sun, 6 Apr 2025 15:37:37 +0300 [thread overview]
Message-ID: <Z_J1kV6P3CgaE5WF@smile.fi.intel.com> (raw)
In-Reply-To: <202504050256.SYq06TxB-lkp@intel.com>
On Sat, Apr 05, 2025 at 02:58:17AM +0800, kernel test robot wrote:
> Hi Andy,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on v6.14]
> [cannot apply to lee-leds/for-leds-next linus/master next-20250404]
> [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/Andy-Shevchenko/leds-pca955x-Avoid-potential-overflow-when-filling-default_label/20250405-003054
> base: v6.14
> patch link: https://lore.kernel.org/r/20250404162849.3650361-1-andriy.shevchenko%40linux.intel.com
> patch subject: [PATCH v1 1/1] leds: pca955x: Avoid potential overflow when filling default_label
> config: powerpc-randconfig-003-20250405 (https://download.01.org/0day-ci/archive/20250405/202504050256.SYq06TxB-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504050256.SYq06TxB-lkp@intel.com/reproduce)
>
> 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
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202504050256.SYq06TxB-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> drivers/leds/leds-pca955x.c: In function 'pca955x_probe':
> >> drivers/leds/leds-pca955x.c:554:53: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=]
> snprintf(default_label, sizeof(default_label), "%u", i);
> ^~
> drivers/leds/leds-pca955x.c:554:52: note: directive argument in the range [0, 4294967294]
> snprintf(default_label, sizeof(default_label), "%u", i);
> ^~~~
> drivers/leds/leds-pca955x.c:554:5: note: 'snprintf' output between 2 and 11 bytes into a destination of size 8
> snprintf(default_label, sizeof(default_label), "%u", i);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nice, different GCC have different level of issue here. I will address this
in v2.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-04-06 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 16:28 Andy Shevchenko
2025-04-04 18:58 ` kernel test robot
2025-04-06 12:37 ` Andy Shevchenko [this message]
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=Z_J1kV6P3CgaE5WF@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pavel@kernel.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
all inboxes | Powered by JetHome®