Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp130852lqb; Thu, 23 May 2024 13:00:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2GLThUXDOVlYg8FLLTPGetK8r9QodVNhGpZFT+ud5ON64lWr1mQM8oDUX0bwhmooC435MdbG2LGmnFHEjBX6OcDcv91S7LnmnC5oehw== X-Google-Smtp-Source: AGHT+IHMDl3X6D9OkSnjUUSND1VrESQrrEWJzfpvvZSxp+4NBE/WStWxrtyFjq1QHpvWyRAD/7hc X-Received: by 2002:a17:903:2347:b0:1e2:718c:61e with SMTP id d9443c01a7336-1f4486fe598mr4578955ad.27.1716494439598; Thu, 23 May 2024 13:00:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716494439; cv=pass; d=google.com; s=arc-20160816; b=hqL7sa+IzRJRRCTWfV94T8n8DEAU7zg7aa+5Acyr4uOHQT6bfDnR2haHSCQ6lcP3HG jvypMpE9V+Y32gZVV8FiyAaqfxRtUqqhqwKqkFviGE8PVBpJveJMqUJVGQaOFXasHrwY oR3e2+GOavzbPJQAAj2g3HTwO/q+oxyfP2jduQJLE2dozpruAX3FDaiOx2lMIZNrw5By 5Q6iaO2g7EbEc9hLlpLaQpaJoGq2z4SuIQMLIXepklmAPF7DpGyz4BfhvymG3NW7/5bm 5FNhZ28hyqKjqJfEsCWTARdQeISVK/JMV0kltU1pFOfW/i2n2m0h/rRb36lQbb0/IsU8 wn5Q== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=TfJiTXHmHR4PUKQLuoWeJ+j5/QFps4jm8zo4Dxw6ua0=; fh=Dgyk/nB+7E9bHWD5nu40dygk0xj8s5HrcFMgT9EEfeI=; b=rUdzzlSPwzF32ry1nBHSLi8cIBDHzlXt4NBdYfDf4gld58rUo31riU5gudzm0Lz/4G R2p5xqcKifAmniw14b89Diq80mcFl/Ne1ffoBxH0XBg0pWZWDxcgB+2VmP76IF7Pm9o8 iZ4Zqx91zBoSm/l6/9n9V/a0jXsX4OwxO4/g8gi4EK3qQXbGsBqGmx6/No72kdaWPDnh JodzY/amRLVE8H+531ulAFWtZwDXxEtIDHfpMwVcd9hUae9cD3RzPXCHnBUd7m+FoTD+ P+323us/e85cyHBFDADx3Zi2powBAeNpmswv6X2xqsrZlp+w24zMbsVmncAspkRj6daP 2rLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=oPQ3W4qa; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-187948-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187948-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c134bb7si15353575ad.439.2024.05.23.13.00.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 13:00:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187948-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=oPQ3W4qa; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-187948-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187948-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3B58BB2145D for ; Thu, 23 May 2024 20:00:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D8D884A48; Thu, 23 May 2024 20:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="oPQ3W4qa" 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 715A81401F for ; Thu, 23 May 2024 20:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716494427; cv=none; b=CxJbOdJKkKHMjke32Ovy4o5FQJfnT4Lky1fC/4ExxzzOkmEWIUFztzf1o9uxODrLTzmrVZg6naLEqlmN6InjWXKPgqjAZ9l7GZLWLmZbiiY2tiKugo3RBrGtmVMWhbJZx0TExdOhFRKOpdSao7rbs6rZN3jW2KzWL75e0nk9AY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716494427; c=relaxed/simple; bh=ktn25oWNiTamPIaMK1L4gT/pXxd7W73/jJk25eLwhuo=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=TNlABlBHc+PxDKsv7TtrwwkMDvWGBRFVjS9h6tklJxYhEsZpM83Zwf4vI/dqIhFtmcV7iGCgiH/HsumhyeQj/PnwYaeArAC7W7960WRs5btibduAjsP7K3hD/3eCezvPH53wCeFn2fLzuj3GdeJXle71/IyCoZfcY97SzoS8q1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=oPQ3W4qa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B15FBC2BD10; Thu, 23 May 2024 20:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1716494427; bh=ktn25oWNiTamPIaMK1L4gT/pXxd7W73/jJk25eLwhuo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oPQ3W4qannFH4tmvPU0w64NaYJ8KS2tYEJ8Jy1xzM4ZCVlkj83Q48TnLPInc/wb4c rNXomFX/R8j9tqOKeAgfb/nPWta2yODr2qcNLjB1IZ4ur4T8A8NQZ4uRUzhSRvAVDS CZZ5pF8hGnEguirOpnBGZeSExshclwIE+kRzroq8= Date: Thu, 23 May 2024 13:00:26 -0700 From: Andrew Morton To: Yury Norov Cc: linux-kernel@vger.kernel.org, Petr Mladek , Masahiro Yamada , Randy Dunlap , Yoann Congal , "Gustavo A. R. Silva" , Nhat Pham , Vincent Guittot , Alexander Lobakin , "David S . Miller" Subject: Re: [PATCH] gcc: disable '-Warray-bounds' for gcc-9 Message-Id: <20240523130026.c57a8e1e7f4140d2642c84d2@linux-foundation.org> In-Reply-To: <20240522225830.1201778-1-yury.norov@gmail.com> References: <20240522225830.1201778-1-yury.norov@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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: 8bit On Wed, 22 May 2024 15:58:30 -0700 Yury Norov wrote: > '-Warray-bounds' is already disabled for gcc-10+. Now that we've merged > bitmap_{read,write), I see the following error when building the kernel > with gcc-9.4 (Ubuntu 20.04.4 LTS) for x86_64 allmodconfig: > > drivers/pinctrl/pinctrl-cy8c95x0.c: In function ‘cy8c95x0_read_regs_mask.isra.0’: > include/linux/bitmap.h:756:18: error: array subscript [1, 288230376151711744] is outside array bounds of ‘long unsigned int[1]’ [-Werror=array-bounds] > 756 | value_high = map[index + 1] & BITMAP_LAST_WORD_MASK(start + nbits); > | ~~~^~~~~~~~~~~ > > The immediate reason is that the commit b44759705f7d ("bitmap: make > bitmap_{get,set}_value8() use bitmap_{read,write}()") switched the > bitmap_get_value8() to an alias of bitmap_read(); the same for 'set'. So it seems that all kernels which contain b44759705f7d should have this change? If so, and as b44759705f7d appears to be in the net tree then the net tree is a suitable place to carry this patch? Or I can send it into Linus this -rc cycle and things will sort themselves out. Thoughts?