Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp665286ybe; Wed, 11 Sep 2019 02:48:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbCWMMqeymYVanaEu7kN9jjP16N3WVpBmfnSkFU8QRhtQdPuGpNora/06jvzIn4Z18ZGQc X-Received: by 2002:a17:906:3293:: with SMTP id 19mr28778719ejw.265.1568195319105; Wed, 11 Sep 2019 02:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568195319; cv=none; d=google.com; s=arc-20160816; b=U0M9QW2Gil/NCAn2v5nNgFwZ+SVI1W6VTSlQYmXkqvuWBt2DQkYW5/rhlkvXRj9/8L oRy6C5grZfh5K5G1pABxSOYw4lbHvvlSWT8bQs7ezQpYhpnX6FOlRQh3QtKgYlpMfBCL 3R6uC6eO5QM8g7/9A24z+7/QvaIdNj2oi8Vf39qh/zGZytN7tXBNjNyv8EflYaCRSkh5 a+WHgCJ512QPhWtc5hywOqtpCt24ekdNpMfTqbd6NXlyRsM2i+hMMh0vCRSsPhD3gHjF k758RNuumolQUtl5vHbk1hwPDp/66n80CuNQ+waKnYG0N1aP3sv2zuQVF+I5YFtVqAlB f+0w== 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=QnjQ9TfWwejNMS28DK3JE2B3iXhnmijjB6xZjz6s+BE=; b=dv9WgxzMkKgOBJ8a2yRQikQZVhWUa/uejXDhkZ9wQKomYdOZYMwO0luHQFkeXcbiR1 DR6+id6mBHtk123iG1IJ0dCIfq0iCdCF6wfbPWGd30ADyK6a1ZdWLkxIPS4LsV8yvRmM i9NDqvW8o+cc1gadQ1qG/d/H0wgdnQ02nbSZc3MrS8wIyg+De0NJOz+NuyECa5iyzZox ++qrT3615s8F0iGRGY6qvd7m8qCFxa8lzHRiZtCACMEtbDLGhHb5qy4JhcPdDmn6qpEs AgNXhE08W2FooWebcbOOYQNmHYBqdFnwQUAGnG/lj99liHaH8lS7RNEKeYc6U+1f7T5X KXTQ== 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 b30si12751129eda.200.2019.09.11.02.48.14; Wed, 11 Sep 2019 02:48:39 -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 S1726735AbfIKJr4 (ORCPT + 99 others); Wed, 11 Sep 2019 05:47:56 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:34724 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfIKJr4 (ORCPT ); Wed, 11 Sep 2019 05:47:56 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i7zEA-00039c-CF; Wed, 11 Sep 2019 11:47:54 +0200 Message-ID: <127c19b1855302a467a1bdbf2f25f625a0254d9e.camel@sipsolutions.net> Subject: Re: [RFCv3 3/3] nl80211: Send large new_wiphy events From: Johannes Berg To: Denis Kenzior , linux-wireless@vger.kernel.org Date: Wed, 11 Sep 2019 11:47:53 +0200 In-Reply-To: <20190906154303.9303-3-denkenz@gmail.com> (sfid-20190906_174917_479938_EE3E136C) References: <20190906154303.9303-1-denkenz@gmail.com> <20190906154303.9303-3-denkenz@gmail.com> (sfid-20190906_174917_479938_EE3E136C) 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-09-06 at 10:43 -0500, Denis Kenzior wrote: > > + * There are no limits (outside of netlink protocol limits) on > + * message sizes that can be sent over the "config2" multicast group. It > + * is assumed that applications utilizing "config2" multicast group > + * utilize buffers that are inherently large enough or can utilize > + * MSG_PEEK/MSG_TRUNC in the netlink transport in order to allocate big > + * enough buffers. I'm not sure I see how the applications could do buffers that are "inherently" large enough, there's no practical message size limit, is there (32-bits for the size). I'd argue this should just say that applications should use large buffers and still use MSG_PEEK/handle MSG_TRUNC, but I can also edit it later. > + msg = nlmsg_new(alloc_size, GFP_KERNEL); > + if (!msg) > + goto legacy; > + > + if (WARN_ON(nl80211_send_wiphy(rdev, cmd, msg, 0, 0, 0, &state) < 0)) { > + nlmsg_free(msg); > + goto legacy; > + } > + > + genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, > + NL80211_MCGRP_CONFIG2, GFP_KERNEL); > + > +legacy: nit: just use "else" instead of the goto? johannes