Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1009539rwi; Mon, 10 Oct 2022 09:59:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BSsfKEyCC+n/BRpQNV0ItKC/4jlma5WiP26u+UWy4db7/5WfN/u0nZ8L6n60PL2BN6Dnf X-Received: by 2002:a17:902:900a:b0:178:77c7:aa28 with SMTP id a10-20020a170902900a00b0017877c7aa28mr20177884plp.3.1665421140290; Mon, 10 Oct 2022 09:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665421140; cv=none; d=google.com; s=arc-20160816; b=VWCduBVMji0OGZdWRl3velrvxFEGkp/4rmMEIMN5nw/qcxPs7k/Bzcv29sMYV9xl6P kzj6dUoid/c5rvlhIzXcuZYvXKelEX945GqWZMO3foA7mARj9kp/1HIXlYUciSrlW1hf HEmIhtirXJebQ9yI3iZmSq/sOtlkGJF0j/3gouB2as8OL+pYVrwAUpB+Cvob5i/+p3ax /yg7kBVoxM2Knfsj8Wr1NKwSak2EJAejoR7H2IavjQQ3qxrWi6FX2ZekKmDmnBy52fAL KV2F98/Tmwkjy2iTrRpHogsjKOvdL0GmLupj3yrOC1+lFg5X/Riy99MnKSU5PNLjey18 Fo9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=HhW0h0x5W7nTMr3tCZVyvo4bUG0ihn/zX4moYkMB3f8=; b=mnodm2e8+UA3Vp7HNbi74nHLgeG6bSwK21QzwBo38cmyBhhzdsLPSXDP5+jGpMDZCH YY8SX/QYmlumzFMspgZOfEgnSoq3VIPfQ41IIiCq6EVKV/J046ALqTCplE/jxsAUvUCa 4gRmyN40PVDEphyxWA6H2But4Y+ndxBeriCFLRNEXAqkFbD96n7vwLOUWRO8blBTnBQc +Myak+G2m8aCrIcTHvoS6T5OWKmLw92pb9bYf3I6XRqLmgNOtbVUGDFGPWGl9YyHeQxG jGOsrfcWMmtfs3s+if+EVjXySW8o0FE/VVruxpPoIGDhJgzXgRT7ShusED65gJLa/1hx ziIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t5l+1qwo; 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 v5-20020a634805000000b00434e297a5ccsi13402950pga.142.2022.10.10.09.58.51; Mon, 10 Oct 2022 09:59:00 -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=t5l+1qwo; 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 S229838AbiJJQyn (ORCPT + 61 others); Mon, 10 Oct 2022 12:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiJJQyk (ORCPT ); Mon, 10 Oct 2022 12:54:40 -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 635012AE4; Mon, 10 Oct 2022 09:54:37 -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 DF72660EF2; Mon, 10 Oct 2022 16:54:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A1FEC433D6; Mon, 10 Oct 2022 16:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665420875; bh=qPWTNZGEFYJEvDdkwFCY39pduTasoX2MPE4faZjFyb4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=t5l+1qwolo90SbopV9MI+P+M+f7fq6BmW4pX1FJAWtWDWbvPCt430v6pyP3RHQ/Wt WXhBOzZPLGHezZoSxWW4wCcuOMQBy/ShYXEQgQTtDl623KuQO+vtAURfkwzqUtpiK9 bJ6f/pKi8qgT3k4u5nfQHdOy6I3521qnJ7S1owY3e3ahcYzRVCEtlpfAN/sAN3Gr4B RK07rqwIMD3qkovObsKN2CVTLqEsNB1seI3uCb5Vx0EyRHmFYOhb9YU01UTSyHS8uL c6yWO8xfCroHNMUKiyn8aM5LpNkk/T4m1iJnGISl1nzNP1cfBm+adbZgIieTkgtDiu mQBMoOT4prXLQ== From: Kalle Valo To: Naresh Kamboju , Arnd Bergmann Cc: Netdev , open list , linux-wireless@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , ath11k@lists.infradead.org, regressions@lists.linux.dev, lkft-triage@lists.linaro.org Subject: Re: drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0 References: Date: Mon, 10 Oct 2022 19:54:29 +0300 In-Reply-To: (Naresh Kamboju's message of "Wed, 21 Sep 2022 16:05:39 +0530") Message-ID: <87ilkrpqka.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-wireless@vger.kernel.org + arnd Naresh Kamboju writes: > Following build warnings noticed while building arm64 on Linux next-20220921 > > Reported-by: Linux Kernel Functional Testing > > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2238 | v = ath11k_peer_assoc_h_he_limit(v, > he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2238:29: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2251 | v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2264 | v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2264 | v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2264 | v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In function 'ath11k_peer_assoc_h_he', > inlined from 'ath11k_peer_assoc_prepare' at > drivers/net/wireless/ath/ath11k/mac.c:2662:2: > drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning: > 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size > 0 [-Wstringop-overread] > 2251 | v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare': > drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing > argument 2 of type 'const u16 *' {aka 'const short unsigned int *'} > drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to > function 'ath11k_peer_assoc_h_he_limit' > 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Build log: https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/ Thanks, I was able to reproduce it now and submitted a patch: https://patchwork.kernel.org/project/linux-wireless/patch/20221010160638.20152-1-kvalo@kernel.org/ But it's strange that nobody else (myself included) didn't see this earlier. Nor later for that matter, this is the only report I got about this. Arnd, any ideas what could cause this only to happen on GCC 11? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches