Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp493490ybl; Fri, 30 Aug 2019 02:55:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyni5RReMmK7kXQuBI5bVxh8xwog50NhxlkVb3bgH6qm2e1h55OaU/MNc5Yu6n+oe7kDsNz X-Received: by 2002:a63:30c6:: with SMTP id w189mr11858289pgw.398.1567158946239; Fri, 30 Aug 2019 02:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567158946; cv=none; d=google.com; s=arc-20160816; b=Qup7ak2Rb6YQra27yE0S6QT/aBxYi/uzSL13boSZLG8VTd7WRC1P0iJeBjAg25Bctm 0PDGdrxxZC20EG2MsKmxuIwFIhHmeDEGMVY1PJckPXOK9+HzNkTjdHLn9MtFB8kxBHR7 hqPlpB8y4I2n8vjs3Jjo4u5IRW2FqANk8TyI3DtZ8UZRpt35MuV92YN83WUoUVRmzTYG 4hUxylBFMwaFb7XSyDB+cE3mUyY4XrFnl3wOK6nlJkTUXDbTppnoSFVvcF38x+UehdA9 zZDU4diOG02c/Tiwl1/AWHXQNsfw0dAinQmRrdatW24NA0zrfPanwWkXkXGxz7shqoyf LQ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=pii0OdAzcjvFp/vdUMVk3BUbGZcFiZnamay3fPrhQDI=; b=m8o65i2RxpOS35t1s6PXr74o/9SO28J1gmjH2zB2vavPuYQrmh/H8zad7cd+jGt82f p0zY2V2O/NsLn/CLB0Ra8EoJhjeCsnttdNo8Udka3H0X/2oenKCB6dkPrd02jnHzrbVt pG80Hy/v30kSyuzF7mIhdBdHmja4Chsoxz9Oye+rCZpfWXu+9mUihh+pBFpkDZ9rTv2a 5G7mIMQyw7unzGPG1FUbd3EEuwE4OFmNlB9bhUAgktjZNGqdsMdg/yUIOXGSQGhyXki3 AyV7/KWq2aYsQeADkz51L5+a3xBZ0wIdSdT2luTdhmLjwEwqBPfNJmALckCOO5uwojIw yTeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si4384047pgq.220.2019.08.30.02.55.23; Fri, 30 Aug 2019 02:55:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbfH3Jxj (ORCPT + 99 others); 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