linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>, linux-kernel@vger.kernel.org
Cc: sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org,
	linux-hwmon@vger.kernel.org, intel-xe@lists.freedesktop.org
Subject: Re: Build regressions/improvements in v6.8-rc2
Date: Mon, 29 Jan 2024 06:58:49 -0800	[thread overview]
Message-ID: <56b9c222-4e97-4eda-89af-3e0d0c39acb2@roeck-us.net> (raw)
In-Reply-To: <8ea40b3-adde-acb5-5e46-fe1fd395daf@linux-m68k.org>

On 1/29/24 03:06, Geert Uytterhoeven wrote:
[ ... ]
> parisc-gcc1[23]/parisc-{allmod,def}config
> 
>    + /kisskb/src/drivers/hwmon/pc87360.c: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]:  => 383:51
> 

The "fix" for this problem would be similar to commit 4265eb062a73 ("hwmon: (pc87360)
Bounds check data->innr usage"). The change would be something like

-               for (i = 0; i < data->tempnr; i++) {
+               for (i = 0; i < min(data->tempnr, ARRAY_SIZE(data->temp_max)); i++) {

but that would be purely random because the loop accesses several arrays
indexed with i, and tempnr is never >= ARRAY_SIZE(data->temp_max).
I kind of resist making such changes to the code just because the compiler
is clueless.

Are we sprinkling the kernel code with code like this to make the compiler happy ?

Guenter


  reply	other threads:[~2024-01-29 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29  1:13 Linux 6.8-rc2 Linus Torvalds
2024-01-29 10:49 ` Build regressions/improvements in v6.8-rc2 Geert Uytterhoeven
2024-01-29 11:06   ` Geert Uytterhoeven
2024-01-29 14:58     ` Guenter Roeck [this message]
2024-01-30  7:49       ` Helge Deller
2024-01-30  8:02         ` Sam James
2024-01-30 16:38         ` Guenter Roeck
2024-01-29 19:39 ` Linux 6.8-rc2 Guenter Roeck

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=56b9c222-4e97-4eda-89af-3e0d0c39acb2@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=geert@linux-m68k.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=sparclinux@vger.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;
as well as URLs for NNTP newsgroup(s).