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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6767BC433EF for ; Thu, 16 Sep 2021 15:17:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52D506120D for ; Thu, 16 Sep 2021 15:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236570AbhIPPTS (ORCPT ); Thu, 16 Sep 2021 11:19:18 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:39910 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236853AbhIPPTR (ORCPT ); Thu, 16 Sep 2021 11:19:17 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1631805477; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=W6szQ/LiyIiaf2JeeBlcAruOxPvIgc68+ew5H7jm+GE=; b=a2WCKQjVWWmYl3hJ487mi8onxdD0Zlc3NnP5FymxxyaOqKnfty+zSXt3TVbKMvcQRthvtpMC zDHdZKdcWPEgzpGyMKMzjUpOZAYpdOfd9vs2r9vu8azvQqfD9WQtA7eNVFlZlZ00vhSxQYVO uECMIrOBqAW9WVw9Ip4OncHwZ14= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyIyNzljNCIsICJsaW51eC1oYXJkZW5pbmdAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 6143601265c3cc8c6365f453 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 16 Sep 2021 15:17:38 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9E2EFC4361C; Thu, 16 Sep 2021 15:17:38 +0000 (UTC) Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9BCC1C4338F; Thu, 16 Sep 2021 15:17:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 9BCC1C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Kalle Valo To: "Gustavo A. R. Silva" Cc: Len Baker , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , "David S. Miller" , Jakub Kicinski , "Gustavo A. R. Silva" , Kees Cook , Shawn Guo , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] brcmfmac: Replace zero-length array with flexible array member References: <20210904092217.2848-1-len.baker@gmx.com> <20210912191536.GB146608@embeddedor> Date: Thu, 16 Sep 2021 18:17:31 +0300 In-Reply-To: <20210912191536.GB146608@embeddedor> (Gustavo A. R. Silva's message of "Sun, 12 Sep 2021 14:15:36 -0500") Message-ID: <87o88sy2gk.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org "Gustavo A. R. Silva" writes: > On Sat, Sep 04, 2021 at 11:22:17AM +0200, Len Baker wrote: >> There is a regular need in the kernel to provide a way to declare >> having a dynamically sized set of trailing elements in a structure. >> Kernel code should always use "flexible array members"[1] for these >> cases. The older style of one-element or zero-length arrays should >> no longer be used[2]. >> >> Also, make use of the struct_size() helper in devm_kzalloc(). >> >> [1] https://en.wikipedia.org/wiki/Flexible_array_member >> [2] https://www.kernel.org/doc/html/v5.14/process/deprecated.html#zero-length-and-one-element-arrays >> >> Signed-off-by: Len Baker > > Reviewed-by: Gustavo A. R. Silva > > I'll take this in my -next tree. :) Why? It should go to wireless-drivers-next. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches