Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2495685rdf; Mon, 6 Nov 2023 16:44:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzKm/w8fi+kZ8M6iWVJq/aQnqLX/CcfK3DBLWCRGwXb+xqmcbChtw3jWJVOVpa0gbOgkAv X-Received: by 2002:a17:90a:bf07:b0:27d:1df4:26f3 with SMTP id c7-20020a17090abf0700b0027d1df426f3mr24266551pjs.15.1699317871436; Mon, 06 Nov 2023 16:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699317871; cv=none; d=google.com; s=arc-20160816; b=dy3RZ/fxw/Jt9jA74Krafagqx1x/BXV75CWN93JRaO29SfdXrrh5ZjxeDEy8D1TbuN wapNxP+MTtJQqDO9F3ykZ3JHVd2kWE78cNlG9F5chm0nHB2+z5KytJEPkXLJ2weWMD5d G0tLJhmclxd70pEtMoTTSHgGCwLV+yJacbawBtlF/IpZ5ICXvJrOI/s6xbIgFrfVwQMX 2pKUwFQKxwzKitIl+yasAdjZhfpw0DyxK5R7NoNRBoXm/n/sJfyHQyt6ViygLAljHU8I LxFewJwK+qRAN8j8sGWVmUPeePpQ11v29Tyd3ZGYY2Fi7yWhA7V4sYDYxvgSBJN3M3Jj PfQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=6D02KJAK52DJD0acvzBTsRcEYJsd3WdwHRXSAUb1Ym8=; fh=b4yDpRzQZjxnD1UgrAWHsnqbJi+dpOTTrJVVaKbGA28=; b=U39u8X+DLsgfTv1TicBpchJw0ayZXuGPvsuRW8rkfYs/OpsO88uCi7kUe0aRLCk6ba pkwroLJJyimuJ1XcteQXERruHKPeCvXXSjSJNNK70EeZSE8ZhZNI7ysyXgHUkE+rgien klO3mBKQqu3SCwZblqPxn2eb9VeGtyjjALUmQqGU1aX+kkZnfcA1XJrzP9JY3IXHadnr sz/giBhfQR9aaMG5vjbdvvIH7SwMBvLrEaVG7uutWfnTOh7Cfj90qYTW++zoV95KJBNJ 4IlDwzowSCmQZkJqaPljCHY9lpsJl231nx2pGFKVjzdEDRY6YXgxrDZ852wUecHMDREw 8mIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aDCHFWOv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id lk5-20020a17090b33c500b0027ce8bab3b4si10459447pjb.113.2023.11.06.16.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 16:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aDCHFWOv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CE4D38033362; Mon, 6 Nov 2023 16:44:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232996AbjKGAoU (ORCPT + 99 others); Mon, 6 Nov 2023 19:44:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjKGAoT (ORCPT ); Mon, 6 Nov 2023 19:44:19 -0500 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [IPv6:2001:41d0:203:375::ad]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4C5D57 for ; Mon, 6 Nov 2023 16:44:16 -0800 (PST) Date: Mon, 6 Nov 2023 19:44:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1699317854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6D02KJAK52DJD0acvzBTsRcEYJsd3WdwHRXSAUb1Ym8=; b=aDCHFWOvyuvLEYy0M1h2gFhgUVjw8fNcDT5vEcxZ540cnaqcF6h058VvBTyjz/dhTJGhcO jiSgTl++Pknyoeg1jlRD0sKGi7vE8rxgMBL093Vs1F5kPA+oamyzWbQjvFApGk29EGAWph +u4FFBwMl/gByt8WmoZNrZp4dXn82E0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: "Gustavo A. R. Silva" Cc: Brian Foster , linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] bcachefs: Fix multiple -Warray-bounds warnings Message-ID: <20231107004412.kase3fiwyr5p37gd@moria.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 16:44:29 -0800 (PST) On Mon, Nov 06, 2023 at 03:40:22PM -0600, Gustavo A. R. Silva wrote: > Transform zero-length array `entries` into a proper flexible-array > member in `struct journal_seq_blacklist_table`; and fix the following > -Warray-bounds warnings: > > fs/bcachefs/journal_seq_blacklist.c:148:26: warning: array subscript idx is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:150:30: warning: array subscript idx is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:154:27: warning: array subscript idx is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:176:27: warning: array subscript i is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:177:27: warning: array subscript i is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:297:34: warning: array subscript i is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:298:34: warning: array subscript i is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > fs/bcachefs/journal_seq_blacklist.c:300:31: warning: array subscript i is outside array bounds of 'struct journal_seq_blacklist_table_entry[0]' [-Warray-bounds=] > > This results in no differences in binary output. > > This helps with the ongoing efforts to globally enable -Warray-bounds. > > Signed-off-by: Gustavo A. R. Silva Thanks, applied