From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 165B3C25B78 for ; Thu, 30 May 2024 09:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N+ckhxsd6aofXtALQMNG4Ks6+8Ua2YAti9o4tY+Jld0=; b=UclIUnuN9pS6mI wWzNMlXKK0boHBCwTjvlFD8sBbefJfusgwMy9VwIAR2uckazr4D6r2l+IQ3+6bVM1yGLAUcHFAibd EKRe04MBy4rbnyV2JMR1JhzygAPxhHYLCcplpzqOq7f5Qff307HxQ/jQqoAAs7vl8PLW6RrgWuVG3 8X2xwMejzXu1MK+DCwrI3RpWzexEyb0cOpe/iniYZBDpcilb93cDeBg5JhhzFM0vF6SdRW5lfrz2c 8QD9LdDUfUmXoGaI074LzFGHwrmNNW2t8t5lV6XD9pcmVVeocrTed0GBRdIELJgT0evqdphraJFSh TBjlG/p0GHfzzV9lkk+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCbtS-00000006mnZ-19cY; Thu, 30 May 2024 09:16:18 +0000 Received: from omta40.uswest2.a.cloudfilter.net ([35.89.44.39]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCatt-00000006al5-48HO for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2024 08:12:46 +0000 Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id CYqisEppyrtmgCatbsO9oJ; Thu, 30 May 2024 08:12:23 +0000 Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with ESMTPS id CatYsQPu04pPtCatZsM3YQ; Thu, 30 May 2024 08:12:21 +0000 X-Authority-Analysis: v=2.4 cv=Xsb8O0F9 c=1 sm=1 tr=0 ts=665834e5 a=1YbLdUo/zbTtOZ3uB5T3HA==:117 a=7eglLlv4HFOW3sTsDH6Jqg==:17 a=IkcTkHD0fZMA:10 a=TpHVaj0NuXgA:10 a=wYkD_t78qR0A:10 a=VwQbUJbxAAAA:8 a=NEAV23lmAAAA:8 a=nG3MMMVrgEngwwIGFzYA:9 a=QEXdDO2ut3YA:10 a=AjGcO6oz07-iQ99wixmX:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=veiVKH1vZWe9V2vON8q6NViu4bLJsZtyTGLVtkgabHg=; b=NPx7Ho5a5jQRoP/g1eCjaTAmwc G7ARIO3jxIMb7kKvdbCsbzwDL8MGIGFkvjnX3nsl/AEEHVnAPPMsTNlLdoW4dIOZWRL/Zf+2FPgtb ZsJ8witC9l1Nmung92orCnCv92dQN6R63fhvbRvN27erCdjoOv7guq+XoRNqx7KoC0pWe3CiRBdO7 tDSjnjeydGCtZuZ7FZLjjqCmPQEb3nuT6DyqwKCP6ZG/yI5NxKroCkrt5h7zpuZIN6KycKX8CM0zt gVZyP6TiUSkbhxSnkYCLdJ8LoWnqYu679pdn7rtF2cVysMQ+gwJuBQ+1VsM/A5Vhbj9MTq2XQWdWt UAxYvSbg==; Received: from d58c58c2.rev.dansknet.dk ([213.140.88.194]:38800 helo=[10.0.0.182]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1sCatX-000JCm-2c; Thu, 30 May 2024 03:12:20 -0500 Message-ID: <09445a96-4f86-4d34-9984-4769bd6f4bc1@embeddedor.com> Date: Thu, 30 May 2024 10:12:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[] To: Greg Kroah-Hartman , Jiri Slaby , Nathan Chancellor Cc: Kees Cook , "Gustavo A. R. Silva" , Bill Wendling , Justin Stitt , linux-serial@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, stable@vger.kernel.org References: <20240529-drop-counted-by-ports-mxser-board-v1-1-0ab217f4da6d@kernel.org> <2024053008-sadly-skydiver-92be@gregkh> Content-Language: en-US From: "Gustavo A. R. Silva" In-Reply-To: <2024053008-sadly-skydiver-92be@gregkh> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 213.140.88.194 X-Source-L: No X-Exim-ID: 1sCatX-000JCm-2c X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: d58c58c2.rev.dansknet.dk ([10.0.0.182]) [213.140.88.194]:38800 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 5 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOSGErluoARunEfwHSFKTzDx/Emlx8++MkNJ2Kq+Pgiv21e+nYHpsMfAe/8NwuL2i5hEPBXb5dnRrln2RiMiwb163mX9aozhb68FyR5L1QQ3DGGJ43DY h0Ux8MWiZtEtSKZPs2Nz2qAmwNx9uOqH2XykQABbgtTWnQK4slhmymIs9H+BRhEUJB72FzfqCqPDB8H4IirHY1KVKqbExAHL2KxhujLhWvumOzXOpiyOB5za X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240530_011242_133515_2082A17E X-CRM114-Status: GOOD ( 10.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30/05/24 09:40, Greg Kroah-Hartman wrote: > On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote: >>> This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size] >>> 291 | struct mxser_port ports[] __counted_by(nports); >>> | ^~~~~~~~~~~~~~~~~~~~~~~~~ >>> 1 error generated. >>> >>> Remove this use of __counted_by to fix the warning/error. However, >>> rather than remove it altogether, leave it commented, as it may be >>> possible to support this in future compiler releases. >> >> This looks like a compiler bug/deficiency. > > I agree, why not just turn that option off in the compiler so that these > "warnings" will not show up? It's not a compiler bug. The flexible array is nested four struct layers deep, see: ports[].port.buf.sentinel.data[] The error report could be more specific, though. -- Gustavo > >> What does gcc say BTW? >> >>> Cc: stable@vger.kernel.org >>> Closes: https://github.com/ClangBuiltLinux/linux/issues/2026 >>> Fixes: f34907ecca71 ("mxser: Annotate struct mxser_board with __counted_by") >> >> I would not say "Fixes" here. It only works around a broken compiler. > > Agreed, don't add Fixes: for this, it's a compiler bug, not a kernel > issue. > > thanks, > > greg k-h > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel