Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp692516rdb; Tue, 31 Oct 2023 22:18:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1uMSSr3oUS+VIWiHf9toteK68a1qrvwF7tpGsAtclaSNaeDzzTcesAlmRG/l5pYcy9Coj X-Received: by 2002:a05:6a20:54a3:b0:163:5bfd:ae5b with SMTP id i35-20020a056a2054a300b001635bfdae5bmr15178210pzk.15.1698815934263; Tue, 31 Oct 2023 22:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698815934; cv=none; d=google.com; s=arc-20160816; b=h5t2UxUjfop7o6I7QKfLSMNHiWOfXW4GHP8GZzDTk9sp3ydezRd/dTbmwUlxL9cZ0H g8ey4yOtrTq75ql45sU5YctuMr4s/llaMauoKlcG5aNfdI0av8oS17b1tP/6moc4T8Ho OKii9BrJroMLSt5ycm0swD3vX218kDRnTZcpoV+ll207ezsFaOGxSYdT/Fayr2V6t/6l ow76+SZwgBj7p+bKxH+1fksL1oG5IAAezYVJLnsKf9+NaEZUgFC09iWtwU4rMEF5m6M0 Ln9zbVlIFUeflPFL8qrj5dyuz813IW2+BI9k/ZWmi9eeR7hOABbUETfJBxtu4cRa83sH MroA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8jpkMwCXqhfiGZN0qlr18CaGkiQXpOM96Yew3hJKrCw=; fh=iPQ186QskbWES3Ui864Jp0JIv906IYjcbrEfk04Vmjk=; b=UBi86qOm0Y0WDxQsJ9tBYEqsTXLK0tTXDielt3FhaZKCVV0Pb4AZyhsjRqJ3bnjowq /RDP5F1+Li7/NSh/k/T4XR1xRjFQXv8/p5F0WkX9igsKYHlPuqL8DAcNgh9hn9J+JSvF QMIuoEtCJ4TNPjqTtnsWN7pMHx9ItVfIOsn3ywaOg9NZMOegNK7nXUQdkzqcO3JuLO0E MsAHeJXKR1pRUqv7C+u2PDYbdxp+v3rsewGnAM4+wbhl2RWFH9dnFdrk6SQu95qkfqPS NEK66KnPhpa6tl+tZ7vM+GLY3qnfy0o7vvyP6A58xNq4BIvze3Rwmp44P/IaeH+PmsKx +/Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F74E3Hom; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id m19-20020a170902d19300b001b86ddfd49bsi2130624plb.6.2023.10.31.22.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 22:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F74E3Hom; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DD01E8027EB4; Tue, 31 Oct 2023 22:18:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345102AbjKAFSo (ORCPT + 99 others); Wed, 1 Nov 2023 01:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbjKAFSm (ORCPT ); Wed, 1 Nov 2023 01:18:42 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0570ED; Tue, 31 Oct 2023 22:18:39 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-991c786369cso1011489166b.1; Tue, 31 Oct 2023 22:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698815918; x=1699420718; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8jpkMwCXqhfiGZN0qlr18CaGkiQXpOM96Yew3hJKrCw=; b=F74E3HomwoThAmdgtcmNNUrek0RIoVtBHMRRIhCZVj34w3/RClHkl9xn36/IThqq08 fGa/eauwRhfEiX2b2EjB5WJMeyjp6dSKtWVbmIVEyEW5eP0h67yL/yexNTxNwD0mutpf vyyeYT6/Ep7Vm1mxKbda2LfmhKFT/2rZphHinOYh8c5yswgnMWYRnqplvBdbeKLtx+Ex co1p1ADyc9JEYcFzZggcjqmBVTVwzZQGqbxsSf7I57gwQEG3KCneBZQz0DhrsngBMzSb V08PLMULgTSMQh7uF/NPR4UtRkB8QUWNrpmSYN7GdYRnGO//6cJAYb6HJJ3BavU0XQGp W3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698815918; x=1699420718; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8jpkMwCXqhfiGZN0qlr18CaGkiQXpOM96Yew3hJKrCw=; b=JhgwurbcKodygqbGvXjubeFRSND4qjhRjUBr6uL/Rf6dWVPoCHn55dP2xcadPhKzm/ pOB7YG1astqFWqMhEd/wWzt3kLJRNvk/qfhD7XOwFCzVaw56Y2pseDAAx8dpwkTul94Q c2prXi8bI8P5w7SJbM4FwdrM9U0ybu35hSygArqWd6G6b5hxzaWDskMOOYGoTJeiciCK 78r3hK//HFwjrhMQCbJP8FouMBO6glFYaNysZSatwjQwoU/DlPvYF3J2dOMrXMz9ha9F orLLbAqe8Od+HP5mfrPZ5DEq1B+BnBaDnI/RnIiaDr7WOmsHmKC+8fwqxqN1l2yRY0RR jTsA== X-Gm-Message-State: AOJu0YzpNcaQGX7dhYb28d/pUAC2ceU8ZSyIz1jPTznzj72TZdlox0IN g/4tdwIguwMU/LQKZmlU1ue3iBq4NBIJsvTaa9I= X-Received: by 2002:a17:907:9814:b0:9d5:9065:90aa with SMTP id ji20-20020a170907981400b009d5906590aamr920884ejc.76.1698815918029; Tue, 31 Oct 2023 22:18:38 -0700 (PDT) MIME-Version: 1.0 References: <20231031222455.mbhbhxiykq7dnuvl@moria.home.lan> In-Reply-To: <20231031222455.mbhbhxiykq7dnuvl@moria.home.lan> From: Sudip Mukherjee Date: Wed, 1 Nov 2023 05:18:01 +0000 Message-ID: Subject: Re: mainline build failure due to 5cfd69775eb5 ("bcachefs: Array bounds fixes") To: Kent Overstreet Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 22:18:52 -0700 (PDT) On Tue, 31 Oct 2023 at 22:24, Kent Overstreet wrote: > > On Tue, Oct 31, 2023 at 10:15:09PM +0000, Sudip Mukherjee (Codethink) wrote: > > Hi All, > > > > The latest mainline kernel branch fails to build arm64 allmodconfig > > with a native build on an arm64 host with the error: > > > > In file included from fs/bcachefs/btree_io.c:11: > > fs/bcachefs/btree_update_interior.h: In function 'want_new_bset': > > fs/bcachefs/btree_update_interior.h:274:36: error: array subscript 0 is outside the bounds of an interior zero-length array 'struct bkey_packed[0]' [-Werror=zero-length-bounds] > > 274 | __bch_btree_u64s_remaining(c, b, &bne->keys.start[0]); > > | ^~~~~~~~~~~~~~~~~~~ > > In file included from fs/bcachefs/bcachefs.h:206, > > from fs/bcachefs/btree_io.c:3: > > fs/bcachefs/bcachefs_format.h:2344:21: note: while referencing 'start' > > 2344 | struct bkey_packed start[0]; > > | ^~~~~ > > > > git bisect pointed to 5cfd69775eb5 ("bcachefs: Array bounds fixes"). > > > > I will be happy to test any patch or provide any extra log if needed. > > Following patch should resolve everything: Thanks, and I can confirm that fixes the build for me too on the arm hosts. > > -- >8 -- > From ad77f25f730ec9a0eb04be5adc591628654b85ae Mon Sep 17 00:00:00 2001 > From: Kent Overstreet > Date: Tue, 31 Oct 2023 18:05:22 -0400 > Subject: [PATCH] bcachefs: Fix build errors with gcc 10 > > gcc 10 seems to complain about array bounds in situations where gcc 11 > does not - curious. > > This unfortunately requires adding some casts for now; we may > investigate getting rid of our __u64 _data[] VLA in a future patch so > that our start[0] members can be VLAs. > > Reported-by: John Stoffel > Signed-off-by: Kent Overstreet Tested-by: Sudip Mukherjee -- Regards Sudip