Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1834729rwb; Thu, 29 Sep 2022 02:57:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HboxvlWLQ20ujwLM8ppy4gk4zg9K7RVV3Ldf7AaeHCc9Cx6Er5GLz4WqVQPBopBC7c1H2 X-Received: by 2002:a17:907:a079:b0:770:78cb:6650 with SMTP id ia25-20020a170907a07900b0077078cb6650mr1947068ejc.515.1664445467975; Thu, 29 Sep 2022 02:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664445467; cv=none; d=google.com; s=arc-20160816; b=sD+Z9nocKIYoIvjRaI+jiWXo1XDFR2UfRvAn1jDsrAF4mWQEA6P5ZJDsvMueJHWoXN ineIS3Caq9TBcMdHbg8VLuuLoMYJIWP6rGD2EAQtdZlJNUHxbfVEMZ5PnLXS2VlUKe8L ylbslvwK56ujIG995yPzY5eg8vBEgRTOGxnw5RKQgfb9ONTqaZQ9wwLgWRaFcej9+Iug ysA5smuTntl9CSxgXWfdYjQIXm4q0MPvE402CUa0AZPaE5JdBJhL/YGAqoivReuLiTEe QCjMjNngxYwN42PMEzpnUftUGVzujtOjGngeDLNIHZB45OzTNB3w0yxt3bRkqB3W1sGa 7UUQ== 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 :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=8YGdRudXwmHRdNa9GW60U8K994rbfUeMjGihQsfF9wE=; b=byiO6Dqy9+eFeuFpOdpaHSR3FaUiJvOiHnGJBr8BNukNgTiB1LlgEEC/8qXsVTclpb Mqs6U3xs9SXhD2iklFPhb8cF8t30NhnTOwIo8I2YwLBlJ/PjO41AMH22tu6ncaUdoYIk GS+t/kL+W13GtUUQdB6/FNwTWM8+GXTwEooUBYwiUpLQYFtgdGhiiqL4Egu7xcNF86j+ KGfzrAJqMwOwlFPxFF9c2g/JUukNWAnUQCO7kotz8B5QuhWs7hVLrMEV8OImOMENusnB cHSRGFDz1ZNGzWpFkJ4a2BCFdahrFE/+N4nHpP2qPN76QsOfQLVazO/RUzOi4n6ApaEs wcyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=kzUSRyZd; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq21-20020a1709073f1500b0077951929341si8464634ejc.312.2022.09.29.02.57.29; Thu, 29 Sep 2022 02:57:47 -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=@sipsolutions.net header.s=mail header.b=kzUSRyZd; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235113AbiI2J4g (ORCPT + 59 others); Thu, 29 Sep 2022 05:56:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235106AbiI2J4d (ORCPT ); Thu, 29 Sep 2022 05:56:33 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 668C1DF393 for ; Thu, 29 Sep 2022 02:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=8YGdRudXwmHRdNa9GW60U8K994rbfUeMjGihQsfF9wE=; t=1664445391; x=1665654991; b=kzUSRyZdM26SqjDHFKBwY17m/NoglEBpZr65EfRFtsPj6RN 4bCHj978POp71bQcJLX5z+F6kIzCXNaO28fND5C6LwNVidSKC6whtf57yp6Rr0qbbzFj/dxc4Wzlb LxiNKSoM0Q7PNduPjuRqa+V142GCCFWFBwr6R5HxVwX1kslwARkoQugIajSDSGqUEDoFqA6IrVORd pCtKwig12oOTdH7u+XtfWee2qXiwsMZNZ8oIBjzr0v7FYalDzo2bnOBAJ5lEWpPlD7qVra7jxRXqt XsZqdUY+ABICNFiITI4JR4ZkAnSo3c8Lv26qwaM70Nam5jE8RpOA7B4+9ubYaxcA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1odqHM-00B7z7-2R; Thu, 29 Sep 2022 11:56:28 +0200 Message-ID: <715050f6db60d90b3fa6ae4193273dcb73838b64.camel@sipsolutions.net> Subject: Re: [PATCH 0/1] Fix potential HE IE bug and some other questions From: Johannes Berg To: James Prestwood , linux-wireless@vger.kernel.org Date: Thu, 29 Sep 2022 11:56:27 +0200 In-Reply-To: <20220928224910.453232-1-prestwoj@gmail.com> References: <20220928224910.453232-1-prestwoj@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 On Wed, 2022-09-28 at 15:49 -0700, James Prestwood wrote: > I believe there is a bug when building the probe request IEs for the > HE capabilities. More info in the patch. >=20 That fix seems right. > While looking at this I > noticed some other confusing code related to building the probe > request. >=20 > Looking at ieee80211_build_preq_ies. It is passed 'bands_used' which > is a bitmask of bands. A probe request is only sent out on a single > band so why would this contain multiple bands?=C2=A0 >=20 The function can be used to prepare a HW scan request, which can contain the elements for all bands that the HW is being asked to scan on. > We then loop over these > bands and call ieee80211_build_preq_ies_band for each one. Correct, and ie_desc->ies[band]/len[band] gets the pointer/size for each band. > This, AFAICT, would append the same IEs multiple times if 'bands_used' > contained more than one band. >=20 Correct. > Internal to mac80211/util.c its only > passed BIT(chan->band), but mac80211/scan.c seems to pass a list... Right, that's because "internal" is ieee80211_build_probe_req(), which builds only a single probe request, while the other code is for HW scan. > Below is the warning I am seeing (many, many times). It says the warning > is in build_preq_ies, but it really seems like this is not correct > and its actually in ieee80211_get_he_6ghz_capa since I see no warning > message as others _should_ have. >=20 > [ 732.130000] ------------[ cut here ]------------ > [ 732.130000] WARNING: CPU: 0 PID: 1352 at include/net/cfg80211.h:608 ie= ee80211_build_preq_ies+0x766/0x84d The line number is in ieee80211_get_he_6ghz_capa() but that's inlined, and that doesn't always work so well for the symbol resolution. johannes