From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v1 1/1] genirq: Bump the size of the local variable for sprintf()
Date: Sat, 17 May 2025 19:35:33 +0300 [thread overview]
Message-ID: <aCi61d4gYWeC5zbn@smile.fi.intel.com> (raw)
In-Reply-To: <79bd93c0-52b6-45cf-9e65-1e3636b5d95e@kernel.org>
On Fri, May 16, 2025 at 12:23:17PM +0200, Jiri Slaby wrote:
> On 16. 05. 25, 11:07, Andy Shevchenko wrote:
> > On Fri, May 16, 2025 at 06:45:04AM +0200, Jiri Slaby wrote:
> > > On 15. 05. 25, 10:55, Andy Shevchenko wrote:
...
> > > > - char name [10];
> > > > + char name [12];
> > >
> > > The max irq is ~ 512000, if I am counting correctly, so 7 B should be
> > > actually enough for everybody ;).
> >
> > GCC can't proved it. And FWIW, on current Debian unstable (GCC 14?) I can't
> > reproduce this. In any case this doesn't increase stack usage AFAICT, the array
> > already have reserved 12 or 16 bytes.
>
> Yes, sure, I am not disputing the fix.
>
> > > But well, can we silence the warning in a better way? I doubt that...
> >
> > With the above said, I think it's pretty much close to the best way.
> > But if you find anything better, I also would like to learn.
>
> Perhaps next in row would be using snprintf(), but dunno if it's better at
> all.
Try it. I believe you will get the same result. The problem is not in 'n' or
'n'-less variant, the problem is that GCC can't prove the limits of the input
value.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-05-17 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 8:55 [PATCH v1 1/1] genirq: Bump the size of the local variable for sprintf() Andy Shevchenko
2025-05-15 14:33 ` [tip: irq/core] " tip-bot2 for Andy Shevchenko
2025-05-16 4:45 ` [PATCH v1 1/1] " Jiri Slaby
2025-05-16 9:07 ` Andy Shevchenko
2025-05-16 10:23 ` Jiri Slaby
2025-05-17 16:35 ` 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=aCi61d4gYWeC5zbn@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=tglx@linutronix.de \
/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.