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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 A00A4C3A5A4 for ; Fri, 30 Aug 2019 09:53:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D2AE2173E for ; Fri, 30 Aug 2019 09:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbfH3Jxj (ORCPT ); Fri, 30 Aug 2019 05:53:39 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:34004 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbfH3Jxj (ORCPT ); Fri, 30 Aug 2019 05:53:39 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.1) (envelope-from ) id 1i3db7-00035U-9L; Fri, 30 Aug 2019 11:53:37 +0200 Message-ID: <3d2b8edaaf51ec96bf3983c8a14922e30f419ff3.camel@sipsolutions.net> Subject: Re: [RFCv2 1/4] nl80211: Fix broken non-split wiphy dumps From: Johannes Berg To: Denis Kenzior , linux-wireless@vger.kernel.org Date: Fri, 30 Aug 2019 11:53:36 +0200 In-Reply-To: (sfid-20190830_114008_989593_CFB8ED94) References: <20190816192703.12445-1-denkenz@gmail.com> (sfid-20190816_212729_636741_39C4CEB6) (sfid-20190830_110356_499003_5F22B3F6) <00161d6069cda67dbd8b918dd987e01dc1a3dab3.camel@sipsolutions.net> (sfid-20190830_111018_535326_C90DC0EB) (sfid-20190830_114008_989593_CFB8ED94) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2019-08-30 at 11:40 +0200, Johannes Berg wrote: > On Fri, 2019-08-30 at 11:10 +0200, Johannes Berg wrote: > > On Fri, 2019-08-30 at 11:03 +0200, Johannes Berg wrote: > > > On Fri, 2019-08-16 at 14:27 -0500, Denis Kenzior wrote: > > > > If a (legacy) client requested a wiphy dump but did not provide the > > > > NL80211_ATTR_SPLIT_WIPHY_DUMP attribute, the dump was supposed to be > > > > composed of purely non-split NEW_WIPHY messages, with 1 wiphy per > > > > message. At least this was the intent after commit: > > > > 3713b4e364ef ("nl80211: allow splitting wiphy information in dumps") > > > > > > > > However, in reality the non-split dumps were broken very shortly after. > > > > Perhaps around commit: > > > > fe1abafd942f ("nl80211: re-add channel width and extended capa advertising") > > > > > > Fun. I guess we updated all userspace quickly enough to not actually > > > have any issues there. As far as I remember, nobody ever complained, so > > > I guess people just updated their userspace. > > > > Actually, going back in time to the code there (e.g. iw and hostap), it > > seems that it quite possibly never was a userspace issue, just an issue > > with netlink allocating a 4k SKB by default for dumps. > > > > Even then, libnl would've defaulted to a 16k recvmsg() buffer size, and > > we didn't override that anywhere. > > Ah, also not quite true, at the time it still had a 4k default, until > commit 807fddc4cd9e ("nl: Increase receive buffer size to 4 pages") > dated May 8, 2013. However, even before that, it would have supported responding to MSG_TRUNC by retrying the recvmsg(), but hostap/iw wouldn't have set nl_socket_enable_msg_peek()... oh well. johannes