Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp736308rdd; Tue, 9 Jan 2024 19:46:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiA8n/RkLvcmCovSm8qw9w9xjTGx1wCvq8nyDkBiwYig5EPXPala150Ge04qFCJOIfaqQ6 X-Received: by 2002:a05:620a:1107:b0:783:24f8:9cc0 with SMTP id o7-20020a05620a110700b0078324f89cc0mr389350qkk.146.1704858396634; Tue, 09 Jan 2024 19:46:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704858396; cv=none; d=google.com; s=arc-20160816; b=xAQvhCIxJfIyk5wHEAaX7tuZ/f4Zu0fqqetnjT7au2sg/579BzRyFTh1ZYAtgxLomY ne/eYXa9q86dVJQnXMyL59hgSfkBmAANcLyHPRs3Z6Owr6sUtG9FlZQh1JMUXdgKCTPL 1aKrqBtBGhfEqntLNGswfDfI187qt4FSOvD4FVeuKAPKkygLsAzJhUNvf87JQjBsZfeZ /TxecXMfQnGV8JcAyw/AK48ZpOw4Ko/FCKr0dkCvO8lPqySZE1RJqap1LXIz3sa62frk C5BhFu3bOd0B3z/R2gANx5b6AHM8U3ANUhpfN+TydYhzBGlpZAwBxTvtIKUCoHgHKt9g qbsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=JF1G2wODRZs7nrsHv1lJ1+ZZyzvf2L1JTgosTGKKBu0=; fh=r5UW+4ouoTtl1Z2LDXrlLOUuhsbWuoVax1RP0RWh1Hw=; b=KxQy5b2T1YrScQTcFT8O9MlttgbX/NNGxF5nBhIXMzYC5tijZUt7wLuqZVfI/itTon kX6TPEaRfKfRm+l5eoLXhbeaTj7GDCJ2qyh5RK5PuTEvbYbaQKXXsjv1HccVdxPP4vZ6 /61hflzkMy5kp+AkukzRH2+JAdamS+nzuAxd0ZgypKEs9DP5lmeZf37sGkeC6fMYcOhf UrQ3kyqstQnauw9bhpkuq3VKeFDVwiTQ5FhoOae3nrBReCVmYFYluDSVlUPI00iaBC1N I2u9BxPhAEeTSoRJrdNl7v/AttubDxocaQ/ky0hM2fCixSAG6DumuXfMWDs2K2P6oM9U dOxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UZNVgmSz; spf=pass (google.com: domain of linux-kernel+bounces-21693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cz7-20020a05620a36c700b007830437acadsi3149607qkb.162.2024.01.09.19.46.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 19:46:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UZNVgmSz; spf=pass (google.com: domain of linux-kernel+bounces-21693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6628A1C2554D for ; Wed, 10 Jan 2024 03:46:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70AC946A2; Wed, 10 Jan 2024 03:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UZNVgmSz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 823EA2579 for ; Wed, 10 Jan 2024 03:46:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE1A2C433F1; Wed, 10 Jan 2024 03:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704858388; bh=swsG9azHLeCAJ6JWTmjUc9NZWQrXEu8Hqtfs21Lgya8=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=UZNVgmSzwQzdgaLqn1axplx4MHQ0qJAuPOzXWz8xKrUECZgSRSTOrUG2KkK2JDBka sPd5/GXoJLImYx79/s6jZdm5wVn6iKt3fYHEVx99wkCGsfB2tVF7Zp+nWPl945cZot rsK28j0ycUc4qqXWRKsTGtAKvV2dIQL0iZCwNIYz/GtE/onaLNrup1+sMkFtPd0BCf XslBWEVLFhpAZEagsp8BGmls5/MwNwlFX6f6Qjy1/Nq6y+WByTnzGn5w622zt611vF /dfgMigi4FgjJNhE7hE0RpVFVf5JxFIoFMeCwiKiObP2VfYy6xoD3n9KT35S2PFvLO 5iIazdoBSXf0A== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 58AB0CE15D1; Tue, 9 Jan 2024 19:46:27 -0800 (PST) Date: Tue, 9 Jan 2024 19:46:27 -0800 From: "Paul E. McKenney" To: Stephen Rothwell Cc: Lucas De Marchi , linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org Subject: Re: [BUG] allmodconfig build error in next-20240108 Message-ID: <3d14049c-d44c-4b33-9933-0f96055b8a70@paulmck-laptop> Reply-To: paulmck@kernel.org References: <45ad1d0f-a10f-483e-848a-76a30252edbe@paulmck-laptop> <20240109095757.1313b2d9@canb.auug.org.au> <341a4955-0cdd-48d0-bfbd-cc6f6f09df37@paulmck-laptop> <20240110081155.48bb0cbd@oak> <20240110095822.3ba3d979@canb.auug.org.au> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240110095822.3ba3d979@canb.auug.org.au> On Wed, Jan 10, 2024 at 09:58:22AM +1100, Stephen Rothwell wrote: > Hi all, > > On Tue, 9 Jan 2024 14:45:56 -0800 "Paul E. McKenney" wrote: > > > > On Wed, Jan 10, 2024 at 08:11:55AM +1100, Stephen Rothwell wrote: > > > > > > On Tue, 9 Jan 2024 10:58:40 -0600 Lucas De Marchi wrote: > > > > > > > > On Mon, Jan 08, 2024 at 03:15:23PM -0800, Paul E. McKenney wrote: > > > > I could reproduce it with allmodconfig and gcc 11.4.1 from rockylinux, > > > > but not with gcc 9.3 or 12.3. Also it's not reproduced with gcc 11.4.1 > > > > when using defconfig + CONFIG_DRM_XE (even if -Wstringop-overflow is > > > > still added). > > > > > > > > I don't see a bug in the code, even if it inverts the head/tail > > > > convention. > > > > > > > > Searching around showed this which may be relevant: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 > > > > At least I can reproduce the same issue as in the snippet provided > > > > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854#c7) with the buggy > > > > compiler. > > > > > > > > So, maybe the best thing to do for now is to disable -Wstringop-overflow > > > > for gcc < 12? > > > > > > > > > > > > ------8<----- > > > > diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile > > > > index 6952da8979ea..0433a3c6cbfd 100644 > > > > --- a/drivers/gpu/drm/xe/Makefile > > > > +++ b/drivers/gpu/drm/xe/Makefile > > > > @@ -17,7 +17,7 @@ subdir-ccflags-y += $(call cc-option, -Wunused-const-variable) > > > > subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned) > > > > subdir-ccflags-y += $(call cc-option, -Wformat-overflow) > > > > subdir-ccflags-y += $(call cc-option, -Wformat-truncation) > > > > -subdir-ccflags-y += $(call cc-option, -Wstringop-overflow) > > > > +subdir-ccflags-$(call gcc-min-version, 120000) += $(call cc-option, -Wstringop-overflow) > > > > subdir-ccflags-y += $(call cc-option, -Wstringop-truncation) > > > > # The following turn off the warnings enabled by -Wextra > > > > ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),) > > > > ------8<----- > > > > This I did, thank you! > > Maybe that line "subdir-ccflags-y += $(call cc-option, -Wstringop-overflow)" > should just be removed as the setting of that option has been moved to the > normal C flags in the top level Makefile (out of Makefile.extrawarn). If you meant like this, no joy. :-( Thanx, Paul ------------------------------------------------------------------------ diff --git a/Makefile b/Makefile index 0705e7426ab7..446bd2da9fa3 100644 --- a/Makefile +++ b/Makefile @@ -988,7 +988,6 @@ KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3) #Currently, disable -Wstringop-overflow for GCC 11, globally. KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, -Wno-stringop-overflow) -KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow) # disable invalid "can't wrap" optimizations for signed / pointers KBUILD_CFLAGS += -fno-strict-overflow