Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp860147rdb; Tue, 30 Jan 2024 00:05:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKcJf2UAFLaifak/FyRiMwl0W6Pb76semkfxJhM/4K71vVtvmJCylc+sdUiZneQ4dFMuQh X-Received: by 2002:aa7:c606:0:b0:55e:f640:125a with SMTP id h6-20020aa7c606000000b0055ef640125amr3448943edq.11.1706601931354; Tue, 30 Jan 2024 00:05:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706601931; cv=pass; d=google.com; s=arc-20160816; b=ngu1S21O7WKJ3mewyAqbM24IUuVOvaKvNnkpBdB53It7/ftcOaomzHXr+y8TIf5lv2 Nh1zsLCn52pZ7+Y3zZmuTc18CBaOeyPM/c/wXFUjeFDmanmGKVUOUp/tXcH22iCas4Pa ikc7WJHET5g8+O3LeKlJoKNrmp3ZFiPOnfPipI/kPnWyvtKOvH6O86qHbjioFbqCwZy9 /7dG6aN8AsfQiWklMnKhA58aYJJcWV59GtWQEsNYdZJJRzGtqcSAYztwH2qOwTjvr529 5b5wxemOC1VRcOEnfKIdaf0p0+uAuPcd/kGTNKTcXY7GbvKeuXcrHCP0aOzdkS2DHI9K bCZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to :organization:date:subject:cc:to:from:user-agent:references; bh=v35Nb17IxnLBqjE0Q360VOmx1We6fXnnoq/2yVY6DXs=; fh=fgOnWPfDuh6qIaaz9QwrAcBegzoJ0hjLHJrsKin+4n4=; b=vjDZ+DtriOyVoG0Jbl5XHaOjQm49hgvgDN/jbc0trjzvhRGAGm5sTAK93O7e2gzxiS 5YHV+aFwH5mmSftQKeUXuS8/5BOG4dlQTi1GjjfgQRG+NAnk9cX2sxH7IWFch98g0Oya NM1KzieMQt8SGDuzpB3gOKBBPsVppgvD5+SmRVil2OLvL+0YItHNSFPrA8OuoBuahVwL 7kEJf02FPdiVOR89tYM3P298Vp/hu1g9tvsgAct2wTvij3GBlEDPQxN9VTNdWgkhkKvN Qj1xKlqNaqPVh86D71zTtcbfRDSeT2Dn3/rrO1GJFl2q6p0zvWn+hAPomX6wNT6pcXxr Gv3Q== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gentoo.org dmarc=pass fromdomain=gentoo.org); spf=pass (google.com: domain of linux-kernel+bounces-44086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ds8-20020a0564021cc800b00558bd08ca48si4400483edb.321.2024.01.30.00.05.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 00:05:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gentoo.org dmarc=pass fromdomain=gentoo.org); spf=pass (google.com: domain of linux-kernel+bounces-44086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1C6411F23D37 for ; Tue, 30 Jan 2024 08:05:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CDC654BC5; Tue, 30 Jan 2024 08:05:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ACEE54FA9; Tue, 30 Jan 2024 08:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706601921; cv=none; b=LcVieBIa43nY2YRHtDlv5sMbEefFwiZi0QpEBInE4+yTjs+ewvuCcIuorOb5UoU/oS8Fikot8/0HTNrC01JyV6vD/Pq0F8JZmTrwFxaqkjHYzgFnBGdiFPhWIrvLvO9cuLjONDbgOw2YXkqO/cH3GuZ87Kew0bj2YpFvBltP65U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706601921; c=relaxed/simple; bh=v35Nb17IxnLBqjE0Q360VOmx1We6fXnnoq/2yVY6DXs=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: MIME-Version:Content-Type; b=HG9QMXYe9tYHwT01LfOvg2UuBXZWM11rusL4HOjeDqjI8clb/cx5Rzbwx3QIgUwMNmEsSRrzAA/jdYwiAZ6dGbW2j+aOXjQyc77eJ8OOgLOVglWd33UwfGK2VTwLLq2zU1zGO2CY6kTkYKtOi7Ilw+aNXg4FVGxeHyXGbrUK9kA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org; spf=pass smtp.mailfrom=gentoo.org; arc=none smtp.client-ip=140.211.166.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentoo.org References: <20240129104954.1778339-1-geert@linux-m68k.org> <8ea40b3-adde-acb5-5e46-fe1fd395daf@linux-m68k.org> <56b9c222-4e97-4eda-89af-3e0d0c39acb2@roeck-us.net> <90cd0f1a-29c0-4c6f-9efd-92b69da194c0@gmx.de> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Sam James To: Helge Deller Cc: Guenter Roeck , Geert Uytterhoeven , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org, linux-hwmon@vger.kernel.org, intel-xe@lists.freedesktop.org, "linux-hardening@vger.kernel.org" Subject: Re: Build regressions/improvements in v6.8-rc2 Date: Tue, 30 Jan 2024 08:02:45 +0000 Organization: Gentoo In-reply-to: <90cd0f1a-29c0-4c6f-9efd-92b69da194c0@gmx.de> Message-ID: <87plxj8cwb.fsf@gentoo.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Helge Deller writes: > On 1/29/24 15:58, Guenter Roeck wrote: >> On 1/29/24 03:06, Geert Uytterhoeven wrote: >> [ ... ] >>> parisc-gcc1[23]/parisc-{allmod,def}config >>> >>> =C2=A0=C2=A0 + /kisskb/src/drivers/hwmon/pc87360.c: error: writing 1 by= te into a region of size 0 [-Werror=3Dstringop-overflow=3D]:=C2=A0 =3D> 383= :51 >>> >> >> The "fix" for this problem would be similar to commit 4265eb062a73 ("hwm= on: (pc87360) >> Bounds check data->innr usage"). The change would be something like >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 for (i =3D 0; i < data->tempnr; i++) { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 for (i =3D 0; i < min(data->tempnr, ARRAY_SIZE(data->temp_m= ax)); i++) { >> >> but that would be purely random because the loop accesses several arrays >> indexed with i, and tempnr is never >=3D ARRAY_SIZE(data->temp_max). >> I kind of resist making such changes to the code just because the compil= er >> is clueless. > > I agree with your analysis. > But I'm wondering why this warning just seem to appear on parisc. > I would expect gcc on other platforms to complain as well ?!? -Wstringop-overflow and -Wstringop-truncation are known noisy warnings because they're implemented in GCC's "middle-end". Whether or not they fire depends on other optimisations. See also https://lore.kernel.org/linux-hardening/CAHk-=3DwjG4jdE19-vWWhAX3B= yfbNr4DJS-pwiN9oY38WkhMZ57g@mail.gmail.com/. > > Helge > >> Are we sprinkling the kernel code with code like this to make the compil= er happy ? >> >> Guenter >> >> thanks, sam