Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3889846rwd; Mon, 22 May 2023 23:16:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Ifz/XQVA7XM5cmiqS4VVrLL4WAbTAegIKDZwPgvXP0bsuPz0qUq3i1t2/2OVIzZKwBBNh X-Received: by 2002:a17:90a:cf15:b0:253:572f:79ae with SMTP id h21-20020a17090acf1500b00253572f79aemr12302717pju.46.1684822581246; Mon, 22 May 2023 23:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684822581; cv=none; d=google.com; s=arc-20160816; b=W+0lito+S4+/TsVw2ZV87D0+HJbwJB2TLHDxK6udgLfwSNGvqvDGr2el1jWbsgZHMM vt6IVfJDatbmaZ5ZBa5aEqten6bs7ASDxjMjJ6fVDN4qYCjUb6IWhb+1URyttZ9eDww2 CPLWOCvrqF5/f77d7U6D7AWuSyBN7d0qF9Egt7POwl3Sb8041S0lSb+tTEUfGHOqQDA6 81h/EsuxAKlTciQV+3O64pduJN53o2+IB0+nkX0kvTHXw3pmF9tct/P3O4T0KeS1lCkB ZhaCoILzZqjvIUMiP7/UfusWwfK7YuZupNWI99NUPHoplJsDY6r3kbtm7lXmNqyzEboy SM9g== 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:date:dkim-signature; bh=eLhUu8UCBd/YYLdOP3ui5b1tEMg7x/uUoMmk7djKCEM=; b=ET/P6jDcpXiisYZUvIDSGRyhWeXZH1I6sNAYn2NgrEfMQ7e3uEAzZxQYXgB4/VbMKF 2fyaCEXI0sNTae6ajPxDGt7YszaN+4sIjniRMskiQOsz52rnbpIq+hAJozzoHeZxvcdY JXC0Q2IEjjOsOlJSDdx7P6+zrMAo7Y4zp7WUyUiD2kkLpR6lK9Jk9cxksnaVpbVt8x/2 lKvwt3CIOhz5cylawQUZ4JsDCwVqDQiphKzkL6sYqhQI+1GZBGcnTth4Pai7N7XOX+sw eFirx++rEgFhMk2A0JfbytR/sXl142JU1iCt/UUjFrAa5DFayk7fqNvA/mm/S4FBLzfZ TLeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=bKvOSi6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a17090ad98f00b0024e5ed38294si5914729pjv.66.2023.05.22.23.16.05; Mon, 22 May 2023 23:16:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=bKvOSi6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234702AbjEWF4A (ORCPT + 99 others); Tue, 23 May 2023 01:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234624AbjEWFz5 (ORCPT ); Tue, 23 May 2023 01:55:57 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10905120; Mon, 22 May 2023 22:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eLhUu8UCBd/YYLdOP3ui5b1tEMg7x/uUoMmk7djKCEM=; b=bKvOSi6aMPy7rYVrte/3XLeNHl qkBujmdDFFQ6BARVEU2twgXyiyjAwlKGIordV0kMs0H2djtSnYmE8ZurAQqKDqI0qLTOV2imQXtqf biZFkYTJUwIarcadZT7ASdLzrmK3LWv4PL6zZPNaPUgMMS//rpRx9e6Hkb0yegUH2yJBZVnZ6LDKt GAEfmKpNqlTQ4Kxftj1nvSA2L+Y7YTTWSsKFYBpfUYI5IDz0c8S1LLRY+TasePE9OosWa++5TvrgP EjKnONZcCvS0q7YOiTlHucKoDFPzVO94VQc36ZZzPTt2KTXs14OOkW+bF1X9528rtXg8n9y0yGfDE AT4p5gAg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1Kzy-0091NL-0x; Tue, 23 May 2023 05:55:54 +0000 Date: Mon, 22 May 2023 22:55:54 -0700 From: Christoph Hellwig To: Kees Cook Cc: Song Liu , Christoph Hellwig , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] md/raid5: Convert stripe_head's "dev" to flexible array member Message-ID: References: <20230522212114.gonna.589-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522212114.gonna.589-kees@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2023 at 02:21:15PM -0700, Kees Cook wrote: > - } dev[1]; /* allocated with extra space depending of RAID geometry */ > + } dev[]; /* allocated with extra space depending of RAID geometry */ I still think this should be: /* allocated depending of RAID geometry */ now or dropped entirely, as the extra only made sense when it always had that magic one. The actual code changes looks good to me: Reviewed-by: Christoph Hellwig