Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1189216rwl; Fri, 31 Mar 2023 07:51:14 -0700 (PDT) X-Google-Smtp-Source: AKy350acdt9Z6/MqgcM2bfFFEHXxsjI0mbRe9ymsq9D3FiC2v3Ixw5MoDorvqk3dAulNUtehzh1K X-Received: by 2002:a17:906:c0cc:b0:93a:353d:e38b with SMTP id bn12-20020a170906c0cc00b0093a353de38bmr27487051ejb.37.1680274273917; Fri, 31 Mar 2023 07:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680274273; cv=none; d=google.com; s=arc-20160816; b=JzSE9kze8JJiRMHtz325tsJCoG2I51Gy+q8Sxly8uKSlmBIED5/tyyKv/4a4gE8UKC HMftn3oaOefY19JwTUSg0UXnB9UaxOrzInm3/NhmBykTBotNUyj5BvIFlhiVS8ck99ES QlyJL+m0v1h0dfZl2AFMMu1PLhgt6K6WM/Yrj0lgUmUc4z16ZzxSoFAcU3W6PHTVVtiA H6LOliDV0aRjomombtfFvek6B7tMX0xtMxT4U8P4quK85etlvbqgBoLRWEcBTVm4ytQc Ik0mV795FSSVQV0YL6ABncuPF82Z47Ew2XIeDiy1z6eWdbujJ2LDDiMbFd+DsAO4qrkO yJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=Lj5fsO+pkSmzZNeKPRFBMrq20dm0vK6+DCP4NPxAORg=; b=ws8f/BAs7IYvedL4p1M+a8zCGkovfSpx6/9pgbwhJp/TnnN2JoCgYz0dwOk9YZWoMF 3d57SpVQjUfaIf8PzCFepHqRsf8f4m9eIW/TfM7LbsJS/SoN0RWpA8h8MqisuBp0KlqC vXwI967yoHiwHY1H48x9R+F6Cgjcp5zkcyaNXeimJdlF+nwHXZ8z9yAX/n+75jEjXVso //wLRL7jpqfc+k/pZ7HFZP9G7QaP7WoIG3siHhJ1ZxpgFAFd1OTWIFuigXt/fyU2WB1H LAM7E9vl9gJpUqBTX8dlpeEpsWUp3ZCeojSMuIv0hBF+U1cFf1Xi3v3JuTXibvNlw36Y 5QRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sXWp6Byp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a1709064b0500b00924513630a6si978444eju.387.2023.03.31.07.50.59; Fri, 31 Mar 2023 07:51:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@kernel.org header.s=k20201202 header.b=sXWp6Byp; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbjCaOuD (ORCPT + 58 others); Fri, 31 Mar 2023 10:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbjCaOuB (ORCPT ); Fri, 31 Mar 2023 10:50:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA501BF62; Fri, 31 Mar 2023 07:50:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F19C4629BA; Fri, 31 Mar 2023 14:49:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 370C0C433EF; Fri, 31 Mar 2023 14:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680274199; bh=C0Zd4amGXRyk1IwiPYn8iKt5zSrsVKKFF8PWQuo8LLA=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=sXWp6Byp66QJMBS71Hca6KR8y9WFhLRf83NemTT7IUrJy7AdfeBJpigK0RrYv42oc ncE7ijr6FxJqydhv7HpmLmsnDi98K7Hyql5x9r8VQqj4pj9mk3dbo1iqTu3Ta9NHPR gQq47mMrB2Lc8X5BYPlgF1j+cO8oXtYd+MDQB+VYN7yjD2NlCFTGX2ZeYbOI+TsuMt uSCPsulSa/X1BHcUYc5nOwItulUgJmr782tXPP/xPpFBz7oRoqNDxExH+5b/vpZRqb ffoz9NXrpnRcM8It+EofEQ0SxkSd82ODQ0n5CYWI7ogWE88gA9AOKXK6so/tBid+mc 5SRRUd0wuxmEw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [next] wifi: rtlwifi: Replace fake flex-array with flex-array member From: Kalle Valo In-Reply-To: References: To: "Gustavo A. R. Silva" Cc: Ping-Ke Shih , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <168027419512.32751.3442996258491675750.kvalo@kernel.org> Date: Fri, 31 Mar 2023 14:49:57 +0000 (UTC) X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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-wireless@vger.kernel.org "Gustavo A. R. Silva" wrote: > Zero-length arrays as fake flexible arrays are deprecated and we are > moving towards adopting C99 flexible-array members instead. > > Address the following warning found with GCC-13 and > -fstrict-flex-arrays=3 enabled: > In function ‘fortify_memset_chk’, > inlined from ‘rtl_usb_probe’ at drivers/net/wireless/realtek/rtlwifi/usb.c:1044:2: > ./include/linux/fortify-string.h:430:25: warning: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] > 430 | __write_overflow_field(p_size_field, size); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > routines on memcpy() and help us make progress towards globally > enabling -fstrict-flex-arrays=3 [1]. > > Link: https://github.com/KSPP/linux/issues/21 > Link: https://github.com/KSPP/linux/issues/277 > Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] > Signed-off-by: Gustavo A. R. Silva > Reviewed-by: Simon Horman > Acked-by: Ping-Ke Shih Patch applied to wireless-next.git, thanks. 82d6077901c6 wifi: rtlwifi: Replace fake flex-array with flex-array member -- https://patchwork.kernel.org/project/linux-wireless/patch/ZBz4x+MWoI/f65o1@work/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches